/* ===== Base & Variables ===== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --accent: #22c55e;
    --orange: #f97316;
    --orange-light: #fb923c;
    --nav-blue: #0c1222;
    --hero-blue: #0f172a;
    --hero-blue-mid: #1e293b;
    --hero-purple: #1e1b4b;
    --text: #1e293b;
    --text-muted: #64748b;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a, button {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

main {
    padding-top: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
}

html {
    overflow-x: hidden;
}

/* ===== Navigation Bar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--nav-blue);
    padding: 16px 0;
    padding-top: max(16px, env(safe-area-inset-top));
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
}

@media (max-width: 380px) {
    .logo {
        font-size: 0.95rem;
    }
}

.logo-icon {
    width: 28px;
    height: 28px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
    margin: 0;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.nav-links a:hover {
    opacity: 0.9;
}

.navbar .btn-nav-cta {
    background: var(--orange) !important;
    color: white !important;
    padding: 6px 14px;
    min-height: unset;
    height: auto;
    line-height: 1.3;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.navbar .btn-nav-cta:hover {
    background: var(--orange-light) !important;
}

/* Hamburger toggle - hidden on desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    transition: transform 0.3s, opacity 0.3s;
}

body.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
    .nav-toggle {
        display: flex;
    }

    .nav-inner {
        gap: 16px;
    }

    .navbar .btn-nav-cta {
        padding: 5px 12px;
        font-size: 12px;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--nav-blue);
        flex-direction: column;
        padding: 24px;
        gap: 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
        z-index: 99;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .nav-links li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-links a {
        display: block;
        padding: 16px 0;
        min-height: 44px;
        line-height: 44px;
    }

    body.nav-open .nav-links {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    body.nav-open {
        overflow: hidden;
    }
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    padding: 140px 0 120px;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--hero-blue) 0%, var(--hero-blue-mid) 30%, #1e1b4b 70%, #312e81 100%);
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-bg-laptop {
    position: absolute;
    left: 3%;
    top: 50%;
    transform: translateY(-50%);
    width: 420px;
    height: 280px;
    background: 
        linear-gradient(145deg, rgba(30, 41, 59, 0.7) 0%, rgba(30, 27, 75, 0.6) 100%),
        url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=600&q=80') center/cover;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    opacity: 0.5;
}

.hero-bg-laptop::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.6) 0%, transparent 50%);
    border-radius: 12px;
}

.hero-bg-laptop::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 55%;
    height: 18px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 0 0 8px 8px;
}

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

.hero-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.3);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    color: white;
}

.hero h1 .highlight {
    color: #fbbf24;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero-primary {
    background: var(--orange) !important;
    color: white !important;
    border: none;
}

.btn-hero-primary:hover {
    background: var(--orange-light) !important;
}

.btn-hero-secondary {
    background: rgba(15, 23, 42, 0.8) !important;
    color: white !important;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-hero-secondary:hover {
    border-color: white;
    background: rgba(30, 41, 59, 0.9) !important;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 14px 28px;
    min-height: 48px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    line-height: 1.2;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white !important;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--primary) !important;
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white !important;
}

.btn-text {
    color: var(--text-muted) !important;
    background: transparent;
}

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

.btn-large {
    padding: 18px 36px;
    font-size: 18px;
}

/* ===== Section Styles ===== */
.section {
    padding: 80px 0;
}

.section h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 48px;
}

/* ===== Article / Long-form Content ===== */
.candychat-section {
    background: var(--bg);
}

.azar-section {
    background: var(--bg-alt);
}

.article-content {
    max-width: 720px;
    margin: 0 auto;
}

.article-content p {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 1.25rem;
}

.article-content h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.article-content h3:first-of-type {
    margin-top: 1.5rem;
}

.article-content strong {
    font-weight: 600;
}

.article-cta {
    margin-top: 2.5rem;
}

@media (max-width: 640px) {
    .article-content p {
        font-size: 1rem;
    }

    .article-content h3 {
        font-size: 1.2rem;
        margin-top: 2rem;
    }
}

/* ===== Comparison Section ===== */
.comparison-section {
    background: var(--bg-alt);
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    background: white;
}

.comparison-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    font-size: 15px;
}

.comparison-table th,
.comparison-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.comparison-table th {
    background: var(--bg-alt);
    font-weight: 600;
    color: var(--text);
}

.comparison-table tbody tr:hover {
    background: #fafafa;
}

.comparison-table .featured-row {
    background: linear-gradient(90deg, #eef2ff 0%, #ffffff 100%);
}

.table-app-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 8px;
}

.badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 50px;
    margin-left: 8px;
}

.badge-original {
    display: inline-block;
    background: var(--text-muted);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 50px;
    margin-left: 8px;
}

/* ===== Review Cards ===== */
.review-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.review-card {
    background: white;
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: box-shadow 0.2s;
}

.review-card:hover {
    box-shadow: var(--shadow-lg);
}

.review-card.featured {
    border: 2px solid var(--primary);
    background: linear-gradient(180deg, #fafbff 0%, #ffffff 100%);
    grid-column: 1 / -1;
}

.app-review-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.app-logo {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    object-fit: contain;
    background: var(--bg-alt);
    padding: 8px;
    flex-shrink: 0;
}

.app-header-info {
    flex: 1;
    min-width: 0;
}

.app-header-info h3 {
    margin-bottom: 4px;
}

.app-header-info .review-rating {
    margin-bottom: 12px;
}

.app-store-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.app-store-badge {
    display: inline-block;
    height: 40px;
}


.card-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.card-badge-original {
    background: var(--text-muted);
}

.review-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.review-rating {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.card-cta {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 20px;
}

.card-cta:hover {
    text-decoration: underline;
}

.review-description {
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.7;
}

.review-description p {
    margin-bottom: 1rem;
}

.review-description p:last-child {
    margin-bottom: 0;
}

.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.pros h4, .cons h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.pros h4 { color: var(--accent); }
.cons h4 { color: #ef4444; }

.pros ul, .cons ul {
    list-style: none;
}

.pros li, .cons li {
    padding: 4px 0;
    padding-left: 20px;
    position: relative;
    font-size: 14px;
    color: var(--text-muted);
}

.pros li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
}

.cons li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #ef4444;
}

@media (max-width: 640px) {
    .pros-cons {
        grid-template-columns: 1fr;
    }
}

/* ===== Security Section ===== */
.security-section {
    background: var(--bg-alt);
}

.security-highlight {
    font-size: 1.125rem;
    color: var(--text);
    max-width: 720px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.security-features {
    list-style: none;
    max-width: 480px;
    margin: 0 auto 48px;
}

.security-features li {
    padding: 12px 0;
    padding-left: 36px;
    position: relative;
    font-size: 1rem;
}

.security-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.scorecard-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.scorecard-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
}

.scorecard-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.scorecard-badge-inline {
    display: block;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 50px;
    margin-bottom: 12px;
}

.scorecard-item {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.scorecard-item.featured {
    border-color: var(--primary);
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
}

.scorecard-item .app-name {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.scorecard-item .score {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.scorecard-item.featured .score {
    color: var(--primary-dark);
}

/* ===== Stats Section ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 800px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    padding: 40px 24px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-muted);
}

/* ===== CTA Section ===== */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.cta-section h2 {
    color: white;
}

.cta-section .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-section .btn-primary {
    background: white;
    color: var(--primary) !important;
}

.cta-section .btn-text {
    color: rgba(255, 255, 255, 0.9) !important;
}

.cta-section .btn-text:hover {
    color: white !important;
}

/* ===== Footer ===== */
.footer {
    padding: 24px 0;
    background: var(--text);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    font-size: 14px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .scorecard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 100px 0 80px;
        padding-top: max(100px, calc(60px + env(safe-area-inset-top)));
        min-height: auto;
    }

    .hero-bg-laptop {
        display: none;
    }

    .section {
        padding: 48px 0;
    }

    .section-subtitle {
        margin-bottom: 32px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 16px 24px;
        min-height: 52px;
        font-size: 16px;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 12px 8px;
        font-size: 12px;
    }

    .comparison-table th:first-child,
    .comparison-table td:first-child {
        min-width: 100px;
        position: sticky;
        left: 0;
        background: var(--bg-alt);
        z-index: 1;
    }

    .comparison-table .featured-row td:first-child {
        background: linear-gradient(90deg, #eef2ff 0%, #eef2ff 100%);
    }

    .badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stat-item {
        padding: 24px 20px;
    }

    .stat-number {
        font-size: 2rem;
    }

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

    .review-card {
        padding: 24px 20px;
    }

    .review-card.featured {
        padding: 24px 20px;
    }

    .security-features {
        max-width: 100%;
    }

    .footer {
        padding: 24px 0;
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
}

/* Tablet breakpoint */
@media (min-width: 641px) and (max-width: 900px) {
    .container {
        padding: 0 20px;
    }

    .hero {
        padding: 120px 0 100px;
    }

    .section {
        padding: 60px 0;
    }
}
