/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --color-primary: #6366f1;
    --color-primary-dark: #4f46e5;
    --color-primary-light: #818cf8;
    --color-secondary: #ec4899;
    --color-success: #10b981;
    --color-warning: #f59e0b;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);

    /* Neutral Colors */
    --color-bg: #0f172a;
    --color-bg-secondary: #1e293b;
    --color-text: #f1f5f9;
    --color-text-secondary: #cbd5e1;
    --color-border: rgba(255, 255, 255, 0.1);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   BACKGROUND EFFECTS
   ============================================ */
.bg-gradient {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 50%, rgba(236, 72, 153, 0.15) 0%, transparent 50%);
    animation: rotateGradient 20s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes rotateGradient {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    animation: fadeInUp 0.6s ease;
}

.logo-badge {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Form Footer & Login Link */
.form-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    /* Adjusted to use existing variable */
}

.login-link {
    color: var(--color-primary);
    /* Adjusted to use existing variable */
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-normal);
    /* Adjusted to use existing variable */
}

.login-link:hover {
    color: var(--color-primary-light);
    /* Adjusted to use existing variable */
    text-decoration: underline;
}

/* Error Messages */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-align: center;
}

.hidden {
    display: none !important;
}

/* Page Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-card,
.download-card {
    animation: fadeIn 0.6s ease-out forwards;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================
   FORM SECTIONS
   ============================================ */
.form-section,
.download-section,
.waitlist-section,
.existing-interest-section {
    animation: fadeInUp 0.6s ease 0.2s backwards;
}

.form-card,
.download-card,
.waitlist-card,
.existing-card,
.info-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.form-card:hover,
.waitlist-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.form-header,
.waitlist-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.form-header h2,
.waitlist-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.form-header p,
.waitlist-header p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
    margin-bottom: var(--spacing-md);
}

label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    font-size: 0.95rem;
}

.required {
    color: var(--color-secondary);
}

input,
select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

input::placeholder {
    color: var(--color-text-secondary);
    opacity: 0.6;
}

select {
    cursor: pointer;
}

/* ============================================
   BUTTONS
   ============================================ */
.submit-btn,
.download-btn,
.backup-btn,
.secondary-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.submit-btn::before,
.download-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.submit-btn:hover::before,
.download-btn:hover::before {
    width: 300px;
    height: 300px;
}

.submit-btn:hover,
.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.submit-btn:active,
.download-btn:active {
    transform: translateY(0);
}

.secondary-btn {
    background: rgba(99, 102, 241, 0.2);
    border: 2px solid var(--color-primary);
}

.secondary-btn:hover {
    background: rgba(99, 102, 241, 0.3);
}

.btn-icon {
    font-size: 1.25rem;
    transition: transform var(--transition-fast);
}

.submit-btn:hover .btn-icon,
.download-btn:hover .btn-icon {
    transform: translateX(4px);
}

/* ============================================
   PRIVACY & CONSENT
   ============================================ */
.privacy-notice {
    display: flex;
    gap: 0.75rem;
    margin: var(--spacing-md) 0;
    padding: var(--spacing-sm);
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-primary);
}

.privacy-notice input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
    cursor: pointer;
}

.privacy-notice label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin: 0;
    cursor: pointer;
}

/* ============================================
   LOADING OVERLAY & SPINNERS
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.loading-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-logo {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: float 2s ease-in-out infinite;
}

.spinner-large {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-overlay p {
    margin-top: 15px;
    color: var(--color-text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* ============================================
   SUCCESS STATES
   ============================================ */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
}

.success-checkmark svg {
    width: 100%;
    height: 100%;
}

.success-checkmark circle {
    stroke: var(--color-success);
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark path {
    stroke: var(--color-success);
    stroke-width: 3;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

.confirmation-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.confirmation-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.confirmation-subtitle {
    color: var(--color-text-secondary);
}

/* ============================================
   COUNTER DISPLAY
   ============================================ */
.counter-display {
    text-align: center;
    margin: var(--spacing-lg) 0;
}

.counter-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.counter-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.counter-label {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ============================================
   EXISTING INTEREST SECTION
   ============================================ */
.badge-success {
    font-size: 4rem;
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.existing-card h2 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: var(--spacing-sm);
}

.existing-subtitle {
    text-align: center;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
}

.current-selection {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.current-selection h3 {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-success);
}

.preference-display {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.preference-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) 0;
}

.preference-label {
    font-weight: 600;
    color: var(--color-text-secondary);
}

.preference-value {
    font-weight: 600;
    color: var(--color-text);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.hidden {
    display: none !important;
}

.success-message {
    text-align: center;
    padding: var(--spacing-lg);
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-md);
}

.success-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.success-message h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
    color: var(--color-success);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    text-align: center;
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg) 0;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   VIP EARLY BIRD OFFER (TRIPWIRE)
   ============================================ */
.early-bird-section {
    margin-bottom: var(--spacing-lg);
    animation: fadeInUp 0.6s ease 0.1s backwards;
}

.offer-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
    border: 2px solid #ffd700;
    /* Gold Border */
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.15);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.offer-ribbon {
    position: absolute;
    top: 20px;
    right: -35px;
    background: #ffd700;
    color: #000;
    width: 150px;
    text-align: center;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 5px 0;
    transform: rotate(45deg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.offer-header h2 {
    font-size: 1.8rem;
    background: linear-gradient(to right, #fff, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-xs);
}

.offer-sub {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    max-width: 400px;
    margin: 0 auto var(--spacing-lg);
}

/* Bonus Stack */
.bonus-stack {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    text-align: left;
}

.bonus-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 15px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.bonus-icon {
    font-size: 1.5rem;
}

.bonus-details h3 {
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 2px;
}

.bonus-details p {
    font-size: 0.8rem;
    color: #aaa;
    line-height: 1.2;
}

.value-tag {
    display: block;
    font-size: 0.7rem;
    color: #ffd700;
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 2px;
}

/* Price Breakdown */
.price-breakdown {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    padding: 15px;
    margin-bottom: var(--spacing-lg);
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.total-value {
    color: #aaa;
    font-size: 0.9rem;
}

.strike {
    text-decoration: line-through;
    color: #ef4444;
    /* Red strike */
}

.final-price {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
}

.highlight {
    color: #ffd700;
    font-size: 1.5rem;
}

/* VIP Button */
.vip-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: linear-gradient(to right, #f59e0b, #ffd700);
    color: #000;
    text-decoration: none;
    padding: 15px;
    border-radius: var(--radius-md);
    font-weight: 800;
    margin-bottom: 15px;
    transition: transform 0.2s;
    box-shadow: 0 5px 20px rgba(245, 158, 11, 0.3);
}

.vip-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.5);
}

.btn-text {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-sub {
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: 600;
}

.pulse-animation {
    animation: pulse-yellow 2s infinite;
}

@keyframes pulse-yellow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

.guarantee-text {
    font-size: 0.75rem;
    color: #666;
    margin-top: 10px;
}

.divider-text {
    text-align: center;
    color: #666;
    font-weight: 700;
    margin: 20px 0;
    font-size: 0.9rem;
    letter-spacing: 1px;
    position: relative;
}

.divider-text::before,
.divider-text::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.divider-text::before {
    left: 0;
}

.divider-text::after {
    right: 0;
}

.simple-card {
    background: rgba(30, 41, 59, 0.4);
    /* Less prominent bg */
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

/* ============================================
   MOBILE RESPONSIVENESS
   ============================================ */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 1.5rem;
        --spacing-lg: 1rem;
    }

    .container,
    .admin-container {
        padding: 10px;
        width: 100%;
        max-width: 100%;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .form-card,
    .download-card,
    .waitlist-card,
    .admin-card {
        padding: 1.25rem;
        border-radius: var(--radius-md);
    }

    /* Admin Tabs Scrollable */
    .admin-tabs {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        gap: 8px;
        padding-bottom: 10px;
        margin-bottom: 15px;
        border-bottom: 1px solid var(--color-border);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Hide scrollbar Firefox */
    }

    .admin-tabs::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar Chrome/Safari */
    }

    .tab-btn {
        flex: 0 0 auto;
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* Card-View for Tables */
    .resource-table {
        border: none;
    }

    .resource-table thead {
        display: none;
    }

    .resource-table tbody,
    .resource-table tr,
    .resource-table td {
        display: block;
        width: 100%;
    }

    .resource-table tr {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--color-border);
        border-radius: 12px;
        margin-bottom: 15px;
        padding: 15px;
    }

    .resource-table td {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 12px 0;
        text-align: right;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.9rem;
    }

    .resource-table td:last-child {
        border-bottom: none;
        flex-direction: column;
        gap: 10px;
        padding-top: 15px;
    }

    .resource-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--color-primary);
        font-size: 0.75rem;
        text-transform: uppercase;
    }

    .action-btns {
        width: 100%;
        gap: 8px;
    }

    .btn-small {
        flex: 1;
        justify-content: center;
        padding: 12px;
    }

    /* Form Adjustments */
    .form-group label {
        font-size: 0.9rem;
    }

    input,
    select {
        padding: 12px;
        font-size: 16px;
        /* Prevent iOS zoom */
    }

    .submit-btn,
    .download-btn,
    .vip-btn {
        padding: 1.125rem;
        border-radius: 12px;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .logo-badge {
        font-size: 2.5rem;
    }
}

/* ============================================
   VALIDATION & DYNAMIC INPUTS
   ============================================ */
.error-msg {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
    min-height: 1.2rem;
}

.hidden {
    display: none !important;
}

.mt-2 {
    margin-top: 8px;
}

input.error, select.error {
    border-color: #ef4444 !important;
}
