:root {
    --primary-color: #338F7A;
    --primary-hover: #2d7a68;
    --success-color: #10b981;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --background-color: #f3f4f6;
    --card-background: #ffffff;
    --error-color: #ef4444;
    --warning-color: #F59946;
    --box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f4f7fe 0%, #e8f5e9 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-overflow-scrolling: touch;
}

.container {
    width: 100%;
    max-width: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.5s ease-out;
}

.payment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--primary-color);
}

.payment-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    margin: 0 auto 1rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.payment-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.payment-header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.payment-info {
    background: linear-gradient(135deg, rgba(51, 143, 122, 0.1), rgba(45, 122, 104, 0.1));
    padding: 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.payment-info .label {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.payment-info .value {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.amount-display {
    font-size: 2.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin: 0.5rem 0;
}

.payment-form {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-color);
}

label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

input, select, textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f9fafb;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(51, 143, 122, 0.1);
    background-color: white;
}

input:read-only, select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

input::placeholder {
    color: #9ca3af;
}

button, .btn, .pay-button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    min-height: 44px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

button::before, .btn::before, .pay-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s;
}

button:hover:not(:disabled), .btn:hover, .pay-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(51, 143, 122, 0.4);
}

button:active:not(:disabled), .btn:active, .pay-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(51, 143, 122, 0.3);
}

button:hover::before, .btn:hover::before, .pay-button:hover::before {
    left: 100%;
}

button:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

.button-icon {
    font-size: 1rem;
}

.message, #message {
    margin-top: 1rem;
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.error, #message.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.success, #message.success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.warning {
    background-color: rgba(251, 191, 36, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.secure-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.secure-badge i, .secure-badge svg {
    color: var(--success-color);
    width: 16px;
    height: 16px;
}

.payment-methods {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    color: var(--text-light);
}

.payment-methods i {
    font-size: 2rem;
    transition: all 0.3s;
}

.payment-methods i:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.status-icon {
    font-size: 4.5rem;
    margin-bottom: 1.25rem;
}

.status-icon.success {
    color: var(--success-color);
}

.status-icon.failed {
    color: var(--error-color);
}

.status-icon.pending {
    color: var(--warning-color);
}

.payment-status-message {
    text-align: center;
    margin: 2rem 0;
}

.payment-status-message h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.payment-status-message p {
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.detail {
    background: #f8f9fa;
    padding: 1.25rem;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    text-align: left;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.9rem;
}

.detail-row .value {
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.spinner, .loading {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid rgba(51, 143, 122, 0.2);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

.loading {
    width: 16px;
    height: 16px;
    border-width: 3px;
    margin: 0;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
        font-size: 15px;
    }
    
    .container {
        padding: 0.75rem;
    }
    
    .payment-card {
        padding: 1.5rem;
        border-radius: 0.75rem;
    }
    
    .payment-card::before {
        height: 6px;
    }
    
    .logo {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .payment-header h1 {
        font-size: 1.4rem;
    }
    
    .payment-header p {
        font-size: 0.9rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    label {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }
    
    input, select, textarea {
        padding: 0.75rem;
        font-size: 16px;
    }
    
    .payment-info {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .amount-display {
        font-size: 1.6rem;
    }
    
    button, .btn, .pay-button {
        padding: 1rem 1.25rem;
        font-size: 1rem;
        min-height: 48px;
    }
    
    .button-icon {
        font-size: 0.9rem;
    }
    
    .detail {
        padding: 1rem;
    }
    
    .detail-row {
        padding: 0.65rem 0;
        flex-direction: column;
        gap: 0.25rem;
        align-items: flex-start;
    }
    
    .detail-row .label {
        font-size: 0.8rem;
    }
    
    .detail-row .value {
        font-size: 0.9rem;
        word-break: break-word;
    }
    
    .status-icon {
        font-size: 3.5rem;
    }
    
    .message, #message {
        font-size: 0.85rem;
        padding: 0.75rem;
    }
    
    .secure-badge {
        font-size: 0.8rem;
        margin-top: 1.25rem;
    }
    
    .payment-methods {
        gap: 0.75rem;
        margin-top: 1.25rem;
    }
    
    .payment-methods i {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }
    
    .payment-card {
        padding: 1.25rem;
    }
    
    .payment-header h1 {
        font-size: 1.25rem;
    }
    
    .amount-display {
        font-size: 1.4rem;
    }
    
    .logo {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .detail-row {
        padding: 0.5rem 0;
    }
    
    .payment-methods i {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding: 1rem;
        min-height: auto;
    }
    
    .payment-card {
        padding: 1.25rem;
        margin: 1rem 0;
    }
    
    .logo {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .payment-header {
        margin-bottom: 1.25rem;
    }
    
    .payment-header h1 {
        font-size: 1.3rem;
    }
    
    .payment-header p {
        font-size: 0.85rem;
    }
    
    .form-group {
        margin-bottom: 0.875rem;
    }
    
    button, .btn, .pay-button {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
}

@media (hover: none) and (pointer: coarse) {
    button:hover:not(:disabled), .btn:hover, .pay-button:hover {
        transform: none;
    }
    
    .payment-methods i:hover {
        transform: none;
    }
    
    button:active:not(:disabled), .btn:active, .pay-button:active {
        opacity: 0.9;
    }
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.hidden {
    display: none !important;
}
