/*
 * PokerCoaching.ai MDS - Main Stylesheet
 * Mobile Direct Store for subscription sales
 */

/* 1. FONT IMPORTS */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&family=Poppins:wght@600;700;800&display=swap');

/* 2. DESIGN SYSTEM (CSS VARIABLES) */
:root {
    /* Color Palette - Gaming/Poker Dark Theme */
    --color-primary: #7C3AED;      /* Purple */
    --color-secondary: #A78BFA;    /* Light Purple */
    --color-cta: #F43F5E;          /* Pink/Red - High contrast CTA */
    --color-cta-hover: #E11D48;
    --color-background: #0F0F23;   /* Deep Blue/Black */
    --color-surface-1: #1A1A2E;    /* Card backgrounds */
    --color-surface-2: #252542;    /* Hover states */
    --color-border: #3A3A5A;
    --color-text-primary: #E2E8F0;
    --color-text-secondary: #94A3B8;
    --color-success: #22C55E;
    --color-error: #EF4444;
    --color-gold: #F59E0B;         /* Poker chip gold */

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --text-base-size: 16px;

    /* Spacing Scale */
    --space-xs: 0.25rem;  /* 4px */
    --space-sm: 0.5rem;   /* 8px */
    --space-md: 1rem;     /* 16px */
    --space-lg: 2rem;     /* 32px */
    --space-xl: 4rem;     /* 64px */
    --space-2xl: 6rem;    /* 96px */

    /* Sizing */
    --max-width: 1200px;
    --header-height: 70px;

    /* Borders & Shadows */
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --border-radius-full: 9999px;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.4);
    --shadow-cta-glow: 0 0 30px rgba(244, 63, 94, 0.4);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* 3. GLOBAL STYLES & RESETS */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: var(--text-base-size);
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    background-color: var(--color-background);
    color: var(--color-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: var(--space-lg); }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }

p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
    font-size: 1.1rem;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-text-primary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-background);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* 4. UTILITY CLASSES */
.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-xl) 0;
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-cta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-center { text-align: center; }
.text-muted { color: var(--color-text-secondary); }

/* 5. LAYOUT & PAGE STRUCTURE */

/* Sticky Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: rgba(15, 15, 35, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

/* Footer */
.main-footer {
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface-1);
}

.footer-content {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-section h4 {
    color: var(--color-text-primary);
    margin-bottom: var(--space-md);
    font-size: 1.1rem;
}

.footer-section p {
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
}

.footer-section a {
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.footer-section a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 0;
}

/* 6. PAGE SECTIONS */

/* Hero Section */
.hero {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: calc(var(--header-height) + var(--space-xl));
    padding-bottom: var(--space-xl);
    position: relative;
    overflow: hidden;
}

/* Animated background gradient */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 58, 237, 0.3), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(244, 63, 94, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 0% 50%, rgba(124, 58, 237, 0.15), transparent);
    z-index: -1;
    animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    margin-bottom: var(--space-md);
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto var(--space-lg);
}

/* 7. PRICING CARDS */

#pricing {
    background: linear-gradient(180deg, transparent, rgba(26, 26, 46, 0.5));
}

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

.section-header p {
    max-width: 600px;
    margin: 0 auto;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--color-surface-1);
    padding: var(--space-lg);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--color-border);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    display: flex;
    flex-direction: column;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
    border-color: var(--color-primary);
}

.pricing-card.featured {
    border-color: var(--color-primary);
    box-shadow: 0 0 40px rgba(124, 58, 237, 0.3);
}

.pricing-card.featured::before {
    content: 'MOST POPULAR';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--color-primary), var(--color-cta));
    color: white;
    padding: var(--space-xs) var(--space-lg);
    border-radius: var(--border-radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.plan-name {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
    color: var(--color-text-primary);
}

.plan-price {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-text-primary);
    margin-bottom: var(--space-xs);
}

.plan-price .currency {
    font-size: 1.75rem;
    vertical-align: super;
}

.plan-period {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-lg);
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: var(--space-lg) 0;
    flex-grow: 1;
}

.plan-features li {
    padding: var(--space-sm) 0;
    color: var(--color-text-secondary);
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.plan-features li::before {
    content: '✓';
    color: var(--color-success);
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* 8. BUTTONS */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.875rem 2rem;
    border-radius: var(--border-radius-full);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
    text-decoration: none;
    width: 100%;
}

.btn-cta {
    background: var(--color-cta);
    color: white;
    box-shadow: 0 4px 20px rgba(244, 63, 94, 0.4);
}

.btn-cta:hover {
    background: var(--color-cta-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(244, 63, 94, 0.5);
    color: white;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-secondary);
    transform: translateY(-2px);
    color: white;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--color-border);
    color: var(--color-text-secondary);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-text-primary);
    background: rgba(124, 58, 237, 0.1);
}

/* 9. FAQ SECTION */

#faq {
    background: var(--color-surface-1);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--space-md);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: var(--space-lg);
    background: transparent;
    border: none;
    color: var(--color-text-primary);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color var(--transition-fast);
}

.faq-question:hover {
    color: var(--color-primary);
}

.faq-icon {
    font-size: 1.5rem;
    transition: transform var(--transition-base);
    color: var(--color-primary);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
}

.faq-answer-content {
    padding: 0 var(--space-lg) var(--space-lg);
    color: var(--color-text-secondary);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

/* 10. RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding-top: calc(var(--header-height) + var(--space-lg));
        padding-bottom: var(--space-xl);
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .plan-price {
        font-size: 2.5rem;
    }
}

/* 11. SUCCESS MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes checkmarkDraw {
    from { stroke-dashoffset: 24; }
    to { stroke-dashoffset: 0; }
}

@keyframes iconPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(34, 197, 94, 0); }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.modal-content {
    position: relative;
    background: linear-gradient(180deg, var(--color-surface-1) 0%, var(--color-background) 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 0;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(124, 58, 237, 0.2);
    overflow: hidden;
    animation: modalSlideUp 0.4s ease 0.1s both;
}

.modal-header {
    padding: var(--space-xl) var(--space-xl) var(--space-lg);
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.1) 0%, transparent 100%);
}

.modal-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--color-success), #16a34a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto var(--space-md);
    animation: iconPulse 2s ease-in-out 0.5s;
}

.modal-icon svg {
    width: 36px;
    height: 36px;
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
    animation: checkmarkDraw 0.5s ease 0.3s forwards;
}

.modal-header h2 {
    font-size: 1.75rem;
    margin-bottom: var(--space-xs);
}

.modal-subtitle {
    color: var(--color-text-secondary);
    font-size: 1rem;
    margin: 0;
}

.modal-body {
    padding: var(--space-lg) var(--space-xl) var(--space-xl);
}

.next-step {
    background: var(--color-surface-1);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.step-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-primary), var(--color-cta));
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--border-radius-full);
    margin-bottom: var(--space-md);
}

.next-step h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
    color: var(--color-text-primary);
}

.next-step > p {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.5;
}

.next-step > p strong {
    color: var(--color-gold);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    gap: var(--space-sm);
}

.btn-large svg {
    transition: transform var(--transition-fast);
}

.btn-large:hover svg {
    transform: translateX(4px);
}

.login-hint {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin: var(--space-md) 0 0 0;
}

.login-hint a {
    color: var(--color-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.login-hint a:hover {
    color: var(--color-text-primary);
}

.app-section {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-lg);
}

.app-label {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.app-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

.app-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-surface-1);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.app-badge:hover {
    background: var(--color-surface-2);
    border-color: var(--color-primary);
    color: var(--color-text-primary);
    transform: translateY(-2px);
}

.app-badge svg {
    opacity: 0.8;
}

.app-badge:hover svg {
    opacity: 1;
}

@media (max-width: 500px) {
    .modal-content {
        margin: var(--space-md);
    }

    .modal-header {
        padding: var(--space-lg) var(--space-md) var(--space-md);
    }

    .modal-body {
        padding: var(--space-md);
    }

    .next-step {
        padding: var(--space-md);
    }

    .app-buttons {
        flex-direction: column;
    }

    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}
