/* ===================================
   AFTERSON - PREMIUM STYLE
   French Social Gaming Platform
   =================================== */

/* CSS Variables */
:root {
    /* Premium Color Palette */
    --primary-color: #d4af37;
    --primary-dark: #b8941f;
    --primary-light: #f0d878;
    
    --background-dark: #1a0e2e;
    --background-secondary: #2d1b3d;
    --background-card: #3a2550;
    
    --text-light: #ffffff;
    --text-muted: #c4b5d8;
    --text-gold: #d4af37;
    
    --border-color: rgba(212, 175, 55, 0.3);
    --shadow-color: rgba(212, 175, 55, 0.1);
    --glow-color: rgba(212, 175, 55, 0.5);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Header */
    --header-height: 70px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 15px;
    --radius-lg: 20px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Mobile Header Height */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }
}

/* ===================================
   RESET & BASE
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    max-width: 100%;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden !important;
    width: 100% !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--background-dark) 0%, var(--background-secondary) 100%);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden !important;
    width: 100% !important;
    min-height: 100vh;
}

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

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

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

button {
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition-normal);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    width: 100%;
}

/* ===================================
   HEADER & NAVIGATION
   =================================== */

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(26, 14, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--border-color);
    z-index: 1000;
    box-shadow: 0 4px 20px var(--shadow-color);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    text-shadow: 0 0 20px var(--glow-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.free-badge {
    background: #10b981;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

/* Desktop Navigation */
.nav-menu {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    list-style: none;
}

.nav-menu li a {
    color: var(--text-light);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.nav-menu li a:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary-color);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    padding: 5px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: var(--transition-normal);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: calc(var(--header-height) - 1px);
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(26, 14, 46, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: var(--spacing-lg) 0;
        gap: 0;
        transform: translateY(-150%);
        opacity: 0;
        transition: all 0.3s ease;
        border-bottom: 2px solid var(--border-color);
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-menu li {
        width: 100%;
        text-align: center;
    }
    
    .nav-menu li a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    }
}

/* ===================================
   HERO SECTION
   =================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 120px;
    padding-bottom: var(--spacing-xl);
    background: url('../images/hero_desktop_bg.png') center/cover;
    background-attachment: scroll;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 14, 46, 0.9) 0%, rgba(45, 27, 61, 0.8) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
    text-shadow: 0 0 30px var(--glow-color);
    background: linear-gradient(135deg, var(--text-light) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    margin-bottom: var(--spacing-lg);
    color: var(--text-muted);
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    display: inline-block;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--background-dark);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5);
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--background-dark);
}

@media (max-width: 768px) {
    .hero {
        padding-top: 100px;
        min-height: calc(100vh - 60px);
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* ===================================
   FEATURES SECTION
   =================================== */

.features-section {
    padding: var(--spacing-xl) 0;
    background: var(--background-dark);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: var(--spacing-xl);
    color: var(--text-light);
    text-shadow: 0 0 20px var(--glow-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: linear-gradient(135deg, var(--background-card) 0%, var(--background-secondary) 100%);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition-normal);
    box-shadow: 0 5px 20px var(--shadow-color);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 40px var(--glow-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-light);
}

.feature-text {
    color: var(--text-muted);
    line-height: 1.8;
}

/* ===================================
   GAMES SECTION
   =================================== */

.games-section {
    padding: var(--spacing-xl) 0;
    background: url('../images/section_bg.png') center/cover;
    background-attachment: scroll;
    position: relative;
}

.games-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 14, 46, 0.95) 0%, rgba(45, 27, 61, 0.95) 100%);
}

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

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

.game-card {
    background: linear-gradient(135deg, var(--background-card) 0%, var(--background-secondary) 100%);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: var(--transition-normal);
    box-shadow: 0 5px 20px var(--shadow-color);
}

.game-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 50px var(--glow-color);
}

.game-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: var(--background-secondary);
}

.game-info {
    padding: var(--spacing-md);
}

.game-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-light);
}

.game-description {
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.game-btn {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--background-dark);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: 0 3px 15px rgba(212, 175, 55, 0.3);
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 25px rgba(212, 175, 55, 0.5);
}

/* ===================================
   FAQ SECTION
   =================================== */

.faq-section {
    padding: var(--spacing-xl) 0;
    background: var(--background-dark);
}

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

.faq-item {
    background: linear-gradient(135deg, var(--background-card) 0%, var(--background-secondary) 100%);
    margin-bottom: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition-normal);
}

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

.faq-question {
    padding: var(--spacing-md);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-light);
    transition: var(--transition-fast);
}

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

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

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

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

.faq-answer-content {
    padding: 0 var(--spacing-md) var(--spacing-md) var(--spacing-md);
    color: var(--text-muted);
    line-height: 1.8;
}

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

/* ===================================
   DISCLAIMER SECTION
   =================================== */

.disclaimer-section {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    padding: var(--spacing-lg) 0;
    border-top: 3px solid var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

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

.disclaimer-content h3 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-md);
}

.disclaimer-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.disclaimer-badges {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--spacing-md);
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* ===================================
   FOOTER
   =================================== */

.footer {
    background: var(--background-dark);
    padding: var(--spacing-xl) 0 var(--spacing-md);
    border-top: 2px solid var(--border-color);
}

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

.footer-section h3,
.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.footer-section p {
    color: var(--text-muted);
    line-height: 1.8;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.compliance-logos {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    flex-wrap: wrap;
    margin-top: var(--spacing-md);
    justify-content: flex-start;
}

/* Убедиться что все ссылки с логотипами правильно отображаются */
.compliance-logos a {
    display: inline-block;
    line-height: 0;
}

/* Улучшенная видимость на мобильных */
@media (max-width: 768px) {
    .compliance-logos {
        gap: var(--spacing-xs);
        justify-content: center;
    }
    
    .compliance-logo {
        height: 35px !important;
        padding: 8px 10px !important;
        max-width: 140px !important;
    }
}

.compliance-logo {
    height: 35px !important;
    width: auto !important;
    max-width: 150px !important;
    background: transparent !important;
    padding: 10px 12px !important;
    border-radius: var(--radius-sm);
    opacity: 1 !important;
    transition: var(--transition-normal);
    border: none !important;
    box-shadow: none !important;
    display: block !important;
    object-fit: contain !important;
}

/* SVG логотипы - оригинальные цвета на прозрачном фоне */
.compliance-logo[src$=".svg"] {
    background: transparent !important;
    padding: 12px 14px !important;
    filter: none !important;
}

/* Специфичные стили для каждого SVG логотипа - оригинальные цвета */
.compliance-logo[src*="logo-anj"],
.compliance-logo[src*="logo-gamblingtherapy"],
.compliance-logo[src*="logo-juegos"],
.compliance-logo[src*="logo-mediateur"] {
    filter: none !important;
}

/* PNG логотипы - прозрачный фон */
.compliance-logo[src$=".png"] {
    background: transparent !important;
    filter: brightness(1) contrast(1.2) !important;
}

.compliance-logo:hover {
    opacity: 1 !important;
    transform: scale(1.05);
    filter: brightness(1.1) contrast(1.1) !important;
}

/* При hover для PNG увеличиваем яркость */
.compliance-logo[src$=".png"]:hover {
    filter: brightness(1.15) contrast(1.2) !important;
}

/* При hover для SVG немного осветляем */
.compliance-logo[src$=".svg"]:hover {
    filter: brightness(1.1) saturate(100%) !important;
}

/* Help Resources - стили для блока с телефоном */
.help-resources {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.help-resources p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

.help-resources a {
    color: var(--primary-color) !important;
    font-weight: bold;
    text-decoration: underline;
}

.help-resources a:hover {
    color: var(--primary-light) !important;
}

.age-restriction {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    border: 3px solid var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 50%;
    display: inline-block;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* ===================================
   POPUPS
   =================================== */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.popup-content {
    background: linear-gradient(135deg, var(--background-card) 0%, var(--background-secondary) 100%);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    border: 2px solid var(--primary-color);
    box-shadow: 0 10px 50px rgba(212, 175, 55, 0.3);
    text-align: center;
}

.popup-content h2 {
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
    font-size: 2rem;
}

.popup-content p {
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
}

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

.popup-btn {
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition-normal);
}

.popup-btn-yes {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--background-dark);
}

.popup-btn-yes:hover {
    transform: scale(1.05);
}

.popup-btn-no {
    background: #dc2626;
    color: white;
}

.popup-btn-no:hover {
    background: #991b1b;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 350px;
    background: linear-gradient(135deg, var(--background-dark) 0%, var(--background-secondary) 100%);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    z-index: 9999;
    box-shadow: 0 10px 40px var(--glow-color);
}

.cookie-banner p {
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
    font-size: 0.9rem;
}

.cookie-banner a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

.cookie-btn {
    flex: 1;
    padding: 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .cookie-banner {
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */

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

.hidden {
    display: none !important;
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

/* ===================================
   ANIMATIONS
   =================================== */

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

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(212, 175, 55, 0.6);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

