:root {
    --primary-color: #FF2E50;
    --primary-hover: #ff4757;
    --dark-bg: #0a0a0a;
    --card-bg: rgba(20, 20, 20, 0.7);
    --text-color: #ffffff;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 30px rgba(255, 46, 80, 0.3);
    --input-bg: rgba(0,0,0,0.4);
}

/* --- РЕЖИМ APPLE LIQUID GLASS (ПАСХАЛКА) --- */
body.apple-glass-mode {
    --primary-color: #007aff;
    --primary-hover: #0056b3;
    --dark-bg: #f5f5f7;
    --card-bg: rgba(255, 255, 255, 0.4);
    --text-color: #1d1d1f;
    --border-color: rgba(255, 255, 255, 0.5);
    --shadow: 0 20px 40px rgba(0,0,0,0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    --input-bg: rgba(255, 255, 255, 0.5);
}

body.apple-glass-mode .parallax-bg {
    background-image: url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=80&w=2000&auto=format&fit=crop'); 
    filter: brightness(1) blur(10px);
}

body.apple-glass-mode .logo { color: #1d1d1f; }
body.apple-glass-mode .progress-container { background-color: rgba(0,0,0,0.1); }
body.apple-glass-mode .question-bubble { 
    background-color: rgba(255,255,255,0.6); 
    border-left: 3px solid var(--primary-color);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-color);
    min-height: 100vh;
    overflow: hidden; 
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.8s ease;
}

/* Параллакс Фон */
.parallax-bg {
    position: absolute; top: -5%; left: -5%; width: 110%; height: 110%;
    background-image: url('https://images.unsplash.com/photo-1550745165-9bc0b252726f?q=80&w=2070&auto=format&fit=crop'); 
    background-size: cover; background-position: center;
    z-index: -1; filter: brightness(0.25); transition: transform 0.1s ease-out, filter 0.8s ease, background-image 0.8s;
}

.container { 
    width: 100%; 
    max-width: 650px; 
    padding: 20px; 
    position: relative; 
    z-index: 10; 
    display: flex; 
    flex-direction: column; 
    justify-content: center;
}

header { text-align: center; margin-bottom: 20px; animation: fadeInDown 1s ease; }

.logo { 
    font-size: 36px; font-weight: 800; color: var(--primary-color); 
    letter-spacing: 4px; text-transform: uppercase; cursor: pointer;
    transition: transform 0.2s, color 0.5s; user-select: none;
}

.logo:hover { transform: scale(1.05); }

@keyframes shake {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
}

.logo.shake { animation: shake 0.5s; color: var(--text-color) !important; }

.subtitle { font-size: 11px; opacity: 0.8; letter-spacing: 2px; margin-top: 5px; font-weight: 600;}

.chat-area {
    background-color: var(--card-bg); 
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: 24px; padding: 35px; 
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color); 
    position: relative; 
    transition: all 0.5s ease;
    max-height: 75vh;
    overflow-y: auto;
}

/* Кастомизация скроллбара */
.chat-area::-webkit-scrollbar { width: 6px; }
.chat-area::-webkit-scrollbar-track { background: transparent; }
.chat-area::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 10px; }

.progress-container { width: 100%; height: 6px; background-color: rgba(255,255,255,0.1); border-radius: 3px; margin-bottom: 30px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--primary-color), var(--primary-hover)); width: 0%; transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); }

.question-wrapper { min-height: 80px; display: flex; align-items: center; margin-bottom: 25px;}

.question-bubble {
    background-color: rgba(255, 255, 255, 0.03); border-left: 3px solid var(--primary-color); padding: 20px;
    border-radius: 12px; font-size: 16px; line-height: 1.6; font-weight: 400; transition: all 0.5s; width: 100%;
}

/* Врапперы для инпутов */
.text-input-wrapper { display: flex; gap: 12px; flex-direction: column; }
.choices-container { display: none; flex-direction: column; gap: 12px; }

textarea {
    width: 100%; background-color: var(--input-bg); border: 1px solid var(--border-color); color: var(--text-color); padding: 18px;
    border-radius: 16px; resize: none; font-family: inherit; font-size: 15px; min-height: 100px; transition: all 0.3s;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

textarea:focus { border-color: var(--primary-color); box-shadow: 0 0 15px rgba(255, 46, 80, 0.1); }
textarea::placeholder { color: var(--text-color); opacity: 0.4; }

.btn-send {
    background-color: var(--primary-color); color: white; border: none; padding: 16px; border-radius: 16px;
    font-weight: 600; font-size: 15px; cursor: pointer; text-transform: uppercase; letter-spacing: 1px; transition: all 0.3s;
    display: flex; justify-content: center; align-items: center; gap: 10px;
}

.btn-send:hover { background-color: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }

.choice-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 15px 20px;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.choice-btn:hover {
    background: rgba(255, 46, 80, 0.1);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

body.apple-glass-mode .choice-btn:hover { background: rgba(0, 122, 255, 0.1); }
.choice-btn i { color: var(--primary-color); font-size: 18px; width: 20px; text-align: center; }

/* Футер и соцсети */
footer { margin-top: 30px; text-align: center; }

.social-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 15px; }
.social-links a { color: var(--text-color); font-size: 22px; opacity: 0.6; transition: all 0.3s; display: inline-block; }
.social-links a:hover { opacity: 1; color: var(--primary-color); transform: scale(1.2) translateY(-3px); }

.privacy-policy-link { margin-bottom: 10px; }
.privacy-policy-link a {
    color: var(--text-color);
    font-size: 11px;
    opacity: 0.5;
    text-decoration: underline;
    transition: opacity 0.3s, color 0.3s;
}
.privacy-policy-link a:hover { opacity: 1; color: var(--primary-color); }

.copyright { font-size: 12px; opacity: 0.4; font-weight: 300;}

.cursor { display: inline-block; width: 2px; height: 16px; background-color: var(--primary-color); animation: blink 1s step-end infinite; vertical-align: middle; margin-left: 5px; }

@keyframes blink { 50% { opacity: 0; } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* Адаптив для мобилок */
@media (max-width: 600px) {
    .chat-area { padding: 20px; border-radius: 16px; }
    .logo { font-size: 28px; }
    .choice-btn { padding: 12px 15px; font-size: 13px; }
}

/* =========================================
   VIP РЕЖИМ (ПАСХАЛКА ОТ МИХАИЛА)
========================================= */
body.vip-mode {
    --primary-color: #FFD700 !important; 
    --primary-hover: #F1C40F !important;
    --shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 60px rgba(255, 215, 0, 0.5) !important;
}

/* Делаем фоновую картинку теплой, золотистой и слегка приближаем */
body.vip-mode .parallax-bg {
    filter: brightness(0.3) sepia(0.8) hue-rotate(5deg) saturate(2.5) !important;
    transition: filter 1.5s ease-in-out, transform 1.5s ease-in-out;
}

/* Золотое свечение и пульсация логотипа */
body.vip-mode .logo {
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    animation: pulseGold 2s infinite;
}

body.vip-mode .question-bubble {
    background-color: rgba(255, 215, 0, 0.05);
}

@keyframes pulseGold {
    0% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
    50% { text-shadow: 0 0 25px rgba(255, 215, 0, 1); }
    100% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
}

/* =========================================
   ПАСХАЛКА: ВЗРЫВ И ПОТРАЧЕНО
========================================= */
body.explosion-shake {
    animation: explodeShake 0.3s infinite;
    background-color: #330000 !important;
}
body.explosion-shake .parallax-bg {
    filter: brightness(0.5) sepia(1) hue-rotate(-50deg) saturate(3) !important;
}

@keyframes explodeShake {
    0% { transform: translate(5px, 5px) rotate(0deg); }
    10% { transform: translate(-5px, -5px) rotate(-1deg); }
    20% { transform: translate(-5px, 5px) rotate(1deg); }
    30% { transform: translate(5px, -5px) rotate(0deg); }
    40% { transform: translate(5px, 5px) rotate(1deg); }
    50% { transform: translate(-5px, 5px) rotate(-1deg); }
    60% { transform: translate(-5px, -5px) rotate(0deg); }
    70% { transform: translate(5px, -5px) rotate(-1deg); }
    80% { transform: translate(-5px, -5px) rotate(1deg); }
    90% { transform: translate(5px, 5px) rotate(0deg); }
    100% { transform: translate(5px, -5px) rotate(-1deg); }
}

#wasted-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.5);
    font-family: 'Impact', 'Arial Black', sans-serif;
    font-size: 90px;
    font-weight: 900;
    color: #cc0000;
    letter-spacing: 5px;
    text-shadow: 3px 3px 0 #000, -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000, 0 0 20px rgba(255,0,0,0.8);
    opacity: 0;
    z-index: 9999;
    pointer-events: none;
    transition: opacity 2s ease-out, transform 2s ease-out;
    text-transform: uppercase;
    text-align: center;
}

@media (max-width: 600px) {
    #wasted-overlay { font-size: 50px; }
}