/* === Modern Web Design - Мобильная Таверна AI === */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --bg: #0f172a;
    --bg-elevated: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.6);
    --border: rgba(148, 163, 184, 0.15);
    --radius: 16px;
    --radius-lg: 24px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px -10px rgba(99, 102, 241, 0.5);
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    /* Legacy for policy pages */
    --primary-color: var(--primary);
    --primary-light: var(--primary-light);
    --bg-secondary: var(--bg-elevated);
    --text-primary: var(--text);
    --text-secondary: var(--text-muted);
    --gradient-cta: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === Navigation === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.logo-icon {
    font-size: 1.75rem;
    animation: swing 3s ease-in-out infinite;
    transform-origin: bottom center;
}

@keyframes swing {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    75% { transform: rotate(-5deg); }
}

.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition);
}

.nav-menu a:hover {
    color: var(--primary-light);
}

.btn-primary {
    background: var(--gradient);
    color: white !important;
    padding: 0.6rem 1.25rem;
    border-radius: 12px;
    transition: all var(--transition);
    box-shadow: var(--shadow);
}

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

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* === Hero === */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 100px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.25), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(139, 92, 246, 0.2), transparent),
        radial-gradient(ellipse 50% 30% at 0% 80%, rgba(6, 182, 212, 0.15), transparent);
    z-index: 0;
}

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

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.15;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.btn-hero {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: var(--gradient);
    color: white;
    padding: 1.25rem 2.5rem;
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition);
    margin-bottom: 1.5rem;
}

.btn-hero:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.btn-subtitle {
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.9;
}

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

.hero-stats .counter {
    font-weight: 700;
    color: var(--primary-light);
}

.scroll-down {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--primary);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    text-decoration: none;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* === Sections === */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* === Cards === */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(129, 140, 248, 0.3);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.25rem;
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* === Features === */
.features {
    background: var(--bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.feature-card .card-icon {
    display: block;
}

.highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.highlight-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: var(--radius);
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.highlight-item:hover {
    background: rgba(99, 102, 241, 0.1);
}

.highlight-item i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.highlight-item h4 {
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.highlight-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* === Scenarios === */
.scenarios {
    background: var(--bg-elevated);
}

.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.scenario-card {
    text-align: center;
}

.scenario-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
}

/* === Updates === */
.updates {
    background: var(--bg);
}

.updates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
}

.update-card {
    border-left: 4px solid var(--primary);
}

.update-date {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.update-link {
    display: inline-block;
    margin-top: 0.75rem;
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition);
}

.update-link:hover {
    color: var(--primary);
}

/* === Reviews === */
.reviews {
    background: var(--bg-elevated);
}

.reviews-carousel {
    position: relative;
    padding: 0 56px;
}

.reviews-wrapper {
    overflow: hidden;
}

.reviews-track {
    display: flex;
    gap: 1rem;
    transition: transform 0.4s ease;
}

.review-slide {
    flex: 0 0 calc(33.333% - 0.67rem);
    min-width: 0;
}

.review-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.review-stars {
    font-size: 1.1rem;
    color: #eab308;
    margin-bottom: 1rem;
}

.review-text {
    flex: 1;
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
}

.author-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.author-title {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.carousel-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.08);
}

.carousel-prev { left: 0; }
.carousel-next { right: 0; }

/* === FAQ === */
.faq {
    background: var(--bg);
}

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

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: rgba(129, 140, 248, 0.2);
}

.faq-item summary {
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: background var(--transition);
}

.faq-item summary:hover {
    background: rgba(99, 102, 241, 0.05);
}

.faq-item[open] summary {
    border-bottom: 1px solid var(--border);
}

.faq-item p {
    padding: 1.25rem 1.5rem;
    color: var(--text-muted);
    line-height: 1.8;
}

/* === CTA === */
.cta {
    padding: 100px 0;
    background: var(--gradient-cta);
    text-align: center;
    color: white;
}

.cta h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin-bottom: 0.75rem;
}

.cta p {
    font-size: 1.15rem;
    opacity: 0.95;
    margin-bottom: 1.5rem;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--primary);
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all var(--transition);
    box-shadow: var(--shadow-lg);
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* === Footer === */
.footer {
    background: #020617;
    padding: 64px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-col h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.footer-col p {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.7;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition);
}

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

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    font-size: 0.9rem;
    color: var(--text-dim);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition);
}

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

/* === Back to top === */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}

/* === Animations === */
.feature-card, .scenario-card, .update-card, .review-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Responsive === */
@media (max-width: 768px) {
    .hamburger { display: flex; }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 65px;
        flex-direction: column;
        width: 100%;
        padding: 2rem;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        border-top: 1px solid var(--border);
        transition: left 0.3s ease;
        align-items: center;
    }

    .nav-menu.active { left: 0; }

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

    .section { padding: 64px 0; }

    .section-header { margin-bottom: 2.5rem; }

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

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

    .review-slide {
        flex: 0 0 100%;
    }

    .reviews-carousel {
        padding: 0 44px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

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

@media (max-width: 480px) {
    .container { padding: 0 16px; }

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

    .btn-hero { padding: 1rem 1.5rem; }

    .card { padding: 1.5rem; }
}

/* Character cards section (integrated from character-cards.html) */
.char-cards-section .cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.char-cards-section .character-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all var(--transition);
    cursor: pointer;
}
.char-cards-section .character-card:hover {
    transform: translateY(-6px);
    border-color: rgba(129, 140, 248, 0.3);
    box-shadow: var(--shadow-lg);
}
.char-cards-section .card-image {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
}
.char-cards-section .card-info { padding: 1rem; }
.char-cards-section .card-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.char-cards-section .card-download {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-size: 0.9rem;
}
.char-cards-section .load-more-section {
    text-align: center;
    padding: 2rem 0;
}
.char-cards-section .btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition);
    box-shadow: var(--shadow);
}
.char-cards-section .btn-load-more:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}
@media (max-width: 768px) {
    .char-cards-section .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .char-cards-section .cards-grid { grid-template-columns: 1fr; }
}
