/* ============================
   BookerAI — Premium Auth Styles
   ============================ */

:root {
    --bg-gradient: radial-gradient(circle at 50% 0%, #f0f9ff 0%, #ffffff 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.8);
    --primary-color: #0f172a;
    --accent-color: #3b82f6;
    --premium-accent: #8b5cf6;
    --premium-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);

    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 50px -10px rgba(0, 0, 0, 0.12);
    --shadow-premium: 0 20px 60px -10px rgba(139, 92, 246, 0.25);

    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;

    --radius-lg: 24px;
    --radius-md: 16px;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Page Setup */
html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--bg-gradient);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.auth-container-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 1.5rem;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

/* Background Elements */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
}

.blob-1 {
    top: -10%;
    left: -5%;
    width: 600px;
    height: 600px;
    background: #e0f2fe;
}

.blob-2 {
    bottom: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: #f3e8ff;
}


/* Typography */
h1,
h2,
h3 {
    margin: 0;
    letter-spacing: -0.02em;
}

p {
    margin: 0;
    line-height: 1.6;
}


/* 🃏 Plan Selection Layout */
.plan-selection {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.plan-header {
    margin-bottom: 4rem;
}

.plan-header h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    background: linear-gradient(to right, #0f172a, #334155);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.plan-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}


/* 📦 Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: stretch;
}

/* Base Card Style */
.plan-card {
    background: var(--card-bg);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    text-align: left;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: var(--shadow-md);
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.plan-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(148, 163, 184, 0.5);
}

/* Premium Card Overrides */
.plan-card.premium {
    border-color: rgba(168, 85, 247, 0.4);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 245, 255, 0.9) 100%);
    box-shadow: var(--shadow-premium);
    transform: scale(1.02);
    z-index: 2;
}

.plan-card.premium:hover {
    transform: scale(1.02) translateY(-8px);
    box-shadow: 0 30px 60px -15px rgba(139, 92, 246, 0.35);
}

/* Badges & Icons */
.icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.plan-card:hover .icon-wrapper {
    background: #e2e8f0;
    color: #0f172a;
}

.premium-icon {
    background: #f3e8ff;
    color: #9333ea;
}

.plan-card.premium:hover .premium-icon {
    background: #e9d5ff;
    color: #7e22ce;
}

.popular-badge {
    background: linear-gradient(90deg, #8b5cf6, #d946ef);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 999px;
    letter-spacing: 0.05em;
    margin-left: auto;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

/* Content Hierarchy */
.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.plan-price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
    line-height: 1;
    letter-spacing: -0.03em;
}

.plan-price span {
    font-size: 1rem;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-left: 4px;
    letter-spacing: 0;
}

/* Feature List */
.features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem 0;
    flex-grow: 1;
}

.features-list li {
    margin-bottom: 1rem;
    padding-left: 1.75rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

.features-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.features-list strong {
    color: var(--text-primary);
}


/* Buttons */
.plan-btn {
    width: 100%;
    padding: 1.1rem;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.btn-free {
    background: white;
    color: var(--text-primary);
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.btn-free:hover {
    border-color: #94a3b8;
    background: #f8fafc;
    transform: translateY(-2px);
}

.btn-premium {
    background: var(--text-primary);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.3);
}

.btn-premium:hover {
    background: #1e293b;
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(15, 23, 42, 0.4);
}

/* Premium Card uses Gradient Button */
.plan-card.premium .btn-premium {
    background: var(--premium-gradient);
    box-shadow: 0 10px 25px -5px rgba(168, 85, 247, 0.5);
}

.plan-card.premium .btn-premium:hover {
    filter: brightness(1.1);
    box-shadow: 0 15px 35px -5px rgba(168, 85, 247, 0.6);
}


/* Form Section (Auth) */
.auth-section {
    width: 100%;
    display: flex;
    justify-content: center;
}

.auth-card,
.auth-section-card {
    width: 100%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(24px);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 1);
    margin: 0 auto;
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 2rem;
    padding: 0;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-btn:hover {
    color: var(--text-primary);
}

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

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

/* Inputs */
.input-grid {
    display: grid;
    gap: 1.5rem;
}

.input-group label,
label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    background: white;
    transition: all 0.2s;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

input::placeholder {
    color: #cbd5e1;
}

.submit-btn {
    width: 100%;
    padding: 1.1rem;
    border-radius: var(--radius-md);
    background: var(--text-primary);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    margin-top: 2rem;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.submit-btn:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.alt-link {
    margin-top: 2rem;
    color: var(--text-tertiary);
    font-size: 0.95rem;
    text-align: center;
}

.alt-link a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.alt-link a:hover {
    text-decoration: underline;
}


/* Transitions & Animations */
.hidden {
    display: none !important;
}

.fade-out {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    transition: all 0.3s;
}

.fade-in {
    opacity: 1;
    transform: scale(1);
    transition: all 0.5s;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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


/* 📱 Mobile Responsiveness */
@media (max-width: 768px) {
    .auth-container-wrapper {
        padding: 2rem 1rem;
        min-height: auto;
    }

    .plan-header h1 {
        font-size: 2rem;
    }

    /* FORCE SIDE-BY-SIDE ON MOBILE */
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Always 2 columns */
        gap: 0.75rem;
        /* Tighter gap */
        align-items: stretch;
        /* Ensure same height */
    }

    /* CARD COMPACTING FOR MOBILE */
    .plan-card {
        padding: 1.25rem 1rem;
        /* Much tighter padding */
        border-radius: 16px;
        /* Slightly tighter radius */
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    /* Resize Internal Elements */
    .icon-wrapper {
        width: 36px;
        height: 36px;
        margin-bottom: 1rem;
    }

    .icon-wrapper svg {
        width: 20px;
        height: 20px;
    }

    .plan-name {
        font-size: 1.1rem;
        flex-direction: column;
        /* Stack badge below name if needed, or keep row */
        align-items: flex-start;
        gap: 0.25rem;
    }

    .popular-badge {
        margin-left: 0;
        font-size: 0.6rem;
        padding: 2px 8px;
    }

    .plan-price {
        font-size: 1.75rem;
        /* Smaller price */
        margin-bottom: 1.5rem;
    }

    .plan-price span {
        font-size: 0.8rem;
        display: block;
        /* Stack "/month" below price to save width */
        margin-left: 0;
        margin-top: 0.2rem;
    }

    .features-list {
        margin-bottom: 1.5rem;
    }

    .features-list li {
        font-size: 0.8rem;
        /* Smaller list text */
        padding-left: 1.25rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }

    .features-list li::before {
        width: 12px;
        height: 12px;
        top: 2px;
    }

    .plan-btn {
        padding: 0.85rem;
        font-size: 0.9rem;
    }

    /* Disable hover lifts on touch */
    .plan-card.premium {
        transform: none;
        box-shadow: var(--shadow-md);
        /* Tone down shadow mobile */
    }

    .plan-card:hover,
    .plan-card.premium:hover {
        transform: none;
    }
}