:root {
    /* Premium Design Tokens - Revived Brand Colors */
    --primary: #2563eb;
    --primary-alt: #1d4ed8;
    --secondary: #65a30d;
    --accent: #f59e0b;

    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-subtle: #f1f5f9;

    --text-main: #0f172a;
    --text-muted: #475569;
    /* Slate 600 - Pass AA (5.4:1) on white */
    --text-inverse: #ffffff;

    /* Shadows - Multi-layered for Premium Feel */
    --shadow-premium:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 20px 25px -5px rgba(0, 0, 0, 0.03),
        0 0 40px rgba(37, 99, 235, 0.03);
    --shadow-hover:
        0 10px 15px -3px rgba(0, 0, 0, 0.08),
        0 30px 50px -10px rgba(0, 0, 0, 0.1),
        0 0 60px rgba(37, 99, 235, 0.06);

    --radius-premium: 24px;
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.brand-badge,
.logo {
    font-family: 'Outfit', sans-serif;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.slide-up {
    animation: slideUp 0.8s ease-out forwards;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--text-inverse);
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-alt);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.23);
    outline: none;
    color: var(--text-inverse) !important;
}

.btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
    max-width: 400px;
    margin: 2rem auto 0;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 2rem;
}

.hero-bg-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.hero-bg {
    width: 100%;
    height: 100%;
    background-image: url('squash_club_hero.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: right center;
}

.hero-content {
    width: 100%;
    max-width: 600px;
    z-index: 10;
}

.hero-content.left-align {
    margin-left: 8%;
}

.brand-badge {
    display: inline-block;
    background: var(--bg-subtle);
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero h1 span {
    color: var(--primary);
    display: block;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

/* Pricing Section */
.pricing-section {
    padding: 100px 0;
    background-color: var(--bg-body);
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.15rem;
}

/* Billing Container & Popular Badge */
.card-billing-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2.5rem;
    padding: 1.5rem 0;
}

.selector-instruction {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.2rem;
    opacity: 0.9;
    /* Increased from 0.7 for better visibility */
}

/* Premium Segmented Control */
.billing-toggle.mini {
    position: relative;
    display: flex;
    background: var(--bg-subtle);
    padding: 4px;
    border-radius: 100px;
    width: 240px;
    height: 44px;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.billing-toggle.mini input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    opacity: 0;
    cursor: pointer;
}

.toggle-label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: var(--transition);
    z-index: 1;
    pointer-events: none;
}

/* High Contrast Active States */
.billing-toggle.mini input:not(:checked) ~ .label-annual {
    color: white;
}

.billing-toggle.mini input:checked ~ .label-quarterly {
    color: white;
}

.billing-toggle.mini .slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: var(--primary);
    border-radius: 100px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
    border: none;
}

/* Align dot with text better or remove if it's a segmented control */
.billing-toggle.mini .slider:before {
    display: none; /* Segmented controls usually don't have knobs that overlap text */
}

.billing-toggle.mini input:checked~.slider {
    transform: translateX(100%);
}

/* Managed by card visibility if needed, but keeping for reference */

.billing-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
}

.toggle-label {
    font-weight: 600;
    font-size: 1rem;
    color: #475569;
    /* Consistent dark color for contrast */
    transition: var(--transition);
}

.toggle-label.active {
    color: var(--text-main);
    font-weight: 700;
}

.switch {
    position: relative;
    display: inline-block;
    width: 64px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-light);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--secondary);
}

input:checked+.slider:before {
    transform: translateX(30px);
}

/* Pricing Grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Reduced to prevent overflow on very small devices */
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.pricing-card {
    background: var(--bg-card);
    border-radius: var(--radius-premium);
    padding: 3.5rem 2.8rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-premium);
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.pricing-card.featured {
    border: 1px solid rgba(101, 163, 13, 0.1);
    border-top: 5px solid var(--secondary);
    transform: scale(1.02);
}

.pricing-card.featured:hover {
    transform: translateY(-10px) scale(1.02);
}

.pricing-card.single-card {
    border: 1px solid rgba(37, 99, 235, 0.1);
    border-top: 5px solid var(--primary);
}

.pricing-card.scholar-only-card {
    border: 1px solid rgba(245, 158, 11, 0.1);
    border-top: 5px solid var(--accent);
}

.restriction-item {
    background: rgba(245, 158, 11, 0.05);
    border-radius: 12px;
    padding: 0.8rem 1rem !important;
    font-size: 0.9rem;
    color: #92400e;
    margin: 0.5rem 0;
}

.restriction-item strong {
    color: #b45309;
}

.card-header {
    text-align: center;
    margin: -3.5rem -2.8rem 2.5rem -2.8rem;
    padding: 3.5rem 2.8rem 2rem 2.8rem;
    border-radius: var(--radius-premium) var(--radius-premium) 0 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.02), transparent);
}

.pricing-card.single-card .card-header {
    background: linear-gradient(to bottom, rgba(37, 99, 235, 0.03), transparent);
}

.pricing-card.featured .card-header {
    background: linear-gradient(to bottom, rgba(101, 163, 13, 0.03), transparent);
}

.pricing-card.scholar-only-card .card-header {
    background: linear-gradient(to bottom, rgba(245, 158, 11, 0.03), transparent);
}

.card-header h3 {
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.currency {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-muted);
    opacity: 0.7;
    margin-right: -4px;
}

.amount {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
}

.savings-badge {
    background: rgba(101, 163, 13, 0.1);
    color: #3f6212;
    /* Darker green for 8:1 contrast */
    padding: 0.5rem 1.4rem;
    border-radius: 100px;
    font-weight: 800;
    font-size: 0.85rem;
    display: inline-block;
    margin-top: 1.2rem;
    border: 1px solid rgba(101, 163, 13, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.price-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 1rem;
    opacity: 0.8;
}

.features {
    list-style: none;
    margin-bottom: 3rem;
    flex-grow: 1;
}

.features li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--bg-subtle);
    display: flex;
    align-items: center;
    gap: 12px;
}

.features li:last-child {
    border-bottom: none;
}

.features li:before {
    content: '✓';
    color: var(--primary);
    font-weight: 900;
    background: var(--bg-subtle);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.scholar-price-tag {
    margin-left: auto;
    font-weight: 700;
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.scholar-savings-note {
    font-size: 0.85em;
    color: var(--secondary);
    margin-left: 4px;
}

/* Form Overlay */
.signup-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 2000;
    display: none;
    /* Controlled by JS */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0; /* Removing padding here, using margin on container instead */
    scroll-behavior: smooth;
    justify-content: center;
    align-items: flex-start; /* CRITICAL: Ensure form starts at top for scrolling */
}

.form-container {
    background: #ffffff;
    padding: 3.5rem;
    border-radius: var(--radius-premium);
    width: 95%; /* Fluid width for standard responsive behavior */
    width: min(95%, 800px); /* Modern fluid constraint */
    max-width: 800px;
    position: relative;
    box-shadow: 0 50px 100px -20px rgba(0,0,0,0.35);
    margin: 3rem auto;
    z-index: 2010;
    flex-shrink: 0;
    transform: translateZ(0);
    overflow-x: hidden; /* Prevent internal elements from causing scroll */
}

/* Cleanup redundant overrides that cause conflicts */
@media (min-height: 800px) {
    /* No special centering needed, margin: 3rem auto is already great */
}

/* Robust Display Override */
.signup-section[style*="display: flex"] {
    display: flex !important;
}

.close-form {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--bg-subtle);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
    transition: var(--transition);
    z-index: 10;
}

.close-form:hover {
    background: #e2e8f0;
    color: var(--text-main);
}

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-header h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

/* Plan Selectors inside Form */
.form-plan-selectors {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: rgba(241, 245, 249, 0.5);
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 3rem;
    border: 1px solid rgba(0, 0, 0, 0.03);
    width: 100%;
}

.form-selector-group {
    display: flex;
    flex-wrap: wrap; /* CRITICAL: Allow wrapping on small screens */
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.selector-label {
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}

.plan-toggle-group {
    display: flex;
    flex-wrap: nowrap;
    background: white;
    padding: 3px;
    border-radius: 50px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    min-width: 0;
    overflow: hidden;
}

.plan-btn {
    padding: 0.75rem 1rem;
    flex: 1;
    min-width: 0; /* Let flex handle it */
    white-space: nowrap;
    border-radius: 50px;
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.plan-btn.active {
    background: var(--primary);
    color: white !important;
}

.billing-toggle.mini .switch {
    width: 50px;
    height: 26px;
}

.billing-toggle.mini .slider:before {
    height: 18px;
    width: 18px;
    bottom: 4px;
}

.billing-toggle.mini input:checked+.slider:before {
    transform: translateX(24px);
}

.billing-toggle.mini .toggle-label {
    font-size: 0.9rem;
}

.billing-toggle.mini .toggle-label.active {
    color: white !important;
    font-weight: 700;
}

/* Member Details */
.adult-member-section h3 {
    font-size: 0.75rem;
    margin: 2.5rem 0 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--bg-subtle);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    font-weight: 800;
}

.form-group-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.label-with-rate {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.label-with-rate label {
    margin-bottom: 0;
}

.scholar-rate-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--secondary);
    background: rgba(101, 163, 13, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    padding: 1rem 1.2rem;
    border-radius: 14px;
    border: 1.5px solid #e2e8f0;
    font-size: 1rem;
    background: #fcfdfe;
    transition: var(--transition);
    color: var(--text-main);
    font-weight: 500;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.scholar-inputs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    width: 100%;
    margin-top: 1.5rem;
}

@media (max-width: 600px) {
    .scholar-inputs-grid {
        grid-template-columns: 1fr;
    }
}

/* Scholar Section */
.scholar-integration-section {
    background: var(--bg-subtle);
    padding: 2.25rem;
    border-radius: var(--radius-premium);
    margin: 3rem 0;
    border: 1px solid rgba(0,0,0,0.03);
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.qty-control {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    margin-top: 1rem;
    width: fit-content;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.2rem;
}

.qty-control input {
    width: 50px;
    text-align: center;
    border: none;
    font-weight: 700;
    pointer-events: none;
}

/* Form Summary */
.form-summary {
    background: var(--bg-subtle);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin: 2rem 0;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.summary-line.total {
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    color: var(--text-main);
    font-weight: 700;
}

.summary-total {
    font-size: 2.2rem;
    color: var(--primary);
}

.live-total-highlight {
    background: var(--bg-surface);
    color: var(--primary);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.95rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.billing-label-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.registration-summary-box {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.registration-summary-box h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.registration-summary-box ul {
    list-style: none;
}

.registration-summary-box li {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.registration-summary-box li:before {
    content: '•';
    color: var(--primary);
    font-weight: 900;
}

/* Thank You View */
.thank-you-view {
    text-align: center;
    padding: 2rem 0;
    animation: fadeIn 0.5s ease-out;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    box-shadow: 0 10px 20px rgba(101, 163, 13, 0.2);
}

.instruction-box {
    background: var(--bg-subtle);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: left;
    margin: 2rem 0 3rem;
    border: 1px solid var(--border-light);
}

.instruction-box p {
    color: var(--text-main);
    margin-bottom: 1rem;
}

.instruction-box ul {
    list-style: none;
}

.instruction-box li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-muted);
}

.instruction-box li:last-child {
    margin-bottom: 0;
}

.instruction-box li:before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

/* Footer */
footer {
    background: var(--text-main);
    color: #cbd5e1;
    /* Lightened from text-muted for 8:1 contrast on dark */
    padding: 3rem 0;
    text-align: center;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
}

.footer-logo span {
    color: var(--secondary);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .form-plan-selectors {
        padding: 1.25rem;
        gap: 1.25rem;
    }

    .form-selector-group {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .billing-label-row {
        width: 100%;
        justify-content: space-between;
    }

    .hero {
        flex-direction: column;
        min-height: auto;
        padding-top: 4rem;
        overflow: hidden;
    }

    .hero-content.left-align {
        margin-left: 0;
        text-align: center;
        max-width: 100%;
        padding: 0 1rem;
        z-index: 10;
    }

    .brand-badge {
        margin-bottom: 1rem;
    }

    .hero h1 {
        font-size: 3.2rem;
        margin-bottom: 1rem;
    }

    .hero p {
        margin: 0 auto 2.5rem;
    }

    .hero-bg-wrapper {
        position: relative;
        width: 100%;
        height: 380px;
        right: auto;
        top: auto;
        opacity: 1;
        margin-top: 1rem;
        z-index: 1;
    }

    .hero-bg {
        background-image: url('squash_club_hero_light.webp');
        background-position: center bottom;
        background-size: contain;
        background-repeat: no-repeat;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }

    .hero {
        min-height: auto;
        padding: 4rem 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .pricing-section {
        padding: 4rem 0;
    }

    .form-container {
        padding: 2.5rem 1.5rem;
        width: 94%; /* Tighten gutter for tablets */
        margin: 2rem auto;
    }

    .form-group-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-plan-selectors {
        padding: 1rem;
        gap: 1rem;
    }

    .form-selector-group {
        width: 100%;
        justify-content: space-between;
    }

    .amount {
        font-size: 3.2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .pricing-grid {
        gap: 2.5rem;
    }

    .pricing-card {
        padding: 2rem 1rem;
    }

    .amount {
        font-size: 2.4rem;
    }

    .form-container {
        padding: 1.5rem 0.75rem;
        margin: 1.5rem auto; /* Keep small margin even on small mobile for premium feel */
        border-radius: 16px; /* Keep some rounding */
        width: 96%;
        min-height: auto; /* Let it grow naturally */
    }

    .form-header h2 {
        font-size: 1.4rem;
    }

    .form-header p {
        font-size: 0.85rem;
    }

    .form-plan-selectors {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .form-selector-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        width: 100%;
    }

    .billing-label-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .plan-toggle-group, 
    .billing-toggle.mini {
        width: 100%;
        max-width: none;
    }

    .plan-btn {
        flex: 1;
        padding: 0.6rem 0.5rem;
        font-size: 0.85rem;
        min-width: 0;
    }

    .selector-label {
        font-size: 0.75rem;
    }


    .billing-toggle.mini .toggle-label {
        font-size: 0.75rem;
    }

    .billing-toggle.mini .switch {
        width: 44px;
        height: 22px;
    }

    .billing-toggle.mini .slider:before {
        height: 14px;
        width: 14px;
        left: 4px;
        bottom: 4px;
    }

    .billing-toggle.mini input:checked+.slider:before {
        transform: translateX(22px);
    }

    .close-form {
        top: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }

    .summary-total {
        font-size: 1.6rem;
    }

    .form-plan-selectors,
    .form-summary,
    .registration-summary-box,
    .scholar-integration-section {
        padding: 1rem !important;
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 0 0.5rem;
    }

    .form-container {
        padding: 1rem 0.5rem;
    }

    .form-plan-selectors {
        padding: 0.5rem;
    }

    .plan-btn {
        padding: 0.3rem 0.4rem;
        font-size: 0.65rem;
    }
    
    .selector-label {
        font-size: 0.7rem;
    }
}

/* ── Gate Access Note ── */
.gate-note {
    background: rgba(245, 158, 11, 0.08);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 1.5rem 0 2.5rem;
    line-height: 1.6;
}

.gate-note strong {
    color: #92400e;
}

/* ── Club Rules Modal ── */
.rules-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.rules-modal-box {
    background: rgba(255, 255, 255, 0.96);
    border-radius: var(--radius-premium);
    padding: 3rem 2.5rem 2.5rem;
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-hover);
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.rules-modal-box h2 {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.rules-intro {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.rules-list {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.rules-list li {
    color: var(--text-muted);
    margin-bottom: 0.85rem;
    font-size: 0.93rem;
    line-height: 1.6;
}

.rules-list li::marker {
    color: var(--primary);
    font-weight: 700;
}

.rules-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Outline button variant */
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border-light);
    color: var(--text-muted);
    padding: 0.85rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(37, 99, 235, 0.04);
}

@media (max-width: 480px) {
    .rules-modal-box {
        padding: 2rem 1.25rem 1.5rem;
    }

    .rules-modal-actions {
        flex-direction: column-reverse;
    }

    .rules-modal-actions .btn {
        width: 100%;
        text-align: center;
    }
}