@import url('https://fonts.googleapis.com/css2?family=Varela+Round&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Varela Round', sans-serif;
}

body {
    background-color: #111;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden; 
}

/* --- СТИЛИ ДЛЯ ЧАСТИЦ --- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none; 
    z-index: 1; 
}

#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -1;
    filter: brightness(0.5) blur(6px); 
    transform: scale(1.05);
}

.wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center; /* Центрируем по вертикали */
    align-items: center;
    padding: 20px; 
    min-height: 100vh;
    position: relative;
    z-index: 10; 
}

/* --- КАРТОЧКА --- */
.card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px; /* Чуть увеличил внутренний отступ */
    width: 100%;
    max-width: 500px; /* УВЕЛИЧИЛИ ПЛАШКУ (Было 380px) */
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    
    transform-style: preserve-3d;
    transform: perspective(1000px);
    will-change: transform;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover {
    transition: transform 0.1s ease-out;
}

.profile-header, .social-links, .audio-player, .divider {
    transform: translateZ(30px);
}

.view-counter {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 0.85rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
    transform: translateZ(40px);
}

.profile-header { margin-bottom: 25px; }

.avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

h1 { font-size: 1.8rem; margin-bottom: 5px; letter-spacing: 1px; }
.description { font-size: 0.95rem; color: #ccc; }

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255, 0.1);
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Виджет Discord */
.discord-widget {
    background: rgba(40, 70, 40, 0.6);
    border: 1px solid rgba(100, 255, 100, 0.4);
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    display: none;
    text-align: left;
    animation: fadeIn 0.3s ease;
    transform: translateZ(30px);
}

.discord-widget.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px) translateZ(30px); }
    to { opacity: 1; transform: translateY(0) translateZ(30px); }
}

.discord-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.discord-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.3);
}

.discord-info { flex-grow: 1; margin-left: 10px; }
.discord-tag { font-size: 0.9rem; font-weight: bold; color: #fff; }

.add-discord-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: 0.2s;
}

.add-discord-btn:hover { background: rgba(255,255,255,0.3); }

.divider {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 25px 0;
}

/* Аудиоплеер */
.audio-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.track-info {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 25px;
    text-align: left;
}

.track-cover {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.track-details { flex-grow: 1; min-width: 0; }

#title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#artist {
    font-size: 0.85rem;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin-bottom: 15px;
}

.controls button {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    transition: color 0.2s;
}

.controls button:hover { color: #1DB954; }
#play-pause { font-size: 2.2rem; }

.progress-container {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 5px;
    height: 6px;
    width: 100%;
}

.progress {
    background-color: #fff;
    border-radius: 5px;
    height: 100%;
    width: 0%;
    transition: width 0.1s linear;
}

.time {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.75rem;
    color: #aaa;
    margin-bottom: 10px;
}

/* Регулятор громкости */
.volume-container {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
}

.volume-container i {
    font-size: 0.9rem;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
    width: 16px;
    text-align: center;
}

.volume-container i:hover { color: #fff; }

#volume-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    transition: transform 0.1s;
}

#volume-slider::-webkit-slider-thumb:hover { transform: scale(1.3); }

/* Всплывающее уведомление */
.toast {
    position: fixed;
    bottom: -100px;
    right: 20px;
    background: rgba(20, 20, 20, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: bottom 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
}

.toast.show { bottom: 20px; }
.toast-icon { color: #4CAF50; font-size: 1.5rem; }
.toast-content { display: flex; flex-direction: column; }
.toast-title { font-weight: bold; font-size: 0.9rem; margin-bottom: 3px; }
.toast-desc { font-size: 0.8rem; color: #bbb; }