/* ═══════════════════════════════════════════════════════════════
   ChessRadarPro Website — Shared Styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Google Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=JetBrains+Mono:wght@400;700&display=swap');

/* ── Design Tokens ────────────────────────────────────────────── */
:root {
    --bg-base: #1a1a1f;
    --bg-panel: #222228;
    --bg-control: #2c2c35;
    --border: #38383f;
    --accent: #F63049;
    --accent-hover: #FF5068;
    --accent-dim: rgba(246, 48, 73, 0.15);
    --accent-glow: rgba(246, 48, 73, 0.25);
    --text-primary: #f0f0f2;
    --text-secondary: #8a8a9a;
    --text-muted: #4a4a58;
    --danger: #ff5c5c;
    --success: #4caf82;
    --font-mono: 'DM Mono', monospace;
    --font-data: 'JetBrains Mono', monospace;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --max-w: 1120px;
    --nav-h: 64px;
}

/* ── Reset ────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-mono);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Scroll Animations ────────────────────────────────────────── */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ══════════════════════════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════════════════════════ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    background: rgba(26, 26, 31, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: background 0.3s;
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.nav-logo-text {
    font-weight: 500;
    font-size: 15px;
    color: var(--text-primary);
}

.nav-logo-text .pro {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
    margin-left: auto;
}

.nav-links a {
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    transition: color 0.2s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: var(--bg-base) !important;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-mono);
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.nav-cta::after {
    display: none !important;
}

.nav-cta:hover {
    background: var(--accent-hover);
    color: var(--bg-base) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
}

.hamburger svg {
    display: block;
}

/* Mobile nav */
.mobile-nav {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    z-index: 999;
    padding: 16px 24px;
    flex-direction: column;
    gap: 12px;
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav a {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 8px 0;
    display: block;
}

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

/* ══════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════ */
.hero {
    padding: calc(var(--nav-h) + 80px) 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 6px 16px;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.hero h1 {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 500;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.hero h1 .accent {
    color: var(--accent);
}

.hero-sub {
    font-size: clamp(14px, 2vw, 17px);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 56px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: var(--bg-base);
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--bg-base);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(246, 48, 73, 0.35);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: var(--text-secondary);
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 14px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.hero-image {
    max-width: 900px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(246, 48, 73, 0.08);
}

.hero-image img {
    width: 100%;
    display: block;
}

/* ══════════════════════════════════════════════════════════════
   SECTION SHARED
   ══════════════════════════════════════════════════════════════ */
.section {
    padding: 96px 0;
}

.section-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
    text-align: center;
}

.section-title {
    font-size: clamp(24px, 3.5vw, 36px);
    font-weight: 500;
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.section-desc {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    max-width: 560px;
    margin: 0 auto 56px;
    line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════════
   FEATURES
   ══════════════════════════════════════════════════════════════ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover {
    border-color: rgba(246, 48, 73, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.feature-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature-card h3 {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════
   HOW IT WORKS
   ══════════════════════════════════════════════════════════════ */
.how-it-works {
    background: var(--bg-panel);
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    counter-reset: step;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 18px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    border: 1px solid rgba(246, 48, 73, 0.2);
}

.step h3 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.step p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Connector line between steps */
.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 24px;
    left: calc(50% + 32px);
    width: calc(100% - 64px);
    height: 1px;
    background: linear-gradient(90deg, var(--accent), var(--border));
    opacity: 0.4;
}

/* ══════════════════════════════════════════════════════════════
   SCREENSHOTS
   ══════════════════════════════════════════════════════════════ */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.screenshot-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
}

.screenshot-card:hover {
    transform: translateY(-6px);
    border-color: rgba(246, 48, 73, 0.3);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.screenshot-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--bg-control);
}

.screenshot-card .caption {
    padding: 18px 20px;
}

.screenshot-card .caption h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.screenshot-card .caption p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════
   PRICING
   ══════════════════════════════════════════════════════════════ */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 720px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 36px 28px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-glow), 0 16px 48px rgba(0, 0, 0, 0.3);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--bg-base);
    font-size: 10px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 100px;
    letter-spacing: 0.08em;
}

.pricing-name {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
}

.pricing-price {
    font-family: var(--font-data);
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 4px;
}

.pricing-price span {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
}

.pricing-alt {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: 28px;
}

.pricing-features li {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 8px 0;
    border-bottom: 1px solid rgba(56, 56, 63, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
    flex-shrink: 0;
}

.pricing-card .btn-primary,
.pricing-card .btn-secondary {
    width: 100%;
    justify-content: center;
}

/* ══════════════════════════════════════════════════════════════
   CTA BANNER
   ══════════════════════════════════════════════════════════════ */
.cta-banner {
    background: linear-gradient(135deg, rgba(246, 48, 73, 0.1) 0%, rgba(26, 26, 31, 1) 50%, rgba(246, 48, 73, 0.08) 100%);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    text-align: center;
    padding: 80px 0;
}

.cta-banner h2 {
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 500;
    margin-bottom: 12px;
}

.cta-banner p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */
.footer {
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
    padding: 48px 0 32px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 48px;
    margin-bottom: 36px;
}

.footer-brand .nav-logo {
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 12px;
    color: var(--text-muted);
    max-width: 280px;
    line-height: 1.6;
}

.footer-col h5 {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.footer-col a {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 4px 0;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--text-muted);
}

.footer-bottom a:hover {
    color: var(--accent);
}

/* ══════════════════════════════════════════════════════════════
   PAGE CONTENT (Privacy, Support)
   ══════════════════════════════════════════════════════════════ */
.page-content {
    padding: calc(var(--nav-h) + 56px) 0 96px;
}

.page-content .container {
    max-width: 780px;
}

.page-header {
    text-align: center;
    margin-bottom: 48px;
}

.page-header h1 {
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 500;
    margin-bottom: 12px;
}

.page-header .updated {
    font-size: 13px;
    color: var(--text-muted);
}

.page-body h2 {
    font-size: 20px;
    font-weight: 500;
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.page-body p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.page-body ul {
    padding-left: 0;
    list-style: none;
    margin-bottom: 16px;
}

.page-body ul li {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    border-bottom: 1px solid rgba(56, 56, 63, 0.3);
}

.page-body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.page-body ul li strong {
    color: var(--text-primary);
}

.page-body a {
    color: var(--accent);
}

/* ── Contact / Support Form ───────────────────────────────────── */
.support-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 48px;
}

.support-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    text-align: center;
    transition: all 0.3s;
}

.support-card:hover {
    border-color: rgba(246, 48, 73, 0.3);
    transform: translateY(-3px);
}

.support-card .support-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.support-card h3 {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
}

.support-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

/* ── FAQ ──────────────────────────────────────────────────────── */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 48px;
}

.faq-item {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.2s;
}

.faq-item:hover {
    border-color: rgba(246, 48, 73, 0.3);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 14px;
    padding: 18px 24px;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.faq-question svg {
    flex-shrink: 0;
    transition: transform 0.3s;
    color: var(--text-muted);
}

.faq-item.open .faq-question svg {
    transform: rotate(180deg);
    color: var(--accent);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 24px 18px;
}

.faq-answer p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .screenshots-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .step:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .hero {
        padding: calc(var(--nav-h) + 48px) 0 48px;
    }

    .section {
        padding: 64px 0;
    }

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

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

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

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

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

    .footer-inner {
        flex-direction: column;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

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