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

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #e6b800;
    --accent-hover: #f0c000;
    --border: #2a2a2a;
    
    /* Liquid Glass переменные */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: rgba(0, 0, 0, 0.5);
    --glass-blur: 24px;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ===== Анимированный фон для Liquid Glass ===== */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(230, 184, 0, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(100, 100, 255, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(230, 184, 0, 0.03) 0%, transparent 50%);
    animation: liquidShimmer 20s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes liquidShimmer {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    33% {
        transform: translate(2%, -2%) scale(1.05) rotate(2deg);
    }
    66% {
        transform: translate(-1%, 1%) scale(0.95) rotate(-1deg);
    }
    100% {
        transform: translate(1%, 2%) scale(1.02) rotate(1deg);
    }
}

/* ===== Второй слой для глубины ===== */
body::after {
    content: '';
    position: fixed;
    top: -30%;
    left: -30%;
    width: 160%;
    height: 160%;
    background: 
        radial-gradient(circle at 70% 40%, rgba(255, 255, 255, 0.02) 0%, transparent 40%),
        radial-gradient(circle at 30% 80%, rgba(230, 184, 0, 0.03) 0%, transparent 40%);
    animation: liquidShimmer2 25s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes liquidShimmer2 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-2%, 1%) rotate(3deg); }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 1;
}

/* ===== LIQUID GLASS стиль для всех карточек ===== */
.quote-card,
.nav-card,
.stats,
.quote-display,
.episode-card,
.episode-detail {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    box-shadow: 
        0 8px 32px var(--glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 -1px 0 rgba(255, 255, 255, 0.02);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

/* Блик на стекле */
.quote-card::before,
.nav-card::before,
.stats::before,
.quote-display::before,
.episode-card::before,
.episode-detail::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        ellipse at 30% 20%,
        rgba(255, 255, 255, 0.04) 0%,
        transparent 50%
    );
    pointer-events: none;
    transition: all 0.6s ease;
}

.quote-card:hover::before,
.nav-card:hover::before,
.stats:hover::before,
.quote-display:hover::before,
.episode-card:hover::before,
.episode-detail:hover::before {
    background: radial-gradient(
        ellipse at 40% 30%,
        rgba(255, 255, 255, 0.08) 0%,
        transparent 50%
    );
}

/* ===== Индивидуальные стили карточек ===== */

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 60px rgba(230, 184, 0, 0.15);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.unofficial-note {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 0.25rem;
}

/* Quote Card */
.quote-card {
    padding: 3rem 2rem;
    margin: 2rem 0;
    position: relative;
}

.quote-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.quote-icon {
    font-size: 6rem;
    color: var(--accent);
    opacity: 0.2;
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-family: serif;
}

.quote-text {
    font-size: 1.8rem;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.quote-source {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Navigation Cards */
.nav-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.nav-card {
    padding: 2rem;
    text-decoration: none;
    color: var(--text-primary);
    text-align: center;
    cursor: pointer;
}

.nav-card:hover {
    transform: translateY(-5px);
    border-color: rgba(230, 184, 0, 0.3);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.nav-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.nav-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Statistics */
.stats {
    display: flex;
    justify-content: space-around;
    margin: 3rem 0;
    padding: 1.5rem;
}

.stats:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

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

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

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

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(230, 184, 0, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}

/* Footer */
footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.api-info {
    margin-top: 0.5rem;
    font-family: monospace;
}

.api-info code {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

/* ===== Анимация пульсации стекла ===== */
.quote-card,
.nav-card,
.stats {
    animation: glassPulse 8s ease-in-out infinite;
}

@keyframes glassPulse {
    0%, 100% { 
        border-color: var(--glass-border);
    }
    50% { 
        border-color: rgba(255, 255, 255, 0.12);
    }
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .quote-text {
        font-size: 1.3rem;
    }
    
    .nav-links {
        grid-template-columns: 1fr;
    }
    
    .stats {
        flex-direction: column;
        gap: 1rem;
    }
}
