/* --- БАЗА --- */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
:root {
    --primary-pink: #ff69b4; --light-pink: #ffb6c1; --deep-bg: #1a0b1c;
    --glass-bg: rgba(255, 192, 203, 0.08); 
    --glass-border: rgba(255, 182, 193, 0.15);
    --glass-blur: 20px; 
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --text-main: #ffffff; --text-sec: #ffdae0;
}
body { 
    background-color: var(--deep-bg); 
    color: var(--text-main); 
    overflow-x: hidden;
    user-select: none; 
}
body::-webkit-scrollbar { display: none; }
body { -ms-overflow-style: none; scrollbar-width: none; }

#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999;
    background: transparent;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    grid-auto-rows: minmax(50px, 1fr); pointer-events: none;
}
.preload-cube {
    background: #2a102e; 
    border: 1px solid rgba(255, 105, 180, 0.05);
    transition: opacity 0.3s ease, transform 0.3s ease;
    width: 100%; height: 100%;
}
.cube-fade-out { opacity: 0; transform: scale(0); }

.bg-image {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: url('background.jpg') no-repeat center center/cover;
    z-index: -2; transition: transform 0.1s ease-out;
}
.bg-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(26, 11, 28, 0.4), rgba(10, 0, 5, 0.9));
    backdrop-filter: blur(5px); z-index: -1;
}

.hero {
    height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center;
    position: sticky; top: 0; z-index: 0; transition: opacity 0.5s ease; padding-bottom: 60px;
}
.hero-content { text-align: center; margin-bottom: 40px; }
.main-title {
    font-size: 5rem; font-weight: 900; letter-spacing: -2px; margin: 0;
    background: linear-gradient(135deg, #fff 30%, var(--primary-pink) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(255, 105, 180, 0.5); animation: titleGlow 3s infinite alternate;
}
.subtitle {
    font-size: 1.3rem; color: var(--light-pink); margin-top: 10px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 105, 180, 0.4);
}
.scroll-hint {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    opacity: 0.8; animation: float 2s infinite ease-in-out; color: var(--light-pink); font-size: 0.9rem; letter-spacing: 1px;
}

.dashboard-wrapper {
    position: relative; z-index: 10; background: transparent; min-height: 100vh;
    padding-top: 50px; padding-bottom: 50px; opacity: 0; transform: translateY(100px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.dashboard-wrapper.visible { opacity: 1; transform: translateY(0); }
.dashboard-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); 
    grid-auto-rows: minmax(180px, auto); gap: 20px; width: 90%; max-width: 1400px; margin: 0 auto;
}

.glass-panel {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 192, 203, 0.02) 100%);
    backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border); 
    border-top: 1px solid rgba(255, 255, 255, 0.25); 
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px; padding: 24px; overflow: hidden; position: relative;
    box-shadow: var(--glass-shadow); 
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}
.glass-panel:hover {
    transform: translateY(-5px) scale(1.005);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 105, 180, 0.05) 100%);
    box-shadow: 0 0 25px rgba(255, 105, 180, 0.25), inset 0 0 0 1px var(--primary-pink);
}
.glass-panel h3, .glass-panel h2 {
    color: var(--light-pink); font-size: rem; margin-bottom: 15px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 8px;
}
.glass-panel h3 i { color: var(--primary-pink); }
.span-1 { grid-column: span 1; } .span-2 { grid-column: span 2; } .row-2 { grid-row: span 2; }

.profile-panel { padding: 25px; display: flex; align-items: center; }
.profile-inner { display: flex; align-items: center; gap: 25px; width: 100%; }
.profile-left { flex-shrink: 0; position: relative; }

.avatar-frame {
    width: 110px; height: 110px; border: 2px solid var(--primary-pink); border-radius: 50%; padding: 4px;
    box-shadow: 0 0 20px rgba(255, 105, 180, 0.4); position: relative;
}
.avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar-frame::after {
    content: ''; position: absolute; top: -5px; left: -5px; right: -5px; bottom: -5px;
    border-radius: 50%; border: 2px solid transparent;
    border-top-color: #ff69b4; border-right-color: transparent;
    animation: spin 6s linear infinite; opacity: 0.8;
}

.live-indicator {
    position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%);
    background: #ff0000; color: #fff; padding: 2px 8px; border-radius: 10px;
    font-size: 0.7rem; font-weight: bold; border: 1px solid rgba(255,255,255,0.5); box-shadow: 0 0 10px #ff0000;
}

.profile-right {
    display: flex;
    flex-direction: column;
    justify-content: center; 
    gap: 12px; 
    height: 100%;
}


.name-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.name-row h2 {
    margin: 0;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.stream-info-box {
    display: flex;
    flex-direction: column;
    gap: 4px; 
}
.game-category {
    font-size: 0.85rem;
    color: var(--primary-pink);
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    font-weight: 800;
}
.stream-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.stats-row {
    display: flex;
    gap: 12px;
    margin-top: 4px; 
}
.stat-pill {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.stat-pill i {
    color: var(--light-pink);
}
.name-box h2 { font-size: 2rem; color: #fff; margin: 0; line-height: 1; text-transform: none; text-shadow: 0 0 10px rgba(255,105,180,0.5); }
.verified { font-size: 0.5em; color: var(--primary-pink); transform: translateY(-5px); }

.viewers-badge {
    background: rgba(0,0,0,0.3); padding: 4px 8px; border-radius: 6px;
    font-size: 0.8rem; color: #fff; display: flex; align-items: center; gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.viewers-badge i { color: #ff69b4; }

.links-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
    overflow-y: auto; max-height: 100%; padding: 10px; margin: -10px; 
}
.l-card {
    background: rgba(255, 255, 255, 0.03); padding: 12px 16px; border-radius: 16px;
    text-decoration: none; display: flex; flex-direction: column; justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.05); position: relative; overflow: visible;
    transform: translateZ(0); 
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.2s ease, box-shadow 0.2s ease;
}
.l-card i { 
    color: var(--light-pink); margin-bottom: 6px; font-size: 1.4rem; 
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease; display: inline-block;
}
.l-card strong { color: #fff; font-size: 0.95rem; font-weight: 600; display: block; }
.l-card span { font-size: 0.75em; color: rgba(255,255,255,0.6); margin-top: 2px; }
.l-card:hover {
    background: rgba(255, 105, 180, 0.15);
    box-shadow: inset 0 0 0 1px var(--primary-pink), 0 5px 15px rgba(255, 105, 180, 0.2);
    border-color: transparent; transform: translateY(-3px); z-index: 10;
}
.l-card:hover i { 
    color: #fff; 
    transform: scale(1.05) rotate(-2deg) translateX(1px); 
    text-shadow: 0 0 10px var(--primary-pink); 
}

.player-panel { 
    padding: 0; display: flex; flex-direction: column; background: #000; 
    border: 1px solid var(--glass-border); 
}

.player-panel:hover {
    border-color: var(--glass-border); 
    box-shadow: 0 15px 40px rgba(0,0,0,0.5), inset 0 0 0 1px var(--primary-pink);
    
    transform: none !important; 
}
.modal-content:hover {
    transform: translateY(-50%) !important; 
}
.panel-header {
    padding: 10px 20px; display: flex; justify-content: space-between; align-items: center;
    background: rgba(255, 105, 180, 0.1); backdrop-filter: blur(10px);
    z-index: 2; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.expand-btn { background: none; border: none; color: var(--light-pink); cursor: pointer; font-size: 1rem; transition: 0.2s; }
.expand-btn:hover { color: #fff; transform: scale(1.1); text-shadow: 0 0 10px #ff69b4; }
.player-container { flex-grow: 1; width: 100%; position: relative; }
.player-container iframe { width: 100%; height: 100%; position: absolute; border: none; }

.music-panel, .time-panel, .gallery-panel, .track-panel { padding: 0; position: relative; overflow: hidden; }
.music-content {
    display: flex; flex-direction: column; justify-content: flex-end;
    height: 100%; padding: 20px; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}
.album-art { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
.album-art img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; transition: transform 20s linear; }
.track-info { position: relative; z-index: 2; text-shadow: 0 2px 5px rgba(0,0,0,0.8); }
.track-info h4 { font-size: 1.1rem; color: #fff; margin: 5px 0 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-info p { font-size: 0.85rem; color: var(--light-pink); }
.equalizer { display: flex; gap: 3px; height: 15px; align-items: flex-end; margin-bottom: 5px; }
.bar { width: 4px; background: var(--primary-pink); border-radius: 2px; height: 4px; transition: height 0.1s ease; }
.equalizer.animating .bar { animation: bounce 1s infinite ease-in-out; }
.equalizer.animating .bar:nth-child(2) { animation-delay: 0.2s; height: 60%; }
.equalizer.animating .bar:nth-child(3) { animation-delay: 0.4s; height: 40%; }
.equalizer.animating .bar:nth-child(4) { animation-delay: 0.1s; height: 80%; }
@keyframes bounce { 0%, 100% { height: 20%; } 50% { height: 100%; } }

.time-content { display: flex; flex-direction: column; justify-content: space-between; height: 100%; text-align: center; padding: 20px; }
.clock-display h2 { font-size: 3rem; font-weight: 900; color: #fff; margin: 0; line-height: 1; font-variant-numeric: tabular-nums; }
.uptime-display { background: rgba(255,255,255,0.05); border-radius: 12px; padding: 8px; margin-top: 5px; }

.slider-container { width: 100%; height: 100%; position: relative; }
.slide { width: 100%; height: 100%; object-fit: cover; position: absolute; opacity: 0; transition: opacity 0.8s; }
.slide.active { opacity: 1; }

.track-panel { display: flex; flex-direction: column; justify-content: space-between; padding: 20px; }
.player-info h4 { color: #fff; font-size: 1rem; margin: 0 0 5px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-info p { color: var(--light-pink); font-size: 0.8rem; margin: 0; opacity: 0.8; }
.player-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 15px; }
.ctrl-btn { background: none; border: none; color: #fff; font-size: 1.2rem; cursor: pointer; transition: 0.2s; opacity: 0.7; }
.ctrl-btn:hover { opacity: 1; transform: scale(1.2); color: var(--primary-pink); }


.play-pause-btn {
    width: 40px; height: 40px; border-radius: 50%; background: var(--primary-pink); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 1rem;
    box-shadow: 0 0 15px rgba(255, 105, 180, 0.4); opacity: 1;
    z-index: 5; position: relative;
}
.play-pause-btn:hover { transform: scale(1.1); box-shadow: 0 0 25px rgba(255, 105, 180, 0.6); }
.play-pause-btn:hover i { color: #fff !important; }

.track-progress-container { width: 100%; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; margin-top: 15px; position: relative; cursor: pointer; }
.track-progress-bar { width: 0%; height: 100%; background: var(--primary-pink); border-radius: 2px; transition: width 0.1s linear; }

.volume-container { position: relative; display: flex; align-items: center; gap: 5px; }
#vol-icon { font-size: 0.9rem; color: var(--light-pink); cursor: pointer; }
.volume-slider {
    width: 0; overflow: hidden; height: 4px; border-radius: 2px;
    -webkit-appearance: none; background: rgba(255,255,255,0.2); outline: none; transition: width 0.3s ease;
}
.volume-container:hover .volume-slider { width: 60px; }
.volume-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 10px; border-radius: 50%; background: var(--primary-pink); cursor: pointer; }

.vtuber-mascot {
    position: absolute; 
    bottom: -20px; 
    left: 2%; 
    height: 85vh; 
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    animation: mascotFadeIn 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s forwards;
}
.vtuber-mascot img { height: 100%; width: auto; object-fit: contain; filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5)); transition: all 0.4s; pointer-events: auto; }
.vtuber-mascot img:hover { transform: scale(1.03) translateY(-10px) rotate(2deg); filter: drop-shadow(0 0 20px var(--primary-pink)) brightness(1.1); }
.rigger-credit {
    position: absolute; bottom: 40px; right: -20px; padding: 8px 14px; border-radius: 12px;
    background: rgba(0,0,0,0.6) !important; backdrop-filter: blur(10px); border: 1px solid rgba(255,105,180,0.3);
    opacity: 0; transform: translateX(-10px); transition: 0.3s ease; pointer-events: auto; z-index: 6; text-decoration: none; display: flex; align-items: center; gap: 8px;
}
.rigger-credit i { color: var(--primary-pink); } .rigger-credit span { color: #ccc; font-size: 0.75rem; } .rigger-credit strong { color: #fff; }
.vtuber-mascot:hover .rigger-credit, .rigger-credit:hover { opacity: 1; transform: translateX(0); }

@media (max-width: 1450px) { .vtuber-mascot { left: -100px; opacity: 0.3 !important; z-index: -1; filter: grayscale(0.5); } }
@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
    .span-1, .span-2 { grid-column: span 1; } .span-2-tab { grid-column: span 2; }
    .hero-content h1 { font-size: 3.5rem; } .links-grid { grid-template-columns: 1fr; }
    .vtuber-mascot { display: none; }
}
@media (max-width: 600px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .span-1, .span-2, .row-2 { grid-column: span 1; grid-row: span 1; }
    .links-grid { grid-template-columns: repeat(2, 1fr); max-height: 350px; }
    .player-panel { min-height: 250px; }
}

.modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; }
.modal-backdrop { position: absolute; width: 100%; height: 100%; background: rgba(10,0,10,0.9); backdrop-filter: blur(10px); }
.modal-content {
    position: relative; margin: 0 auto; top: 50%; transform: translateY(-50%);
    width: 80vw; max-width: 1200px; aspect-ratio: 16 / 9;
    background: #000; border: 1px solid var(--primary-pink); box-shadow: 0 0 50px rgba(255,105,180,0.2); padding: 0; overflow: hidden;
}

.boosty-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.boosty-header h3 { margin-bottom: 10px; }
.boosty-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    justify-content: flex-end;
}
.boosty-desc {
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.3;
}
.boosty-stats {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}
.boosty-current {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}
.boosty-progress-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}
.boosty-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff69b4, #fa1ed2);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(255, 110, 64, 0.5);
    transition: width 0.5s ease-out;
}
.boosty-donate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: var(--light-pink); 
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.boosty-donate-btn:hover {
    background: #ff5722;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 110, 64, 0.4);
}
.gallery-panel { position: relative; cursor: pointer; overflow: hidden; }

.gallery-panel::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.6) 0%, transparent 20%, transparent 80%, rgba(0,0,0,0.6) 100%);
    opacity: 0; transition: 0.3s ease; pointer-events: none; z-index: 2;
}
.gallery-panel:hover::after { opacity: 1; }

.nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255, 105, 180, 0.2); 
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff; width: 35px; height: 35px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: all 0.3s ease; z-index: 10; cursor: pointer;
}
.nav-btn:hover {
    background: var(--primary-pink);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 10px var(--primary-pink);
}
.gallery-panel:hover .nav-btn { opacity: 1; }
.prev-btn { left: -20px; }
.gallery-panel:hover .prev-btn { left: 15px; }

.next-btn { right: -20px; }
.gallery-panel:hover .next-btn { right: 15px; }

.player-container { 
    flex-grow: 1; width: 100%; position: relative; overflow: hidden; 
}

.twitch-layer {
    width: 100%; height: 100%;
    position: absolute; top: 0; left: 0; z-index: 1;
}
.twitch-layer iframe { width: 100%; height: 100%; border: none; }

.offline-layer {
    width: 100%; height: 100%;
    position: absolute; top: 0; left: 0; z-index: 2;
    background: radial-gradient(circle at center, #2a102e 0%, #000 100%);
    display: flex; align-items: center; justify-content: center;
    text-align: center;
    display: none; 
}

.offline-content {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 20px;
}

.offline-avatar {
    width: 60px; height: 60px; border-radius: 50%; 
    border: 2px solid #444; filter: grayscale(100%); margin-bottom: 5px;
}

.offline-content h3 {
    color: #fff; font-size: 1.2rem; margin: 0;
}
.offline-content p {
    color: #aaa; font-size: 0.85rem; max-width: 80%; margin: 0;
}

.offline-btn {
    margin-top: 10px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #fff; text-decoration: none; font-size: 0.8rem;
    transition: 0.2s; display: flex; align-items: center; gap: 6px;
}
.offline-btn:hover {
    background: var(--primary-pink); border-color: var(--primary-pink);
}
.slider-container {
    background: rgba(0,0,0,0.2); /* Приятный темный фон, пока фото грузится */
    border-radius: 15px;
    overflow: hidden;
}

.slide {
    opacity: 0;
    transition: opacity 0.8s ease; /* Плавное проявление */
}

.slide.loaded {
    opacity: 1;
}
#modal-player-container { width: 100%; height: 100%; } #modal-player-container iframe { width: 100%; height: 100%; position: absolute; top: 0; left: 0; }
.close-modal { position: absolute; top: -40px; right: 0; color: #fff; font-size: 2.5rem; cursor: pointer; transition: 0.2s; }
.close-modal:hover { color: var(--primary-pink); transform: rotate(90deg); }

@keyframes float { 0%, 100% {transform:translateY(0)} 50% {transform:translateY(10px)} }
@keyframes spin { 0% {transform:rotate(0deg)} 100% {transform:rotate(360deg)} }
@keyframes titleGlow { from { text-shadow: 0 0 20px rgba(255,105,180,0.3); } to { text-shadow: 0 0 50px rgba(255,105,180,0.8); } }
@keyframes mascotFadeIn { to { opacity: 1; transform: translateX(0); } }