/* Сброс настроек */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #0f0f12;
}

/* Фоновая картинка с легким размытием */
.bg-blur {
    position: fixed;
    top: -10px;
    left: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    background: url('https://i.ibb.co/XZtd2st3/2026-05-06-01-00-14.png') no-repeat center center/cover;
    filter: blur(8px);
    z-index: -1;
}

/* ОБЩИЙ КОНТЕЙНЕР ДЛЯ КАРТОЧКИ И ТРЁХМЕРКИ */
.main-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 50px; /* Отступ между карточкой и 3D */
    width: 100%;
    max-width: 900px;
    padding: 40px 20px 100px 20px; /* Снизу отступ под панель кнопок */
    z-index: 2;
}

/* Левое стекло (твоя карточка) */
.bio-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 35px 25px;
    width: 350px;
    flex-shrink: 0;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    color: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease, height 0.4s ease, padding 0.4s ease;
}

.bio-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* БЛОК С 3D МОДЕЛЬЮ СПРАВА */
.model-container {
    width: 400px;
    height: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Сама область 3D холста */
model-viewer {
    width: 100%;
    height: 100%;
    outline: none;
    --poster-color: transparent; /* Убирает черный фон при начальном рендере */
}

/* Круглая аватарка */
.avatar-container {
    width: 110px;
    height: 110px;
    margin: 0 auto 20px auto;
    position: relative;
}

#discord-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.avatar-container:hover #discord-avatar {
    transform: scale(1.08) rotate(3deg);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Текст внутри карточки */
#discord-global-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

#discord-username {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 0px;
    transition: margin 0.4s ease;
}

#discord-username.has-status {
    margin-bottom: 25px;
}

/* --- СИСТЕМА СТАТУСОВ С АВТО-ВЫСОТОЙ --- */
.status-wrapper {
    position: relative;
    width: 100%;
    height: 0px; 
    opacity: 0;
    overflow: visible; 
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.status-wrapper.active { opacity: 1; }
.status-wrapper.state-single { height: 74px; }
.status-wrapper.state-double { height: 114px; }

.status-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.status-card img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.status-info { flex: 1; overflow: hidden; }
.status-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255, 255, 255, 0.4); margin-bottom: 2px; }
.status-name { font-size: 14px; font-weight: 600; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-details { font-size: 12px; color: rgba(255, 255, 255, 0.65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.status-card.layer-top { z-index: 5; transform: translateY(0) scale(1); opacity: 1; }
.status-card.layer-top:hover { background: rgba(255, 255, 255, 0.1); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); }
#card-spotify.layer-top { border-color: rgba(30, 215, 96, 0.25); }

.status-card.layer-bottom { z-index: 2; transform: translateY(40px) scale(0.93); opacity: 0.35; cursor: pointer; }
.status-card.layer-bottom:hover { opacity: 0.75; transform: translateY(45px) scale(0.96); background: rgba(255, 255, 255, 0.12); }

.status-card.single { position: relative; transform: none !important; opacity: 1 !important; z-index: 3; }
.status-card.single:hover { background: rgba(255, 255, 255, 0.1); }

/* --- СТИЛИ ДЛЯ НИЖНЕЙ ПАНЕЛИ --- */
.bottom-panel {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 500px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 15px 25px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.panel-btn {
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s, text-shadow 0.3s;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.panel-btn:hover {
    color: #ffffff;
    transform: translateY(-5px) scale(1.12);
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.panel-btn[title="Spotify"]:hover { color: #1ed760; text-shadow: 0 0 12px rgba(30, 215, 96, 0.6); }

.roblox-cube {
    width: 20px;
    height: 20px;
    border: 5px solid rgba(255, 255, 255, 0.6);
    border-radius: 3px;
    transform: rotate(-15deg);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s, box-shadow 0.3s;
}

.panel-btn:hover .roblox-cube {
    border-color: #ffffff;
    transform: rotate(-10deg) scale(1.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* --- АНИМАЦИЯ ЗАГРУЗКИ --- */
#site-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0f0f12; 
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

#site-loader.fade-out { opacity: 0; visibility: hidden; }
.loader-content { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 15px; }
.hand-drawn-svg { width: 70px; height: 70px; }
.hand-drawn-svg path {
    fill: none;
    stroke: #ffffff;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 240;
    stroke-dashoffset: 240;
    animation: drawLine 2s cubic-bezier(0.4, 0.2, 0.2, 1) infinite, rotateLoader 1.5s linear infinite;
    transform-origin: center;
}

.loader-text { color: rgba(255, 255, 255, 0.7); font-size: 14px; letter-spacing: 2px; text-transform: uppercase; animation: pulseText 1.5s ease-in-out infinite; }

@keyframes drawLine { 0% { stroke-dashoffset: 240; } 50% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -240; } }
@keyframes rotateLoader { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes pulseText { 0%, 100% { opacity: 0.5; transform: scale(0.98); } 50% { opacity: 1; transform: scale(1); } }

/* АДАПТИВ ПОД МОБИЛКИ И ПЛАНШЕТЫ */
@media (max-width: 800px) {
    .main-container {
        flex-direction: column; /* Ставит 3D вниз под карточку на телефонах */
        gap: 20px;
        padding-top: 20px;
    }
    .model-container {
        width: 100%;
        height: 350px;
    }
}

@media (max-width: 400px) {
    .bottom-panel { padding: 12px 15px; }
    .panel-btn { font-size: 20px; }
    .roblox-cube { width: 17px; height: 17px; border-width: 4px; }
    .status-wrapper.state-double { height: 104px; }
    .status-card.layer-bottom { transform: translateY(34px) scale(0.93); }
    .status-card.layer-bottom:hover { transform: translateY(38px) scale(0.96); }
}
