* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    overflow: hidden;
    color: white;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: #0a0a0a;
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.video-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 0;
}

@media (min-aspect-ratio: 16/9) {
    .video-background video {
        width: 100%;
        height: auto;
    }
}

@media (max-aspect-ratio: 16/9) {
    .video-background video {
        width: auto;
        height: 100%;
    }
}

.content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    z-index: 1;
    width: 100%;
    max-width: 800px;
    padding: 20px;
    margin-left: auto;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }

    20% {
        left: 200%;
    }

    100% {
        left: 200%;
    }
}

.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(20, 20, 30, 0.3) 100%);
    backdrop-filter: blur(20px) saturate(200%);
    -webkit-backdrop-filter: blur(20px) saturate(200%);
    border-radius: 24px;
    padding: 30px;
    width: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 30px;
    animation: float 6s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: skewX(-20deg);
    animation: shine 8s infinite;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.username {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.95);
}

.code-editor {
    width: 300px;
    background: rgba(10, 10, 15, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    margin-bottom: 25px;
    font-family: 'Fira Code', 'Courier New', monospace;
}

.editor-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.editor-body {
    padding: 15px;
    display: flex;
    gap: 15px;
    font-size: 13px;
    line-height: 1.6;
}

.line-number {
    color: rgba(255, 255, 255, 0.3);
    user-select: none;
    text-align: right;
    min-width: 15px;
}

.typing-text {
    min-height: 20px;
    text-align: left;
    margin-bottom: 0;
    font-family: inherit;
    font-weight: 400;
    color: #e6e6e6;
    text-shadow: none;
}

.syntax-func {
    color: #61afef;
}

.syntax-string {
    color: #98c379;
}

.syntax-bracket {
    color: #abb2bf;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.icon-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(30, 30, 40, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.icon:hover {
    transform: scale(1.15);
    background: rgba(60, 60, 80, 0.5);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2), inset 0 0 10px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.icon-tooltip {
    position: absolute;
    bottom: -30px;
    background: rgba(0, 0, 0, 0.8);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.icon-wrapper:hover .icon-tooltip {
    opacity: 1;
}

.music-player {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(20, 20, 30, 0.3) 100%);
    backdrop-filter: blur(20px) saturate(200%);
    -webkit-backdrop-filter: blur(20px) saturate(200%);
    border-radius: 20px;
    padding: 15px;
    width: 350px;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.music-player:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.music-cover {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: border-radius 0.3s ease;
}

.music-cover.spinning {
    animation: spin 5s linear infinite;
}

.music-info {
    flex-grow: 1;
}

.music-title {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.95);
}

.music-artist {
    font-size: 12px;
    opacity: 0.8;
    color: rgba(255, 255, 255, 0.8);
}

.music-controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    background: rgba(30, 30, 40, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.control-btn:hover {
    background: rgba(40, 40, 50, 0.4);
    transform: scale(1.1);
    color: rgba(255, 255, 255, 1);
}

.volume-container {
    position: relative;
    display: flex;
    align-items: center;
}

.volume-panel {
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(20, 20, 30, 0.4);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 18px 0;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 100;
    width: 50px;
}

.volume-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.slider-wrapper {
    width: 20px;
    height: 120px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 120px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    outline: none;
    transform: rotate(-90deg);
    cursor: pointer;
    position: absolute;
    margin: 0;
}

#volume-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: transparent;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 14px;
    width: 14px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    margin-top: -5px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
    border: none;
    transition: transform 0.1s ease;
}

#volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

#volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
    border: none;
}

#volume-slider::-moz-range-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.panel-mute-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.panel-mute-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.volume-value {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    width: 100%;
    text-align: center;
    pointer-events: none;
}


.bio-panel {
    position: fixed;
    top: 0;
    left: -400px;
    width: 350px;
    height: 100vh;
    background: rgba(15, 15, 25, 0.25);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 30px;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.4);
    transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Плавная анимация */
    z-index: 100;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.bio-panel.active {
    left: 0;
}

.bio-content h2 {
    margin-bottom: 20px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 10px;
    color: rgba(255, 255, 255, 0.95);
}

.bio-content p {
    line-height: 1.6;
    margin-bottom: 15px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
}

.close-bio {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(30, 30, 40, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.close-bio:hover {
    transform: rotate(90deg);
    background: rgba(40, 40, 50, 0.4);
    color: rgba(255, 255, 255, 1);
}

.bio-panel::-webkit-scrollbar {
    width: 6px;
}

.bio-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.bio-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.bio-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {

    .glass-card,
    .music-player {
        width: 90%;
    }

    .bio-panel {
        width: 85%;
        left: -100%;
    }

    .video-background video {
        left: 0;
        transform: translate(0, -50%);
    }

    .content {
        align-items: center;
        margin-left: 0;
    }
}

/* Визуализатор звука */
.visualizer {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 20px;
    margin-top: 5px;
}

.visualizer-bar {
    flex: 1;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 1px;
    transition: height 0.05s ease;
    min-height: 2px;
}

/* Настройки и переключатели */
.settings-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider.round {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 20px;
}

.slider.round:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: rgba(97, 175, 239, 0.5);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

/* Кастомное контекстное меню */
.custom-context-menu {
    position: fixed;
    z-index: 1000;
    width: 180px;
    background: rgba(15, 15, 25, 0.6);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    padding: 8px;
    display: none;
    transform: scale(0.95);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.custom-context-menu.active {
    display: block;
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateX(4px);
}

.menu-item i {
    width: 16px;
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.menu-item:hover i {
    color: #61afef;
}

.menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 6px 0;
}