/* Современный темный дизайн для FAQ в стиле 2026 */

:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    --bg-main: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 30%, #0f172a 60%, #1e293b 100%);
    --bg-size: 400% 400%;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;
    
    --card-bg: rgba(15, 23, 42, 0.8);
    --card-border: rgba(99, 102, 241, 0.3);
    --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 60px rgba(99, 102, 241, 0.3);
    
    --header-bg: rgba(15, 23, 42, 0.9);
    --header-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background: var(--bg-main);
    background-size: var(--bg-size);
    animation: gradientShift 15s ease infinite;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Декоративные элементы фона */
.bg-lights {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-light {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: floatLight 14s infinite alternate ease-in-out, glowPulse 6s infinite alternate;
}

.bg-light1 { width: 340px; height: 340px; background: #6366f1; left: 4vw; top: 12vh; animation-delay: 0s, 0s; }
.bg-light2 { width: 220px; height: 220px; background: #10b981; right: 7vw; top: 32vh; animation-delay: 2s, 1.5s; }
.bg-light3 { width: 180px; height: 180px; background: #f59e0b; left: 38vw; bottom: 8vh; animation-delay: 4s, 2.5s; }
.bg-light4 { width: 120px; height: 120px; background: #4f46e5; right: 18vw; bottom: 12vh; animation-delay: 6s, 3.5s; }
.bg-light5 { width: 90px; height: 90px; background: #6366f1; left: 60vw; top: 18vh; animation-delay: 8s, 4.5s; }

@keyframes floatLight {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-40px) scale(1.08); }
}

@keyframes glowPulse {
    0% { opacity: 0.15; }
    50% { opacity: 0.25; }
    100% { opacity: 0.15; }
}

/* Header */
.header {
    width: 100%;
    background: var(--header-bg);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--header-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 32px;
    height: 64px;
}

.logo {
    font-weight: 800;
    font-size: 1.35rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.nav a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav a:hover, .nav a.active {
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.1);
}

.nav a:hover::before, .nav a.active::before {
    width: 80%;
}

/* Main */
main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    position: relative;
    z-index: 2;
    padding: 40px 20px;
}

.faq-title {
    font-size: 3rem;
    font-weight: 900;
    margin-top: 32px;
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--primary) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.faq-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 48px;
    text-align: center;
    max-width: 600px;
    line-height: 1.6;
}

/* FAQ Cards Container */
.faq-items-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
    margin-top: 32px;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
}

.faq-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.faq-link:hover, .faq-link:focus {
    transform: translateY(-8px) scale(1.02);
    z-index: 2;
}

.faq-card {
    background: var(--card-bg);
    backdrop-filter: blur(40px) saturate(180%);
    border-radius: 20px;
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    padding: 32px 28px;
    height: 220px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
}

.faq-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.faq-link:hover .faq-card, .faq-link:focus .faq-card {
    border-color: var(--primary-light);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 80px rgba(99, 102, 241, 0.4);
}

.faq-link:hover .faq-card::before, .faq-link:focus .faq-card::before {
    transform: scaleX(1);
}

.faq-icon {
    font-size: 2.5rem;
    color: var(--primary-light);
    margin-bottom: 20px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.6));
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.faq-link:hover .faq-icon, .faq-link:focus .faq-icon {
    color: var(--primary);
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 4px 16px rgba(99, 102, 241, 0.8));
}

.faq-card-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.3;
    color: var(--text-main);
}

.faq-card-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0;
    word-break: break-word;
}

/* Tooltip */
.faq-tooltip {
    visibility: hidden;
    opacity: 0;
    background: var(--primary);
    color: #fff;
    text-align: center;
    border-radius: 12px;
    padding: 12px 20px;
    position: absolute;
    left: 50%;
    bottom: 110%;
    transform: translateX(-50%);
    z-index: 10;
    font-size: 0.95rem;
    font-weight: 600;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.6);
    white-space: pre-line;
    max-width: 250px;
    backdrop-filter: blur(10px);
}

.faq-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--primary);
}

.faq-link:hover .faq-tooltip, .faq-link:focus .faq-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
}

/* Fun Pics Block */
.fun-pics-block {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 36px;
    margin: 60px 0 0 0;
    flex-wrap: wrap;
}

.fun-pic {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: var(--card-bg);
    backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--card-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.fun-pic::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fun-pic:hover, .fun-pic:focus {
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.5);
    transform: scale(1.1) rotate(5deg);
    border-color: var(--primary-light);
    z-index: 2;
}

.fun-pic:hover::before, .fun-pic:focus::before {
    opacity: 0.1;
}

.fun-pic img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    user-select: none;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.fun-pic-tip {
    visibility: hidden;
    opacity: 0;
    background: var(--primary);
    color: #fff;
    text-align: center;
    border-radius: 12px;
    padding: 12px 20px;
    position: absolute;
    left: 50%;
    bottom: 110%;
    transform: translateX(-50%);
    z-index: 10;
    font-size: 0.95rem;
    font-weight: 600;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.6);
    white-space: pre-line;
    max-width: 250px;
    backdrop-filter: blur(10px);
}

.fun-pic-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--primary);
}

.fun-pic:hover .fun-pic-tip, .fun-pic:focus .fun-pic-tip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
}


/* Анимации появления */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-link {
    animation: fadeInUp 0.6s ease-out backwards;
}

.faq-link:nth-child(1) { animation-delay: 0.1s; }
.faq-link:nth-child(2) { animation-delay: 0.2s; }
.faq-link:nth-child(3) { animation-delay: 0.3s; }
.faq-link:nth-child(4) { animation-delay: 0.4s; }
.faq-link:nth-child(5) { animation-delay: 0.5s; }

/* Адаптивность */
@media (max-width: 900px) {
    .faq-items-container {
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 600px;
    }
    
    .faq-link {
        width: 100%;
    }
    
    .header-inner {
        padding: 0 20px;
        flex-wrap: wrap;
    }
    
    .nav {
        gap: 16px;
    }
    
    .fun-pics-block {
        gap: 24px;
    }
}

@media (max-width: 600px) {
    .faq-title {
        font-size: 2rem;
        margin-top: 24px;
    }
    
    .faq-subtitle {
        font-size: 1.1rem;
        margin-bottom: 32px;
    }
    
    .faq-card {
        padding: 24px 20px;
        height: 200px;
    }
    
    .faq-icon {
        font-size: 2rem;
        margin-bottom: 16px;
    }
    
    .faq-card-title {
        font-size: 1.15rem;
    }
    
    .faq-card-desc {
        font-size: 0.95rem;
    }
    
    .header-inner {
        flex-direction: column;
        height: auto;
        gap: 12px;
        padding: 16px 20px;
    }
    
    .nav {
        width: 100%;
        justify-content: center;
        gap: 12px;
    }
    
    .nav a {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
    
    .fun-pic {
        width: 80px;
        height: 80px;
    }
    
    .fun-pic img {
        width: 55px;
        height: 55px;
    }
}

