:root {
    --primary: #e11d48;
    --primary-dark: #be123c;
    --secondary: #059669;
    --accent: #e11d48;
    --dark: #1f2937;
    --light: #f8fafc;
    --text: #374151;
    --background: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --header-bg: #fef2f2;
    --error: #ef4444;
}

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

body {
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

h1, h2, h3, h4 {
    font-weight: 600;
    color: var(--dark);
}

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

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
    font-weight: 600;
}

.skip-link:focus {
    top: 6px;
}

/* Progress bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--primary);
    width: 0%;
    z-index: 10000;
    transition: width 0.3s;
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    font-size: 18px;
}

.scroll-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Микро-анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Анимация для карточек */
.feature-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

/* Задержки для последовательного появления */
.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }
.feature-card:nth-child(7) { animation-delay: 0.7s; }
.feature-card:nth-child(8) { animation-delay: 0.8s; }
.feature-card:nth-child(9) { animation-delay: 0.9s; }

/* Анимация для героя */
.hero-content h1 {
    animation: slideInLeft 0.8s ease forwards;
}

.hero-content p {
    animation: slideInRight 0.8s ease forwards 0.2s;
    opacity: 0;
}

.community-banner {
    animation: fadeInUp 0.8s ease forwards 0.4s;
    opacity: 0;
}

/* Улучшенные hover-эффекты */
.feature-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Header Styles - ИСПРАВЛЕННАЯ ВЕРСИЯ */
header {
    background: var(--header-bg);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    padding: 0 5px;
    margin: 0 -5px;
}

.logo {
    display: flex;
    align-items: center;
    color: var(--dark);
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.logo-image {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: contain;
    background: transparent;
}

.brand-container {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: auto;
}

.brand-text {
    font-family: 'Comfortaa', cursive;
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
    text-align: center;
}

.brand-main {
    color: var(--primary);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    font-size: 20px;
}

.brand-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    color: var(--text);
    font-weight: 500;
    margin-top: 1px;
    letter-spacing: 0.5px;
}

.official-logo {
    width: 65px;
    height: 65px;
    margin-right: 12px;
    object-fit: contain;
    background: transparent;
    border-radius: 0;
    flex-shrink: 0;
}

/* Header Right Section Styles */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    margin-left: auto;
}

/* Кнопка переключения темы */
.theme-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(225, 29, 72, 0.1);
    color: var(--primary);
    transform: rotate(15deg);
}

.theme-toggle .fa-sun {
    display: none;
}

body.dark-theme .theme-toggle .fa-moon {
    display: none;
}

body.dark-theme .theme-toggle .fa-sun {
    display: block;
}

/* Time Display Styles */
.time-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.time-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    border: 1px solid var(--border);
    min-width: 180px;
}

.time-item i {
    color: var(--primary);
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.time-label {
    font-weight: 600;
    color: var(--dark);
    min-width: 70px;
}

.time-value {
    font-weight: 700;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.real-time .time-value {
    color: var(--secondary);
}

.game-time .time-value {
    color: var(--primary);
}

/* Hero Time Styles */
.hero-time {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 25px;
}

.hero-time-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    font-weight: 600;
    font-size: 16px;
}

.hero-time-item i {
    color: var(--primary);
    font-size: 20px;
    width: 25px;
}

.hero-time-label {
    font-weight: 600;
    color: var(--dark);
    margin-right: 8px;
}

.hero-time-value {
    font-weight: 700;
    font-family: 'Courier New', monospace;
    font-size: 18px;
}

.hero-real-time .hero-time-value {
    color: var(--secondary);
}

.hero-game-time .hero-time-value {
    color: var(--primary);
}

nav {
    flex: 1;
    margin: 0 20px;
    max-width: 900px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2px;
    justify-content: center;
    align-items: center;
}

/* УВЕЛИЧЕННЫЕ ИКОНКИ И ТЕКСТ В ШАПКЕ - МАКСИМАЛЬНЫЙ РАЗМЕР */
nav ul li a {
    color: var(--text);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 70px;
    text-align: center;
}

/* УВЕЛИЧЕННЫЙ ТЕКСТ ПОД ИКОНКАМИ */
nav ul li a span {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.1;
    text-align: center;
    width: 100%;
}

/* Стиль для активной/главной кнопки */
nav ul li a.active {
    background: var(--primary);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.3);
}

nav ul li a.active:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.4);
}

nav ul li a.active i {
    color: white;
    transform: scale(1.1);
}

/* УВЕЛИЧЕННЫЕ ИКОНКИ */
nav ul li a i {
    font-size: 22px;
    transition: all 0.2s;
}

nav ul li a:not(.active):hover {
    background: rgba(225, 29, 72, 0.1);
    color: var(--primary);
}

nav ul li a:not(.active):hover i {
    transform: translateY(-1px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--light) 0%, #f1f5f9 100%);
    padding: 80px 0;
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.hero-logo {
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    border-radius: 50%;
    object-fit: contain;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-logo::before {
    content: "Дядя Ваня и Юля Мальцевидзе";
    color: #6b7280;
    font-size: 14px;
    display: none;
    position: absolute;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--dark);
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text);
}

/* Community Banner Styles */
.community-banner {
    background: linear-gradient(135deg, #ffffff 0%, #fef7ff 100%);
    border: 2px solid #e11d48;
    border-radius: 16px;
    padding: 30px;
    margin: 40px auto 0;
    max-width: 800px;
    box-shadow: 0 8px 30px rgba(225, 29, 72, 0.15);
}

.banner-header {
    text-align: center;
    margin-bottom: 30px;
}

.banner-header h3 {
    font-size: 1.8rem;
    margin-bottom: 12px;
    color: var(--dark);
}

.banner-header p {
    font-size: 1.1rem;
    color: var(--text);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.benefit:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.benefit i {
    font-size: 1.5rem;
    color: var(--primary);
    width: 30px;
    text-align: center;
}

.benefit span {
    font-weight: 500;
    color: var(--dark);
}

.platforms-section {
    text-align: center;
}

.platforms-title {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--dark);
}

.platform-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== ИСПРАВЛЕНИЕ КНОПОК ===== */
.platform-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-width: 200px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    color: #374151;
}

.platform-btn i {
    font-size: 1.5rem;
    width: 24px;
}

.platform-info {
    text-align: left;
}

.platform-info strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
    color: #1f2937;
}

.platform-info span {
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.8;
    color: #6b7280;
}

/* Цвета для конкретных платформ */
.platform-btn.tg {
    border-color: #0088cc;
    color: #0088cc;
}

.platform-btn.discord {
    border-color: #5865f2;
    color: #5865f2;
}

.platform-btn.vk {
    border-color: #0077ff;
    color: #0077ff;
}

/* Ховер эффекты для кнопок */
.platform-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.platform-btn.tg:hover {
    background: #0088cc;
    color: white;
}

.platform-btn.tg:hover i {
    color: white;
}

.platform-btn.tg:hover .platform-info strong {
    color: white;
}

.platform-btn.tg:hover .platform-info span {
    color: rgba(255,255,255,0.9);
}

.platform-btn.discord:hover {
    background: #5865f2;
    color: white;
}

.platform-btn.discord:hover i {
    color: white;
}

.platform-btn.discord:hover .platform-info strong {
    color: white;
}

.platform-btn.discord:hover .platform-info span {
    color: rgba(255,255,255,0.9);
}

.platform-btn.vk:hover {
    background: #0077ff;
    color: white;
}

.platform-btn.vk:hover i {
    color: white;
}

.platform-btn.vk:hover .platform-info strong {
    color: white;
}

.platform-btn.vk:hover .platform-info span {
    color: rgba(255,255,255,0.9);
}

/* Features Section */
.features {
    padding: 80px 0;
    background: var(--background);
}

.section-title {
    text-align: center;
    margin-bottom: 48px;
    font-size: 2rem;
    color: var(--dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--background);
    padding: 32px 24px;
    border-radius: 12px;
    transition: all 0.2s;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: relative;
    text-align: center;
    will-change: transform;
    overflow: hidden;
}

.feature-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    text-align: center;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary);
    text-align: center;
}

.feature-card h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
    color: var(--dark);
    text-align: center;
}

.feature-card p {
    color: var(--text);
    font-size: 0.95rem;
    text-align: center;
}

/* Platform icons in streams card */
.platform-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.platform-icon {
    font-size: 1.8rem;
    color: var(--primary);
}

/* Social icons in community card */
.social-icons-community {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.social-icon-community {
    font-size: 2rem;
    color: var(--primary);
}

/* Стили для секции живого стрима */
.live-stream {
    background: linear-gradient(135deg, #fff5f5 0%, #fef7ff 100%);
    padding: 60px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stream-header {
    text-align: center;
    margin-bottom: 40px;
}

.stream-header h2 {
    color: #e11d48;
    font-size: 2.2rem;
    margin-bottom: 12px;
    animation: pulse 2s infinite;
}

.stream-header p {
    font-size: 1.1rem;
    color: var(--text);
}

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

.stream-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.stream-player {
    background: var(--dark);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    min-height: 400px;
}

.stream-player iframe {
    width: 100%;
    height: 100%;
    min-height: 500px;
    border: none;
}

.stream-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: white;
    gap: 15px;
}

.stream-loading i {
    font-size: 2rem;
}

.stream-chat {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 600px;
}

.chat-header {
    background: var(--primary);
    color: white;
    padding: 15px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    color: white;
    margin: 0;
    font-size: 1.2rem;
}

.viewer-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 20px;
}

#chatContainer {
    flex: 1;
    overflow: hidden;
}

.chat-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text);
    gap: 15px;
    padding: 20px;
    text-align: center;
}

.chat-placeholder i {
    font-size: 3rem;
    color: var(--border);
}

.stream-info {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    border: 1px solid var(--border);
}

.stream-info h3 {
    color: var(--dark);
    margin-bottom: 10px;
    font-size: 1.3rem;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.stream-info p {
    color: var(--text);
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Стили для фолбэков стрима */
.stream-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #f8fafc;
    border-radius: 12px;
}

.fallback-content {
    text-align: center;
    padding: 40px 20px;
}

.fallback-content h3 {
    color: var(--dark);
    margin-bottom: 10px;
}

.fallback-content p {
    color: var(--text);
    margin-bottom: 25px;
}

.fallback-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.fallback-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.fallback-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.chat-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #f8fafc;
}

.fallback-chat-content {
    text-align: center;
    padding: 20px;
}

.chat-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.chat-link:hover {
    text-decoration: underline;
}

/* Стили для оффлайн секции */
.offline-stream {
    background: var(--light);
    padding: 60px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

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

.offline-icon {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.offline-content h2 {
    color: var(--dark);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.offline-content p {
    color: var(--text);
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.schedule-info {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin: 25px 0;
    border-left: 4px solid var(--primary);
    text-align: center;
}

.schedule-info h3 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.schedule-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin: 10px 0;
}

.schedule-note {
    font-size: 0.9rem;
    color: var(--text);
    opacity: 0.8;
    margin-top: 10px;
}

.notification-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.notify-btn, .youtube-btn {
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
}

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

.notify-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.youtube-btn {
    background: #ff0000;
    color: white;
}

.youtube-btn:hover {
    background: #cc0000;
    transform: translateY(-2px);
}

/* Адаптивность для стримов */
@media (max-width: 1024px) {
    .stream-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stream-chat {
        height: 400px;
    }
    
    .stream-player iframe {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .stream-header h2 {
        font-size: 1.8rem;
    }
    
    .stream-player iframe {
        min-height: 300px;
    }
    
    .stream-chat {
        height: 350px;
    }
    
    .notification-buttons {
        flex-direction: column;
    }
    
    .chat-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .offline-content h2 {
        font-size: 1.5rem;
    }

    .schedule-time {
        font-size: 1.3rem;
    }
}

/* Character Section - ИСПРАВЛЕННАЯ ВЕРСИЯ */
.character {
    padding: 80px 0;
    background: var(--light);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.character-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.character-image {
    width: 100%;
    max-width: 700px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f3f4f6;
    position: relative;
}

/* УБИРАЕМ фиксированную высоту и позволяем изображению масштабироваться */
.character-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.character-image::before {
    content: "Дядя Ваня и Юля Мальцевидзе";
    color: #6b7280;
    font-size: 16px;
    display: none;
    position: absolute;
}

.character-text {
    max-width: 800px;
    text-align: center;
}

.character-text h2 {
    font-size: 2rem;
    margin-bottom: 32px;
    color: var(--dark);
}

.character-text p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text);
    line-height: 1.7;
    text-align: left;
}

.highlight {
    background: #fef2f2;
    padding: 24px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    margin: 24px 0;
    text-align: left;
}

.idea-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed var(--primary);
    cursor: pointer;
    transition: all 0.2s;
}

.idea-link:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--background);
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: var(--primary);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: white;
    margin: 0;
    font-size: 1.3rem;
}

.close-modal {
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-modal:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 30px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    background: var(--background);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.error-message {
    color: var(--error);
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--error);
}

.submit-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.form-success {
    display: none;
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary);
}

.form-success i {
    font-size: 3rem;
    margin-bottom: 20px;
}

.form-success h4 {
    color: var(--secondary);
    margin-bottom: 10px;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 20px;
}

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

.footer-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    object-fit: contain;
    background: #f3f4f6;
    display: block;
    position: relative;
}

.footer-logo::before {
    content: "Логотип Фарм.Троф";
    color: #6b7280;
    font-size: 12px;
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.footer-column h3 {
    margin-bottom: 20px;
    color: var(--light);
    font-size: 1.1rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
}

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

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    cursor: pointer;
}

.footer-column ul li a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-support {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    margin-top: 10px;
}

.footer-support a {
    color: #fbb6ce !important;
    font-weight: 600;
    font-size: 1rem !important;
}

.footer-support a:hover {
    color: #fbcfe8 !important;
}

.social-icons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-icons a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    font-size: 0.85rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-brand-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    text-align: center;
    line-height: 1.2;
    margin-bottom: 8px;
}

.footer-brand-subtext {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 15px;
}

.footer-description {
    color: #d1d5db;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--dark);
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-time-compact {
    display: none;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--header-bg);
    z-index: 1000;
    padding: 80px 20px 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-nav.active {
    transform: translateX(0);
}

/* УВЕЛИЧЕННЫЕ СТИЛИ ДЛЯ МОБИЛЬНОЙ НАВИГАЦИИ */
.mobile-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav ul li a {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    border: 1px solid var(--border);
    transition: all 0.2s;
    font-size: 18px;
}

.mobile-nav ul li a:hover,
.mobile-nav ul li a.active {
    background: var(--primary);
    color: white;
}

/* УВЕЛИЧЕННЫЕ ИКОНКИ В МОБИЛЬНОЙ НАВИГАЦИИ */
.mobile-nav ul li a i {
    width: 28px;
    text-align: center;
    font-size: 22px;
}

.mobile-nav-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--dark);
    cursor: pointer;
}

/* Responsive */
@media (max-width: 1200px) {
    nav {
        max-width: 850px;
    }
    
    nav ul li a {
        font-size: 15px;
        padding: 9px 12px;
        min-width: 65px;
    }
    
    nav ul li a span {
        font-size: 13px;
    }
    
    .brand-text {
        font-size: 16px;
    }
    
    .brand-main {
        font-size: 18px;
    }
}

@media (max-width: 1024px) {
    nav {
        max-width: 800px;
    }
    
    nav ul li a {
        min-width: 60px;
        padding: 8px 11px;
    }
    
    nav ul li a span {
        font-size: 12px;
    }
    
    .brand-text {
        font-size: 15px;
    }
    
    .brand-main {
        font-size: 17px;
    }
    
    /* Время остается видимым на всех экранах */
    .time-item {
        min-width: 160px;
        padding: 6px 12px;
    }
    
    .time-label {
        min-width: 60px;
        font-size: 13px;
    }
    
    .time-value {
        font-size: 13px;
    }
}

@media (max-width: 900px) {
    nav {
        display: none;
    }
    
    .header-content {
        justify-content: space-between;
    }
    
    /* Время скрываем только на мобильных */
    .time-display {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-content {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        padding: 0 !important;
        justify-content: flex-start !important;
        align-items: center !important;
        width: 100% !important;
        grid-template-columns: unset !important;
    }
    
    .brand-container {
        display: none !important;
    }
}

/* ДЕСКТОПНАЯ ВЕРСИЯ - гарантируем правильное отображение */
@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .mobile-nav {
        display: none !important;
    }
    
    /* Скрываем время в геро-секции на десктопе */
    .hero-time {
        display: none;
    }
}

@media (max-width: 480px) {
    .character-image img {
        max-height: none;
    }
    
    .brand-text {
        font-size: 14px;
    }
    
    .brand-main {
        font-size: 16px;
    }
    
    .mobile-menu-toggle {
        font-size: 20px;
        padding: 6px;
    }
    
    .official-logo {
        width: 35px;
        height: 35px;
        margin-right: 8px;
    }
    
    .mobile-nav ul li a {
        padding: 14px 16px;
        font-size: 17px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    /* Community Banner Small Mobile */
    .community-banner {
        padding: 15px;
    }
    
    .banner-header h3 {
        font-size: 1.3rem;
    }
    
    .platform-btn {
        min-width: 100%;
        padding: 12px 15px;
    }
}

@media (max-width: 360px) {
    .brand-text {
        font-size: 13px;
    }
    
    .brand-main {
        font-size: 15px;
    }
    
    .official-logo {
        width: 30px;
        height: 30px;
        margin-right: 6px;
    }
    
    .mobile-menu-toggle {
        font-size: 18px;
        padding: 5px;
    }
    
    .mobile-nav ul li a {
        padding: 12px 14px;
        font-size: 16px;
    }
}

/* ============================================
   АДАПТИВНЫЕ СТИЛИ ДЛЯ ШАПКИ
   ============================================ */

/* Большие экраны (1920px+) - меню растягивается */
@media (min-width: 1920px) {
    header .container {
        max-width: 95% !important;
        padding: 0 2% !important;
    }
    
    .desktop-nav ul {
        justify-content: space-around !important;
        gap: 5px !important;
    }
    
    .desktop-nav ul li a {
        min-width: 75px !important;
        padding: 12px 16px !important;
    }
}

/* Средние экраны (1400px - 1000px) */
@media (max-width: 1400px) and (min-width: 1001px) {
    .brand-text {
        font-size: 16px !important;
    }
    
    .brand-main {
        font-size: 18px !important;
    }
    
    .brand-subtitle {
        font-size: 9px !important;
    }
    
    .time-item {
        min-width: 170px !important;
        padding: 7px 14px !important;
    }
    
    .desktop-nav ul li a {
        min-width: 65px !important;
        padding: 9px 12px !important;
    }
    
    .desktop-nav ul li a span {
        font-size: 13px !important;
    }
}

/* Компактный режим (1000px - 769px) */
@media (max-width: 1000px) and (min-width: 769px) {
    .bear-logo,
    .brand-subtitle {
        display: none !important;
    }
    
    .brand-text {
        font-size: 15px !important;
        text-align: left !important;
    }
    
    .brand-main {
        font-size: 17px !important;
    }
    
    .time-display {
        display: none !important;
    }
    
    .desktop-nav ul li a span {
        display: none !important;
    }
    
    .desktop-nav ul li a {
        min-width: 50px !important;
        padding: 10px 8px !important;
        gap: 0 !important;
    }
    
    .desktop-nav ul li a i {
        font-size: 20px !important;
        margin-bottom: 0 !important;
    }
    
    /* Убираем отступы между иконками меню */
    .desktop-nav ul {
        gap: 1px !important;
    }
}

/* Мобильная версия (≤768px) */
@media (max-width: 768px) {
    /* Скрываем десктопные элементы */
    .desktop-nav,
    .time-display,
    .logo,
    .brand-container {
        display: none !important;
    }
    
    /* Бургер-меню — В ПОТОКЕ, не фиксированное */
    .mobile-menu-toggle {
        display: flex !important;
        position: static !important;
        top: unset !important;
        left: unset !important;
        z-index: auto !important;
        width: auto !important;
        height: auto !important;
        align-items: center !important;
        gap: 5px !important;
        padding: 6px 10px !important;
        font-size: 13px !important;
        flex-shrink: 0 !important;
        background: rgba(225, 29, 72, 0.12) !important;
        border: 1px solid rgba(225, 29, 72, 0.3) !important;
        border-radius: 10px !important;
        color: #e11d48 !important;
        font-weight: 600 !important;
        margin: 0 !important;
    }
    body.dark-theme .mobile-menu-toggle {
        background: rgba(225, 29, 72, 0.2) !important;
        border-color: rgba(225, 29, 72, 0.4) !important;
        color: #fb7185 !important;
    }
    .mobile-menu-toggle i { font-size: 15px !important; }
    .mobile-menu-toggle .menu-label {
        display: inline !important;
        font-size: 13px !important;
        font-weight: 600 !important;
    }
}

/* Очень маленькие экраны (≤480px) */
@media (max-width: 480px) {
    .brand-text {
        font-size: 13px !important;
    }
    
    .brand-main {
        font-size: 15px !important;
    }
    
    .official-logo {
        width: 35px !important;
        height: 35px !important;
        margin-right: 8px !important;
    }
    
    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .mobile-nav {
        width: 90%;
    }
    
    .mobile-nav ul li a {
        padding: 14px 16px;
        font-size: 16px;
        gap: 12px;
    }
    
    .mobile-nav ul li a i {
        font-size: 18px;
    }
}

/* Гарантируем правильное отображение на десктопе */
@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .mobile-nav {
        display: none !important;
    }
    
    .desktop-nav {
        display: block !important;
    }
}

/* ============================================
   ТЕМНАЯ ТЕМА - УБИРАЕМ ПЕРЕОПРЕДЕЛЕНИЕ КНОПОК
   ============================================ */

/* ВАЖНО: Убираем platform-btn из общего списка переопределений */
body.dark-theme .card,
body.dark-theme .panel,
body.dark-theme .box,
body.dark-theme .block,
body.dark-theme .item,
body.dark-theme .element,
body.dark-theme .widget,
body.dark-theme .module,
body.dark-theme .feature-card,
body.dark-theme .benefit,
/* body.dark-theme .platform-btn,  <- УБРАЛИ! */
body.dark-theme .stream-info,
body.dark-theme .schedule-info,
body.dark-theme .stream-chat,
body.dark-theme .stream-fallback,
body.dark-theme .chat-fallback,
body.dark-theme .fallback-content,
body.dark-theme .fallback-chat-content,
body.dark-theme .chat-placeholder,
body.dark-theme .time-item,
body.dark-theme .hero-time-item,
body.dark-theme .community-banner,
body.dark-theme .highlight {
    background: #1e293b !important;
    border-color: #475569 !important;
}

/* ============================================
   СТИЛИ ДЛЯ КНОПОК ПЛАТФОРМ В ТЕМНОЙ ТЕМЕ
   ============================================ */

body.dark-theme .platform-btn {
    background: white !important; /* Оставляем белый фон как в светлой теме */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .platform-btn.tg {
    border-color: #0088cc !important;
    color: #0088cc !important;
}

body.dark-theme .platform-btn.discord {
    border-color: #5865f2 !important;
    color: #5865f2 !important;
}

body.dark-theme .platform-btn.vk {
    border-color: #0077ff !important;
    color: #0077ff !important;
}

body.dark-theme .platform-btn .platform-info strong {
    color: #1f2937 !important;
}

body.dark-theme .platform-btn .platform-info span {
    color: #6b7280 !important;
}

/* Ховер эффекты для темной темы */
body.dark-theme .platform-btn.tg:hover {
    background: #0088cc !important;
    color: white !important;
}

body.dark-theme .platform-btn.tg:hover i {
    color: white !important;
}

body.dark-theme .platform-btn.tg:hover .platform-info strong {
    color: white !important;
}

body.dark-theme .platform-btn.tg:hover .platform-info span {
    color: rgba(255,255,255,0.9) !important;
}

body.dark-theme .platform-btn.discord:hover {
    background: #5865f2 !important;
    color: white !important;
}

body.dark-theme .platform-btn.discord:hover i {
    color: white !important;
}

body.dark-theme .platform-btn.discord:hover .platform-info strong {
    color: white !important;
}

body.dark-theme .platform-btn.discord:hover .platform-info span {
    color: rgba(255,255,255,0.9) !important;
}

body.dark-theme .platform-btn.vk:hover {
    background: #0077ff !important;
    color: white !important;
}

body.dark-theme .platform-btn.vk:hover i {
    color: white !important;
}

body.dark-theme .platform-btn.vk:hover .platform-info strong {
    color: white !important;
}

body.dark-theme .platform-btn.vk:hover .platform-info span {
    color: rgba(255,255,255,0.9) !important;
}

/* Плавные переходы */
body.dark-theme * {
    transition: background-color 0.3s ease, 
                border-color 0.3s ease, 
                color 0.3s ease,
                box-shadow 0.3s ease;
}


/* ============================================================ */
/* Кнопки чата/админа: позиционирование УДАЛЕНО 11.07.2026.
   position:fixed !important вырывал кнопки из обёрток .chat-fab/.feedback-fab
   шаблона pages/template.php — на телефоне кнопки разлетались по экрану.
   Единственный хозяин этих кнопок — pages/template.php. Тут их НЕ стилизуем.
   Кнопка «наверх» (scroll-to-top) — оставлена как была. */
/* ============================================================ */
.scroll-to-top,
#scrollToTop {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    z-index: 9999 !important;
}

@media (max-width: 768px) {
    .scroll-to-top, #scrollToTop {
        bottom: 20px !important;
        right: 16px !important;
    }
}

/* ════════════════════════════════════════════════════════════════
   КОМПЛЕКСНОЕ ИСПРАВЛЕНИЕ МОБИЛЬНОГО МЕНЮ v3 (24.03.2026)
   Проблемы:
   1. Кнопка меню перекрыта Яндекс рекламным оверлеем
   2. .mobile-nav.active не имеет display правила
   3. Широкие элементы создают горизонтальный скролл
   ════════════════════════════════════════════════════════════════ */

/* 1. ЗАПРЕТ ГОРИЗОНТАЛЬНОГО СКРОЛЛА НА МОБИЛКЕ */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
}

/* 2. КНОПКА БУРГЕР-МЕНЮ — ПОВЕРХ ВСЕГО */
.mobile-menu-toggle {
    position: fixed !important;
    z-index: 2147483646 !important;
    pointer-events: auto !important;
}

/* 3. МОБИЛЬНОЕ МЕНЮ — СТИЛИ ПО УМОЛЧАНИЮ (скрыто) */
.mobile-nav {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    z-index: 2147483647 !important;
    transform: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    background: rgba(0, 0, 0, 0.95) !important;
}

/* 4. МОБИЛЬНОЕ МЕНЮ — ВИДИМОЕ КОГДА АКТИВНО */
.mobile-nav.active {
    display: block !important;
}

/* 5. КНОПКА ЗАКРЫТИЯ ВНУТРИ МЕНЮ */
.mobile-nav-close {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 2147483647 !important;
    pointer-events: auto !important;
}

/* 6. УБИВАЕМ РЕКЛАМНЫЕ ОВЕРЛЕИ ПОВЕРХ КНОПКИ */
#preact-border-shadow-host {
    pointer-events: none !important;
}

/* 7. ОГРАНИЧЕНИЕ ШИРИНЫ ШИРОКИХ ЭЛЕМЕНТОВ НА МОБИЛКЕ */
@media (max-width: 768px) {
    iframe, .stream-player, .stream-player iframe,
    .community-banner, .platform-buttons, .hero-time,
    .features-grid, video, object, embed {
        max-width: 100% !important;
        overflow: hidden !important;
    }

    iframe[src*="vk.com"], iframe[src*="vkvideo"],
    iframe[src*="youtube"], iframe[src*="twitch"] {
        max-width: 100vw !important;
        width: 100% !important;
    }

    .container {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    /* Шапка на мобильном - без обрезки содержимого */
    .header-right {
        flex-shrink: 0 !important;
        position: relative !important;
        z-index: 10 !important;
    }

    .theme-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        flex-shrink: 0 !important;
    }
}

/* ===== ПРИНУДИТЕЛЬНАЯ ВИДИМОСТЬ КНОПКИ ТЕМЫ НА МОБИЛКЕ ===== */
@media (max-width: 768px) {
    #themeToggle,
    button.theme-toggle,
    .theme-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        flex-shrink: 0 !important;
        width: auto !important;
        height: auto !important;
        min-width: 36px !important;
        min-height: 36px !important;
        position: relative !important;
        z-index: 100 !important;
        pointer-events: auto !important;
        overflow: visible !important;
        order: 99 !important;
    }
}
