/* CSS Reset & Variables */
:root {
    --primary-color: #0F172A;
    /* Slate 900 */
    --accent-color: #3B82F6;
    /* Blue 500 */
    --accent-hover: #2563EB;
    /* Blue 600 */
    --bg-color: #F8FAFC;
    /* Slate 50 */
    --card-bg: rgba(255, 255, 255, 0.9);
    /* Glassmorphism */
    --text-main: #1E293B;
    /* Slate 800 */
    --text-muted: #64748B;
    /* Slate 500 */
    --error-color: #EF4444;
    /* Red 500 */
    --success-color: #10B981;
    /* Emerald 500 */
    --border-color: #E2E8F0;
    /* Slate 200 */
    --footer-bg: #020617;
    /* Very dark slate */
    --footer-text: #94A3B8;
    --font-family: 'Inter', sans-serif;
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.main-header {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-hover);
    /* Brand Blue */
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
}

.nav-link:hover {
    color: var(--accent-color);
}

.btn-primary-nav {
    background-color: var(--accent-hover);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-primary-nav:hover {
    background-color: #1d4ed8;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

/* Background Shapes */
.background-shapes .shape {
    position: fixed;
    /* Fixed to stay in background while scrolling */
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
}

.shape-1 {
    top: 10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #E0E7FF 0%, rgba(255, 255, 255, 0) 70%);
}

.shape-2 {
    bottom: 10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #DBEAFE 0%, rgba(255, 255, 255, 0) 70%);
}

/* Content Wrapper */
.content-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 1.5rem;
}

/* Payment Container */
.payment-container {
    width: 100%;
    max-width: 480px;
    padding: 2.5rem;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    animation: fadeSlideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.payment-header {
    text-align: center;
    margin-bottom: 2rem;
}

.payment-header h2 {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Form Styles */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group input {
    width: 100%;
    padding: 1rem 1rem 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-main);
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
    height: 3.5rem;
}

.form-group input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input:focus~label,
.form-group input:not(:placeholder-shown)~label {
    top: 0.5rem;
    left: 1rem;
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 600;
}

.form-group label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.2s ease;
}

.error-msg {
    display: block;
    font-size: 0.75rem;
    color: var(--error-color);
    margin-top: 0.25rem;
    min-height: 1.25em;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.2s;
}

.form-group.invalid input {
    border-color: var(--error-color);
}

.form-group.invalid .error-msg {
    opacity: 1;
    transform: translateY(0);
}

/* Checkbox */
.terms-group {
    margin-bottom: 1.5rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-muted);
    position: relative;
    padding-left: 28px;
    line-height: 1.4;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 2px;
    height: 18px;
    width: 18px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s;
}

.checkbox-container input:checked~.checkmark {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

.terms-text a {
    color: var(--accent-color);
    font-weight: 500;
}

/* Action Area */
.action-area button {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 1rem;
}

.action-area button:hover:not(:disabled) {
    background-color: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.action-area button:disabled {
    background-color: #CBD5E1;
    cursor: not-allowed;
}

.secure-badge {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.loader-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

.hidden {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.status-message {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

.status-message.success {
    color: var(--success-color);
}

.status-message.error {
    color: var(--error-color);
}

/* Footer */
.main-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column h3 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.footer-column p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-column h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.footer-column ul li a {
    font-size: 0.9rem;
}

.footer-column ul li a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--accent-color);
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.contact-info i {
    color: var(--accent-color);
    margin-top: 4px;
}

.footer-bottom {
    border-top: 1px solid #1E293B;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.separator {
    color: #475569;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-container {
        padding: 0 1.5rem;
    }

    .main-nav {
        display: none;
        /* Add menu toggle logic if needed, hiding for simple mobile view */
    }

    .mobile-menu-toggle {
        display: block;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-column h3,
    .footer-column h4,
    .footer-column p,
    .social-links {
        justify-content: center;
    }

    .contact-info li {
        justify-content: center;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .payment-container {
        padding: 2rem 1.5rem;
    }
}