/* === ОСНОВНЫЕ СТИЛИ И ПЕРЕМЕННЫЕ === */
:root {
    --bg: #f4f7f3;
    --card: rgba(255,255,255,0.76);
    --accent: #2563eb;
    --bamboo: #8fbf88;
    --bamboo-dark: #5e8a5b;
    --bamboo-light: #a8d5a0;
    --muted: #6b7280;
    --radius: 14px;
    --glass-blur: 6px;
    --font-sans: 'Inter', 'Segoe UI', Roboto, Arial, system-ui, -apple-system;
    --font-heading: 'Merriweather', Georgia, serif;
}

/* СБРОС И БАЗОВЫЕ СТИЛИ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    color: #0f172a;
    background: url('images/f8263280-16bb-442e-8457-0d156df7bb1b.png') center center/cover no-repeat fixed !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.06));
    pointer-events: none;
    z-index: 0;
}

/* === ГЛАВНОЕ ПОЛЕ С ТЕКСТУРОЙ БАМБУКА И ШРИФТОМ ГРИФЕЛЕМ === */
main {
    max-width: 880px;
    margin: 48px auto;
    padding: 36px;
    background: 
        linear-gradient(180deg, rgba(255,255,255,0.4), rgba(250,250,248,0.3)),
        url('images/bamboo-texture.jpg');
    background-size: cover;
    box-shadow: 0 12px 40px rgba(15,23,42,0.08);
    border-radius: var(--radius);
    position: relative;
    z-index: 2;
    backdrop-filter: blur(var(--glass-blur));
    border: 4px solid #000000;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: 400;
    letter-spacing: 0.3px;
    line-height: 1.6;
    text-shadow: 0.5px 0.5px 1px rgba(0,0,0,0.1);
    flex: 1 0 auto;
}

h1 {
    color: var(--bamboo-dark);
    margin-top: 0;
    font-size: 2.2rem;
    letter-spacing: 0.2px;
    font-family: var(--font-heading);
    font-weight: 700;
}

button {
    background: var(--accent);
    border: none;
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

#out {
    margin-top: 14px;
    color: var(--muted);
}

.features {
    margin-top: 8px;
}

.features h2 {
    font-size: 1.1rem;
    color: #0f172a;
    margin-bottom: 8px;
}

.features ul {
    padding-left: 0;
    margin: 0 0 12px 0;
}

.features li {
    list-style: none;
    padding: 12px 0;
    border-bottom: 1px solid rgba(15,23,42,0.04);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--muted);
}

.features li:last-child {
    border-bottom: 0;
}

.features li::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-top: 4px;
    margin-right: 8px;
    border-radius: 3px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%235e8a5b' d='M12 2c4 0 9 4 9 9s-4 9-9 9-9-4-9-9 4-9 9-9z'/></svg>");
    background-size: cover;
}

.features a {
    color: var(--bamboo-dark);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.features a:hover {
    color: var(--bamboo);
    text-decoration: underline;
}

.site-footer {
    max-width: 780px;
    margin: 18px auto 20px;
    padding: 12px 16px;
    color: #0f172a;
    text-align: center;
    position: relative;
    z-index: 2;
    margin-top: auto;
    flex-shrink: 0;
}

.site-footer a {
    color: var(--accent);
    text-decoration: none;
}

.site-footer p {
    margin: 6px 8px;
    display: inline-block;
}

.site-footer a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    background: var(--bamboo-dark);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(79,128,86,0.12);
    transition: transform .14s ease, box-shadow .18s ease, opacity .14s ease;
    position: relative;
    overflow: visible;
}

.site-footer a::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    pointer-events: none;
    background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(255,255,255,0.32), rgba(255,255,255,0.06) 40%, transparent 60%);
    opacity: 0;
    transform: scale(0.98);
    transition: opacity .28s cubic-bezier(.2,.9,.2,1), transform .28s cubic-bezier(.2,.9,.2,1);
    z-index: 0;
}

.site-footer a:hover {
    transform: translateY(-3px);
    opacity: 0.98;
}

.site-footer a:hover::after {
    opacity: 1;
    transform: scale(1);
}

.site-footer a:active {
    transform: translateY(-1px);
}

.site-footer a span {
    position: relative;
    z-index: 1;
}

.btn-link {
    text-decoration: none !important;
    display: block;
    max-width: 300px;
    margin: 0 auto;
}

#btn {
    background: var(--bamboo-dark);
    box-shadow: 0 8px 20px rgba(79,128,86,0.12);
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

#btn:hover {
    transform: translateY(-2px);
}

.sound-controls {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bamboo-dark);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 8px 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.3);
}

.sound-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bamboo);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.sound-toggle:hover {
    transform: scale(1.1);
    opacity: 1;
    background: var(--bamboo-light);
}

.sound-toggle.muted {
    opacity: 0.5;
    background: var(--muted);
}

.volume-slider {
    width: 100px;
    height: 6px;
    border-radius: 20px;
    background: rgba(255,255,255,0.3);
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bamboo);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    border: 2px solid white;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: var(--bamboo-light);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bamboo);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

.volume-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    background: var(--bamboo-light);
}

.volume-slider::-webkit-slider-track {
    background: rgba(255,255,255,0.3);
    border-radius: 20px;
    height: 6px;
}

.volume-slider::-moz-range-track {
    background: rgba(255,255,255,0.3);
    border-radius: 20px;
    height: 6px;
    border: none;
}

#happBtn {
    background: var(--bamboo-dark);
    box-shadow: 0 8px 20px rgba(79,128,86,0.12);
    width: 100%;
    max-width: 300px;
    margin: 10px auto;
    display: block;
}

#happBtn:hover {
    transform: translateY(-2px);
    background: var(--bamboo);
}

.faq-section {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius);
    backdrop-filter: blur(5px);
}

.faq-section h2 {
    color: var(--bamboo-dark);
    margin-bottom: 20px;
    text-align: center;
}

.search-faq {
    margin-bottom: 20px;
    text-align: center;
}

#faqSearch {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    border: 2px solid var(--bamboo);
    border-radius: 8px;
    background: rgba(255,255,255,0.9);
    font-size: 16px;
    transition: all 0.3s ease;
}

#faqSearch:focus {
    outline: none;
    border-color: var(--bamboo-dark);
    box-shadow: 0 0 0 3px rgba(94,138,91,0.1);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.faq-question {
    padding: 16px 20px;
    background: var(--bamboo-dark);
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '+';
    font-size: 20px;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.faq-item.active .faq-answer {
    padding: 16px 20px;
    max-height: 500px;
}

.language-switcher {
    text-align: center;
    margin: 20px 0;
}

.lang-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid var(--bamboo);
    color: var(--bamboo-dark);
    padding: 8px 16px;
    margin: 0 5px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.lang-btn.active {
    background: var(--bamboo-dark);
    color: white;
    border-color: var(--bamboo-dark);
}

.lang-btn:hover {
    background: var(--bamboo);
    color: white;
}

.notification-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    width: 90%;
    max-width: 400px;
}

.notification {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-left: 4px solid var(--bamboo-dark);
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification.success {
    border-left-color: #10b981;
}

.notification.error {
    border-left-color: #ef4444;
}

.notification.warning {
    border-left-color: #f59e0b;
}

.notification-icon {
    font-size: 20px;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.notification-message {
    font-size: 14px;
    color: var(--muted);
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--muted);
    padding: 0;
    width: 24px;
    height: 24px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pwa-install-btn {
    position: fixed;
    bottom: 100px;
    right: 24px;
    z-index: 999;
}

.pwa-install-btn button {
    background: var(--bamboo-dark);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.pwa-install-btn button:hover {
    background: var(--bamboo);
    transform: translateY(-2px);
}

.offline-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ef4444;
    color: white;
    text-align: center;
    padding: 10px;
    z-index: 10001;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.floating-chat-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(15,23,42,0.16);
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
    opacity: 0.95;
    cursor: pointer;
    background: var(--bamboo-dark);
}

.floating-chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(15,23,42,0.24);
    opacity: 1;
}

.floating-chat-btn:active {
    transform: scale(0.98);
}

.logo-icon {
    border: none;
    padding: 2px;
    background: #ffffff;
    border-radius: 6px;
    vertical-align: middle;
    margin-left: 10px;
    display: inline-block;
    box-sizing: content-box;
}

.ping-wave-animation {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 25px auto;
    display: none;
}

.wave-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 4px solid var(--bamboo-light);
    border-radius: 50%;
    animation: wavePulse 2s infinite;
}

.wave-circle:nth-child(1) {
    width: 60px;
    height: 60px;
    animation-delay: 0s;
}

.wave-circle:nth-child(2) {
    width: 100px;
    height: 100px;
    animation-delay: 0.3s;
}

.wave-circle:nth-child(3) {
    width: 140px;
    height: 140px;
    animation-delay: 0.6s;
}

.ping-value-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.ping-value-animated {
    font-size: 28px;
    font-weight: 900;
    color: var(--bamboo-dark);
    transition: all 0.2s ease;
}

@keyframes wavePulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.6);
        opacity: 0;
    }
}

.ping-panda{
    position: fixed;
    left: 51px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    cursor: pointer;
    width: 180px;
    height: 360px;
}
.panda-img{
    position: absolute;
    left: -105px;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: auto;
    transition: transform .5s cubic-bezier(.34,1.56,.64,1);
}
.ping-panda.active .panda-img{
    transform: translateY(-50%) translateX(-20px);
}
.ping-panel{
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(-110px);
    background: #fff;
    border: 3px solid #000;
    border-radius: 16px;
    padding: 18px 22px;
    width: 210px;
    opacity: 0;
    visibility: hidden;
    transition: all .5s cubic-bezier(.34,1.56,.64,1);
    box-shadow: 0 15px 55px rgba(0,0,0,.5);
    font-size: 14px;
}
.ping-panda.active .ping-panel{
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-95px);
}

.ping-choice button{
    width: 100%;
    padding: 14px;
    margin: 8px 0;
    background: var(--bamboo-dark);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ping-choice button:hover {
    background: var(--bamboo);
    transform: translateY(-2px);
}

.ping-result{text-align: center;}
.ping-title{
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 10px;
    color: #0f172a;
}
#pingValue{
    font-size: 26px;
    font-weight: 900;
    margin: 20px 0;
    color: var(--bamboo-dark);
}
.ping-rating{
    font-size: 14px;
    margin: 10px 0;
    color: #6b7280;
    transition: color 0.3s ease;
}

.ping-back{
    background: var(--bamboo-dark) !important;
    padding: 11px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.ping-back:hover {
    background: var(--bamboo) !important;
}

#termsPopup {
    position: fixed;
    bottom: 90px;
    left: 24px;
    width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.2);
    z-index: 1000;
    border: 1px solid rgba(0,0,0,0.1);
    overflow: hidden;
    
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

#termsPopup.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

#termsPopup .popup-content {
    padding: 20px;
}

#termsPopup p {
    margin: 0 0 16px 0;
    line-height: 1.5;
    color: #0f172a;
    font-size: 14px;
}

#termsPopup a {
    color: var(--bamboo-dark);
    text-decoration: underline;
    font-weight: 600;
}

.close-terms {
    width: 100%;
    padding: 10px;
    background: var(--bamboo-dark);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.close-terms:hover {
    background: var(--bamboo);
}

.wind-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.bamboo-leaf {
    position: absolute;
    background-image: url('images/bamboo-leaf.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0;
    filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.3));
    top: -100px;
    left: -100px;
}

.bamboo-leaf.small {
    width: 45px;
    height: 45px;
    opacity: 0.6;
}

.bamboo-leaf.medium {
    width: 65px;
    height: 65px;
    opacity: 0.7;
}

.bamboo-leaf.large {
    width: 85px;
    height: 85px;
    opacity: 0.8;
}

@keyframes leafFloat1 {
    0% {
        transform: translateX(-200px) translateY(-100px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateX(calc(100vw + 200px)) translateY(calc(100vh + 200px)) rotate(360deg);
        opacity: 0;
    }
}

@keyframes leafFloat2 {
    0% {
        transform: translateX(-200px) translateY(110vh) rotate(180deg);
        opacity: 0;
    }
    15% {
        opacity: 0.6;
    }
    85% {
        opacity: 0.4;
    }
    100% {
        transform: translateX(calc(100vw + 150px)) translateY(-150px) rotate(540deg);
        opacity: 0;
    }
}

@keyframes leafFloat3 {
    0% {
        transform: translateX(120vw) translateY(-100px) rotate(90deg);
        opacity: 0;
    }
    8% {
        opacity: 0.8;
    }
    92% {
        opacity: 0.6;
    }
    100% {
        transform: translateX(-250px) translateY(calc(100vh + 180px)) rotate(450deg);
        opacity: 0;
    }
}

@keyframes leafFloat4 {
    0% {
        transform: translateX(80vw) translateY(-100px) rotate(270deg);
        opacity: 0;
    }
    12% {
        opacity: 0.9;
    }
    88% {
        opacity: 0.7;
    }
    100% {
        transform: translateX(100vw) translateY(calc(100vh + 250px)) rotate(630deg);
        opacity: 0;
    }
}

@keyframes leafFloat5 {
    0% {
        transform: translateX(-100px) translateY(-100px) rotate(45deg);
        opacity: 0;
    }
    5% {
        opacity: 0.6;
    }
    95% {
        opacity: 0.4;
    }
    100% {
        transform: translateX(90vw) translateY(calc(100vh + 300px)) rotate(405deg);
        opacity: 0;
    }
}

@keyframes leafFloat6 {
    0% {
        transform: translateX(110vw) translateY(-100px) rotate(135deg);
        opacity: 0;
    }
    18% {
        opacity: 0.7;
    }
    82% {
        opacity: 0.5;
    }
    100% {
        transform: translateX(-180px) translateY(calc(100vh + 220px)) rotate(495deg);
        opacity: 0;
    }
}

@keyframes leafFloat7 {
    0% {
        transform: translateX(50vw) translateY(-100px) rotate(315deg);
        opacity: 0;
    }
    7% {
        opacity: 0.8;
    }
    93% {
        opacity: 0.6;
    }
    100% {
        transform: translateX(70vw) translateY(calc(100vh + 280px)) rotate(675deg);
        opacity: 0;
    }
}

@keyframes leafFloat8 {
    0% {
        transform: translateX(-120px) translateY(-100px) rotate(225deg);
        opacity: 0;
    }
    20% {
        opacity: 0.9;
    }
    80% {
        opacity: 0.7;
    }
    100% {
        transform: translateX(130vw) translateY(calc(100vh + 350px)) rotate(585deg);
        opacity: 0;
    }
}

.leaf-animation-1 { animation: leafFloat1 35s linear infinite; }
.leaf-animation-2 { animation: leafFloat2 40s linear infinite; }
.leaf-animation-3 { animation: leafFloat3 45s linear infinite; }
.leaf-animation-4 { animation: leafFloat4 38s linear infinite; }
.leaf-animation-5 { animation: leafFloat5 42s linear infinite; }
.leaf-animation-6 { animation: leafFloat6 37s linear infinite; }
.leaf-animation-7 { animation: leafFloat7 44s linear infinite; }
.leaf-animation-8 { animation: leafFloat8 39s linear infinite; }
.leaf-animation-9 { animation: leafFloat9 36s linear infinite; }
.leaf-animation-10 { animation: leafFloat10 41s linear infinite; }
.leaf-animation-11 { animation: leafFloat11 43s linear infinite; }
.leaf-animation-12 { animation: leafFloat12 39s linear infinite; }
.leaf-animation-13 { animation: leafFloat13 37s linear infinite; }
.leaf-animation-14 { animation: leafFloat14 42s linear infinite; }
.leaf-animation-15 { animation: leafFloat15 38s linear infinite; }
.leaf-animation-16 { animation: leafFloat16 44s linear infinite; }

.leaf-delay-0 { animation-delay: 0s; }
.leaf-delay-1 { animation-delay: 1s; }
.leaf-delay-2 { animation-delay: 2s; }
.leaf-delay-3 { animation-delay: 3s; }
.leaf-delay-4 { animation-delay: 4s; }
.leaf-delay-5 { animation-delay: 5s; }
.leaf-delay-6 { animation-delay: 6s; }
.leaf-delay-7 { animation-delay: 7s; }
.leaf-delay-8 { animation-delay: 8s; }
.leaf-delay-9 { animation-delay: 9s; }
.leaf-delay-10 { animation-delay: 10s; }
.leaf-delay-11 { animation-delay: 11s; }
.leaf-delay-12 { animation-delay: 12s; }
.leaf-delay-13 { animation-delay: 13s; }
.leaf-delay-14 { animation-delay: 14s; }
.leaf-delay-15 { animation-delay: 15s; }
.leaf-delay-16 { animation-delay: 16s; }
.leaf-delay-17 { animation-delay: 17s; }
.leaf-delay-18 { animation-delay: 18s; }
.leaf-delay-19 { animation-delay: 19s; }
.leaf-delay-20 { animation-delay: 20s; }
.leaf-delay-21 { animation-delay: 21s; }
.leaf-delay-22 { animation-delay: 22s; }
.leaf-delay-23 { animation-delay: 23s; }
.leaf-delay-24 { animation-delay: 24s; }
.leaf-delay-25 { animation-delay: 25s; }
.leaf-delay-26 { animation-delay: 26s; }
.leaf-delay-27 { animation-delay: 27s; }
.leaf-delay-28 { animation-delay: 28s; }
.leaf-delay-29 { animation-delay: 29s; }
.leaf-delay-30 { animation-delay: 30s; }

/* === СТИЛИ ДЛЯ ЧАТА === */
.chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    background: var(--bamboo-dark);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1001;
}

.chat-toggle:hover {
    transform: scale(1.1);
    background: var(--bamboo);
}

.chat-toggle-line {
    width: 20px;
    height: 2px;
    background: white;
    margin: 2px 0;
    border-radius: 1px;
}

.chat-toggle-line:nth-child(1) {
    margin-top: 0;
}

.chat-toggle-line:nth-child(3) {
    margin-bottom: 0;
}

.chat-container {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 320px;
    height: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid var(--bamboo-dark);
    z-index: 1000;
}

.chat-container.active {
    display: flex;
    animation: chatSlideUp 0.3s ease;
}

@keyframes chatSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-header {
    background: var(--bamboo-dark);
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-admin-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.chat-admin-btn:hover {
    background: rgba(255,255,255,0.3);
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-messages {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background: #f8f9fa;
}

.system-message {
    text-align: center;
    margin-bottom: 12px;
}

.system-message p {
    background: var(--bamboo-light);
    color: var(--bamboo-dark);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    margin: 0;
}

.message {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    position: relative;
}

.message.moderated {
    opacity: 0.6;
}

.message.moderated .message-text {
    background: #fef2f2;
    color: #dc2626;
    text-decoration: line-through;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.message-username {
    font-weight: 600;
    font-size: 13px;
    color: #0f172a;
}

.message-role {
    font-size: 12px;
}

.message-text {
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    border: 1px solid #e5e7eb;
}

.message-time {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

.message-actions {
    position: absolute;
    top: 0;
    right: 0;
    display: none;
    gap: 4px;
}

.message:hover .message-actions {
    display: flex;
}

.message-action {
    background: rgba(0,0,0,0.7);
    border: none;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.message-action:hover {
    background: rgba(0,0,0,0.9);
}

.chat-input-container {
    display: flex;
    padding: 12px;
    background: white;
    border-top: 1px solid #e5e7eb;
    gap: 8px;
}

#chatInput {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

#chatInput:focus {
    border-color: var(--bamboo);
}

#chatSend {
    background: var(--bamboo-dark);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

#chatSend:hover {
    background: var(--bamboo);
}

/* === СТИЛИ ДЛЯ МОДАЛЬНЫХ ОКОН === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.admin-panel {
    max-width: 600px;
    max-height: 80vh;
}

.modal-header {
    background: var(--bamboo-dark);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--bamboo);
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #0f172a;
}

.username-suggestions {
    margin-top: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    max-height: 120px;
    overflow-y: auto;
    display: none;
}

.username-suggestions.active {
    display: block;
}

.username-suggestion {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}

.username-suggestion:last-child {
    border-bottom: none;
}

.username-suggestion:hover {
    background: #f3f4f6;
}

.avatar-upload {
    margin-bottom: 16px;
}

.avatar-upload label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #0f172a;
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 8px;
    border: 2px solid var(--bamboo);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--bamboo-dark);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--bamboo);
}

.btn-secondary {
    width: 100%;
    padding: 8px 12px;
    background: #f3f4f6;
    color: #0f172a;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.modal-footer {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.modal-footer a {
    color: var(--bamboo-dark);
    text-decoration: none;
    font-weight: 600;
}

.modal-footer a:hover {
    text-decoration: underline;
}

/* === СТИЛИ ДЛЯ ПАНЕЛИ АДМИНИСТРАТОРА === */
.admin-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.admin-tab {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    transition: all 0.2s;
}

.admin-tab.active {
    color: var(--bamboo-dark);
    border-bottom-color: var(--bamboo-dark);
}

.admin-tab:hover {
    color: var(--bamboo);
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

.admin-tab-content h4 {
    margin: 0 0 16px 0;
    color: #0f172a;
    font-size: 16px;
}

.users-list,
.messages-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.user-item,
.message-item {
    padding: 12px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-item:last-child,
.message-item:last-child {
    border-bottom: none;
}

.user-info,
.message-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: var(--muted);
}

.user-actions,
.message-actions {
    display: flex;
    gap: 6px;
}

.user-action,
.message-action-admin {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.user-action:hover,
.message-action-admin:hover {
    background: #f3f4f6;
}

.user-action.primary {
    background: var(--bamboo-dark);
    color: white;
    border-color: var(--bamboo-dark);
}

.user-action.primary:hover {
    background: var(--bamboo);
}

.user-action.danger {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.user-action.danger:hover {
    background: #dc2626;
}

.settings-group {
    margin-bottom: 16px;
}

.settings-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.settings-group input[type="checkbox"] {
    width: auto;
}

/* Стили для забаненных/замученных пользователей */
.user-muted {
    opacity: 0.6;
}

.user-banned {
    opacity: 0.4;
    text-decoration: line-through;
}

/* Адаптивность */
@media (max-width: 1200px) {
    main {
        max-width: 90%;
        margin: 40px auto;
        padding: 30px;
    }
    
    .ping-panda {
        left: 30px;
    }
}

@media (max-width: 768px) {
    main {
        margin: 20px auto;
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8rem;
        text-align: center;
    }
    
    .features li {
        padding: 10px 0;
        font-size: 14px;
    }
    
    .site-footer {
        padding: 8px 12px;
    }
    
    .site-footer p {
        margin: 4px 6px;
    }
    
    .site-footer a {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .sound-controls {
        top: 16px;
        right: 16px;
        padding: 6px 12px;
    }
    
    .volume-slider {
        width: 80px;
    }
    
    .floating-chat-btn {
        bottom: 16px;
        left: 16px;
        width: 48px;
        height: 48px;
    }
    
    .ping-panda {
        left: 10px;
        width: 140px;
        height: 280px;
    }
    
    .ping-panel {
        width: 180px;
        padding: 15px;
    }
    
    .ping-choice button {
        padding: 12px;
        font-size: 14px;
    }
    
    .faq-section {
        padding: 15px;
    }
    
    .faq-question {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .language-switcher {
        margin: 15px 0;
    }
    
    .pwa-install-btn {
        bottom: 80px;
        right: 16px;
    }
    
    .pwa-install-btn button {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .bamboo-leaf.small {
        width: 35px;
        height: 35px;
    }
    
    .bamboo-leaf.medium {
        width: 50px;
        height: 50px;
    }
    
    .bamboo-leaf.large {
        width: 65px;
        height: 65px;
    }
    
    .bamboo-leaf:nth-child(n+25) {
        display: none;
    }
    
    /* Адаптивность для чата */
    .chat-container {
        width: 300px;
        height: 350px;
        right: -10px;
    }
    
    .chat-toggle {
        width: 50px;
        height: 50px;
    }
    
    .chat-toggle-line {
        width: 16px;
    }
    
    /* Адаптивность для панели админа */
    .modal-content.admin-panel {
        width: 95%;
        max-width: none;
    }
    
    .admin-tabs {
        flex-direction: column;
    }
    
    .admin-tab {
        text-align: center;
    }
    
    .user-actions,
    .message-actions {
        flex-direction: column;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    main {
        margin: 10px auto;
        padding: 15px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .features h2 {
        font-size: 1rem;
    }
    
    .site-footer {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .site-footer p {
        margin: 3px;
    }
    
    .site-footer a {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .sound-controls {
        top: 12px;
        right: 12px;
        flex-direction: column;
        gap: 8px;
        padding: 8px;
    }
    
    .volume-slider {
        width: 70px;
    }
    
    #btn, #happBtn {
        padding: 12px;
        font-size: 14px;
    }
    
    /* Адаптивность для чата на маленьких экранах */
    .chat-container {
        width: calc(100vw - 40px);
        right: 10px;
        left: 10px;
    }
    
    .chat-toggle {
        width: 45px;
        height: 45px;
        bottom: 16px;
        right: 16px;
    }
    
    @media (max-width: 360px) {
        .ping-panda {
            display: none;
        }
        
        .chat-container {
            height: 300px;
        }
    }
}

@media (min-width: 1920px) {
    main {
        max-width: 1200px;
        margin: 60px auto;
        padding: 50px;
    }
    
    h1 {
        font-size: 2.8rem;
    }
    
    .features h2 {
        font-size: 1.4rem;
    }
    
    .features li {
        font-size: 1.1rem;
        padding: 15px 0;
    }
    
    .site-footer {
        max-width: 1000px;
    }
    
    .site-footer a {
        padding: 12px 20px;
        font-size: 1.1rem;
    }
}

/* === НОВЫЕ СТИЛИ ДЛЯ УПРАВЛЕНИЯ АККАУНТОМ === */

/* Кнопка управления аккаунтом */
.account-controls {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 999;
}

.account-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bamboo-dark);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.account-btn:hover {
    transform: scale(1.1);
    background: var(--bamboo);
}

/* Стили для панели управления аккаунтом */
.account-panel {
    max-width: 500px;
}

.account-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.account-section h4 {
    margin: 0 0 16px 0;
    color: var(--bamboo-dark);
    font-size: 18px;
    border-bottom: 2px solid var(--bamboo-light);
    padding-bottom: 8px;
}

.avatar-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bamboo-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    border: 3px solid var(--bamboo-dark);
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row label {
    font-weight: 600;
    color: #0f172a;
    min-width: 80px;
}

.info-row span {
    flex: 1;
    margin: 0 12px;
    color: var(--muted);
}

.change-btn {
    background: var(--bamboo-dark);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.change-btn:hover {
    background: var(--bamboo);
}

.change-btn:disabled {
    background: var(--muted);
    cursor: not-allowed;
}

/* Стили для настроек звука в панели аккаунта */
.sound-controls-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.volume-control label {
    font-weight: 600;
    min-width: 120px;
}

.sound-toggle-panel {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bamboo-dark);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.sound-toggle-panel:hover {
    background: var(--bamboo);
}

/* Стили для уведомлений */
.custom-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    border-left: 4px solid var(--bamboo-dark);
    z-index: 10000;
    max-width: 300px;
    animation: slideInRight 0.3s ease;
}

.custom-notification.success {
    border-left-color: #10b981;
}

.custom-notification.error {
    border-left-color: #ef4444;
}

.custom-notification.warning {
    border-left-color: #f59e0b;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Адаптивность для новых элементов */
@media (max-width: 768px) {
    .account-controls {
        top: 16px;
        left: 16px;
    }
    
    .account-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .account-panel {
        width: 95%;
        max-width: none;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .info-row span {
        margin: 0;
    }
    
    .volume-control {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .account-controls {
        top: 12px;
        left: 12px;
    }
    
    .account-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .avatar-section {
        flex-direction: column;
        text-align: center;
    }
    
    .custom-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* === НОВЫЕ СТИЛИ ДЛЯ УПРАВЛЕНИЯ АККАУНТОМ И ЧАТА === */

/* Кнопка управления аккаунтом с аватаркой */
.account-controls {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 999;
}

.account-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bamboo-dark);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    padding: 0;
    overflow: hidden;
}

.account-btn:hover {
    transform: scale(1.1);
    background: var(--bamboo);
}

.account-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--bamboo-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 2px solid white;
}

/* НОВАЯ КНОПКА-КРЫШКА ДЛЯ ЧАТА (СПРАВА СНИЗУ) */
.chat-handle-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    width: 300px;
}

.chat-handle {
    width: 100%;
    height: 8px;
    background: var(--bamboo-dark);
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.chat-handle:hover {
    background: var(--bamboo);
    height: 12px;
}

.chat-handle.active {
    background: var(--bamboo);
}

.handle-icon {
    color: white;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.chat-handle.active .handle-icon {
    transform: rotate(180deg);
}

.chat-window {
    position: absolute;
    bottom: 100%;
    right: 0;
    width: 100%;
    height: 400px;
    background: white;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.3);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid var(--bamboo-dark);
    border-bottom: none;
}

.chat-window.active {
    display: flex;
    animation: chatSlideUp 0.3s ease;
}

@keyframes chatSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Убираем старый чат */
.chat-widget {
    display: none;
}

/* Стили для панели управления аккаунтом */
.account-panel {
    max-width: 500px;
}

.account-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.account-section h4 {
    margin: 0 0 16px 0;
    color: var(--bamboo-dark);
    font-size: 18px;
    border-bottom: 2px solid var(--bamboo-light);
    padding-bottom: 8px;
}

.avatar-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bamboo-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    border: 3px solid var(--bamboo-dark);
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row label {
    font-weight: 600;
    color: #0f172a;
    min-width: 80px;
}

.info-row span {
    flex: 1;
    margin: 0 12px;
    color: var(--muted);
}

.change-btn {
    background: var(--bamboo-dark);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.change-btn:hover {
    background: var(--bamboo);
}

.change-btn:disabled {
    background: var(--muted);
    cursor: not-allowed;
}

/* Стили для настроек звука в панели аккаунта */
.sound-controls-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.volume-control label {
    font-weight: 600;
    min-width: 120px;
}

.sound-toggle-panel {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bamboo-dark);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.sound-toggle-panel:hover {
    background: var(--bamboo);
}

/* Убираем старые контролы звука */
.sound-controls {
    display: none;
}

/* Стили для кастомных уведомлений */
.custom-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    border-left: 4px solid var(--bamboo-dark);
    z-index: 10000;
    max-width: 300px;
    animation: slideInRight 0.3s ease;
}

.custom-notification.success {
    border-left-color: #10b981;
}

.custom-notification.error {
    border-left-color: #ef4444;
}

.custom-notification.warning {
    border-left-color: #f59e0b;
}

.custom-notification.info {
    border-left-color: #3b82f6;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.notification-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--muted);
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-close:hover {
    color: #0f172a;
}

/* Адаптивность для новых элементов */
@media (max-width: 768px) {
    .account-controls {
        top: 16px;
        left: 16px;
    }
    
    .account-btn {
        width: 45px;
        height: 45px;
    }
    
    .account-avatar {
        width: 41px;
        height: 41px;
        font-size: 18px;
    }
    
    .chat-handle-container {
        width: 280px;
        right: 16px;
        bottom: 16px;
    }
    
    .chat-window {
        height: 350px;
    }
    
    .account-panel {
        width: 95%;
        max-width: none;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .info-row span {
        margin: 0;
    }
    
    .volume-control {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .custom-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .account-controls {
        top: 12px;
        left: 12px;
    }
    
    .account-btn {
        width: 40px;
        height: 40px;
    }
    
    .account-avatar {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .chat-handle-container {
        width: 260px;
        right: 10px;
        bottom: 10px;
    }
    
    .chat-window {
        height: 300px;
    }
    
    .avatar-section {
        flex-direction: column;
        text-align: center;
    }
}

/* === ИСПРАВЛЕННЫЕ СТИЛИ ДЛЯ КНОПКИ-КРЫШКИ ЧАТА === */
.chat-handle-container {
    position: fixed;
    bottom: 0;
    right: 24px;
    z-index: 1000;
    width: 300px;
}

.chat-handle {
    width: 100%;
    height: 12px;
    background: var(--bamboo-dark);
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1001;
}

.chat-handle:hover {
    background: var(--bamboo);
    height: 16px;
}

.chat-handle.active {
    background: var(--bamboo);
}

.handle-icon {
    color: white;
    font-size: 10px;
    transition: transform 0.3s ease;
}

.chat-handle.active .handle-icon {
    transform: rotate(180deg);
}

.chat-window {
    position: absolute;
    bottom: 100%;
    right: 0;
    width: 100%;
    height: 400px;
    background: white;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.3);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid var(--bamboo-dark);
    border-bottom: none;
}

.chat-window.active {
    display: flex;
    animation: chatSlideUp 0.3s ease;
}

@keyframes chatSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Скрываем старый чат полностью */
.chat-widget,
.chat-toggle,
.chat-container {
    display: none !important;
}

/* === ИСПРАВЛЕННЫЕ СТИЛИ ДЛЯ КНОПКИ-КРЫШКИ ЧАТА === */
.chat-handle-container {
    position: fixed;
    bottom: 0;
    right: 24px;
    z-index: 1000;
    width: 300px;
}

.chat-handle {
    width: 100%;
    height: 12px;
    background: var(--bamboo-dark);
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1001;
}

.chat-handle:hover {
    background: var(--bamboo);
    height: 16px;
}

.chat-handle.active {
    background: var(--bamboo);
}

.handle-icon {
    color: white;
    font-size: 10px;
    transition: transform 0.3s ease;
}

.chat-handle.active .handle-icon {
    transform: rotate(180deg);
}

.chat-window {
    position: absolute;
    bottom: 100%;
    right: 0;
    width: 100%;
    height: 400px;
    background: white;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.3);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid var(--bamboo-dark);
    border-bottom: none;
}

.chat-window.active {
    display: flex;
    animation: chatSlideUp 0.3s ease;
}

@keyframes chatSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Скрываем старый чат полностью */
.chat-widget,
.chat-toggle,
.chat-container {
    display: none !important;
}

/* === СТИЛИ ДЛЯ СИСТЕМЫ СТАТИСТИКИ И БЕЙДЖЕЙ === */

/* Сетка статистики */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.stat-item {
    background: white;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
    font-weight: 600;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--bamboo-dark);
}

/* Прогресс-бар */
.progress-section {
    margin-top: 16px;
}

.progress-item {
    margin-bottom: 12px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--muted);
}

.progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--bamboo-light), var(--bamboo-dark));
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Контейнер бейджей */
.badges-container {
    margin-bottom: 20px;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.badge-item {
    background: white;
    border: 2px solid var(--bamboo-light);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.badge-item:hover {
    transform: translateY(-2px);
    border-color: var(--bamboo-dark);
    box-shadow: 0 4px 12px rgba(94, 138, 91, 0.2);
}

.badge-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.badge-info {
    text-align: center;
}

.badge-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--bamboo-dark);
    margin-bottom: 2px;
}

.badge-desc {
    font-size: 9px;
    color: var(--muted);
    line-height: 1.2;
}

.no-badges {
    text-align: center;
    padding: 20px;
    color: var(--muted);
    font-style: italic;
}

/* Стили для выбора смайликов */
.emoji-selection {
    margin-bottom: 20px;
}

.emoji-category {
    margin-bottom: 16px;
}

.emoji-category h5 {
    margin: 0 0 8px 0;
    color: var(--bamboo-dark);
    font-size: 14px;
    font-weight: 600;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
}

.emoji-item {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.emoji-item:hover {
    border-color: var(--bamboo);
    transform: scale(1.05);
}

.emoji-item.active {
    border-color: var(--bamboo-dark);
    background: var(--bamboo-light);
    transform: scale(1.05);
}

.emoji-icon {
    font-size: 20px;
    display: block;
    margin-bottom: 4px;
}

.emoji-name {
    font-size: 10px;
    color: var(--muted);
    font-weight: 600;
}

.selected-emoji-preview {
    background: var(--bamboo-light);
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid var(--bamboo);
}

.selected-emoji-preview strong {
    display: block;
    margin-bottom: 6px;
    color: var(--bamboo-dark);
}

#currentChatEmoji {
    font-size: 24px;
    display: block;
    margin: 8px 0;
}

/* Адаптивность для новых элементов */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .stat-item {
        padding: 12px;
    }
    
    .badges-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .emoji-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .emoji-item {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .badges-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .emoji-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* === СТИЛИ ДЛЯ СИСТЕМЫ УРОВНЕЙ === */
.level-display {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    color: white;
    text-align: center;
}

.level-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.level-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.level-number {
    font-size: 48px;
    font-weight: 900;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.level-text {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.9;
}

.level-progress {
    flex: 1;
    max-width: 200px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
}

.progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #ffed4e);
    border-radius: 4px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(255,215,0,0.5);
}

.points-section {
    margin-top: 20px;
}

.points-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.point-item {
    background: white;
    border: 2px solid var(--bamboo-light);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.point-item:hover {
    transform: translateY(-2px);
    border-color: var(--bamboo-dark);
    box-shadow: 0 4px 12px rgba(94,138,91,0.2);
}

.point-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.point-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--bamboo-dark);
    margin-bottom: 4px;
}

.point-label {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
}

/* Адаптивность */
@media (max-width: 768px) {
    .level-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .level-progress {
        max-width: 100%;
    }
    
    .points-grid {
        grid-template-columns: 1fr;
    }
    
    .level-number {
        font-size: 36px;
    }
}