* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
    background: #000;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    color: white;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

.preloader-content p {
    font-size: 1.2rem;
    letter-spacing: 0.2em;
    font-weight: 300;
    text-transform: uppercase;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Базовые стили для всех секций */
.section {
    min-height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Темный оверлей для читаемости текста */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Контент поверх фона */
.content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    padding: 2rem;
    max-width: 900px;
}

/* Hero секция */
.hero .main-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.hero .subtitle {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 300;
    letter-spacing: 0.3em;
    opacity: 0.9;
}

/* Индикатор прокрутки */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: white;
    text-align: center;
    opacity: 0.7;
    animation: bounce 2s infinite;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-indicator span {
    display: block;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    margin-bottom: 0.5rem;
}

.arrow {
    font-size: 1.5rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Остальные секции */
.content h2 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.description {
    font-size: clamp(1rem, 2vw, 1.3rem);
    line-height: 1.8;
    font-weight: 300;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

/* Галерея */
.gallery {
    background: #000;
    padding: 0;
}

.gallery-fullscreen {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    min-height: 100vh;
}

.gallery-item {
    background-size: cover;
    background-position: center;
    aspect-ratio: 1 / 1;
    transition: transform 0.3s ease, filter 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
    z-index: 1;
}

/* Контактная секция со split-layout */
.contact {
    background: none;
    padding: 0;
}

.contact-split {
    display: flex;
    width: 100%;
    height: 100vh;
}

.contact-image {
    flex: 1;
    background-size: cover;
    background-position: center;
}

.contact-info {
    flex: 1;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    color: white;
}

.contact-info h2 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-bottom: 3rem;
    text-transform: uppercase;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.contact-link {
    color: white;
    text-decoration: none;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.contact-link:hover {
    opacity: 0.7;
    transform: translateY(-2px);
}

.telegram-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.telegram-icon {
    width: 2em;
    height: 2em;
    background: transparent;
    border: none;
    vertical-align: middle;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #000;
}

/* Адаптивность */
@media (min-width: 769px) {
    /* Десктопная версия - показываем нижнюю часть картинки для секции Музыка */
    .music {
        background-position: center 35% !important;
    }
}

@media (max-width: 768px) {
    .gallery-fullscreen {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Скрываем последнюю картинку на мобильных */
    .gallery-item:last-child {
        display: none;
    }

    .section {
        background-attachment: scroll;
    }

    /* Опускаем контент в hero и about секциях */
    .hero .content {
        margin-top: 35vh;
    }

    .about .content {
        margin-top: 20vh;
    }

    .music .content {
        margin-top: 35vh;
    }

    .acting .content {
        margin-top: -30vh;
    }

    .philosophy .content {
        margin-top: 40vh;
    }

    .contact-split {
        flex-direction: column;
    }

    .contact-image {
        height: 50vh;
    }

    .contact-info {
        height: 50vh;
        padding: 2rem;
    }
}

/* Music Player Styles */
@font-face {
    font-family: 'Unutterable';
    src: url('ofont.ru_Unutterable.ttf') format('truetype');
}

.music-player-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 38%;
    z-index: 1;
    opacity: 0.6;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 2;
}

.player-content {
    position: relative;
    z-index: 3;
    padding: 60px 20px;
    max-width: 500px;
    width: 90%;
    margin-top: 24vh;
}

#custom-player {
    background: linear-gradient(135deg, #800000 0%, #4B0000 100%);
    padding: 30px;
    border-radius: 20px;
    color: white;
    box-shadow:
        0 10px 30px rgba(0,0,0,0.6),
        0 0 35px rgba(139, 0, 0, 0.6),
        inset 0 0 25px rgba(75, 0, 0, 0.4);
    border: 3px solid #8B0000;
    position: relative;
    opacity: 0;
    transform: scale(0.9) translateY(30px);
    animation: playerFadeIn 1s ease-out forwards;
    animation-delay: 0.3s;
}

@keyframes playerFadeIn {
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#custom-player::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #8B0000, #B22222, #4B0000, #8B0000);
    border-radius: 23px;
    z-index: -1;
    animation: borderGlow 4s linear infinite;
}

@keyframes borderGlow {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.track-info {
    text-align: center;
    margin-bottom: 10px;
}

.track-info .full-title {
    display: block;
    font-family: 'Unutterable', serif;
    font-size: 18px;
    letter-spacing: 1px;
    color: #ffffff;
}

.progress-container {
    margin-bottom: 20px;
}

#waveform {
    width: 100%;
    height: 60px;
    cursor: pointer;
    border-radius: 8px;
    background: transparent;
    margin-bottom: 10px;
}

.progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    overflow: visible;
    margin-bottom: 10px;
    cursor: pointer;
    padding: 5px 0;
    position: relative;
}

.amplitude-song-played-progress {
    height: 6px;
    background: white;
    width: 0%;
    transition: width 0.1s ease;
    border-radius: 3px;
    position: relative;
}

.amplitude-song-played-progress::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    opacity: 0;
    transition: all 0.2s ease;
}

.progress-bar:hover .amplitude-song-played-progress::after {
    opacity: 1;
}

.progress-bar:hover {
    height: 8px;
}

.progress-bar:hover .amplitude-song-played-progress {
    height: 8px;
}

.time {
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    opacity: 0.8;
}

.buttons {
    text-align: center;
}

.amplitude-play-pause {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    color: #990000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
}

.amplitude-play-pause:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(255,255,255,0.3);
}

.amplitude-play-pause.amplitude-playing i:before {
    content: "\f04c";
}

@media (max-width: 768px) {
    .music-player-section {
        padding: 40px 15px;
    }

    #custom-player {
        padding: 20px;
    }
}
