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

body, html {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    /* 배경 이미지 설정 */
    background-image: url('../img/bg-image.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    
    /* 폴백 배경색 */
    background-color: #f0f0f0;
    
    /* 텍스트 기본 설정 */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

/* 반응형: 화면이 좁아지면 중앙 유지 */
@media (max-width: 768px) {
    body {
        background-size: auto 100%;
        background-position: center center;
    }
}

/* 컨텐츠 영역 */
.container {
    position: relative;
    height: 100%;
    min-height: 620px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* MP3 플레이어 */
.music-player {
    width: 300px;
    height: 580px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    color: white;
}

.player-header {
    text-align: center;
    margin-bottom: 30px;
    height: 55px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.player-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-artist {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 앨범 커버 */
.album-art {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.album-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.album-placeholder {
    z-index: 1;
}

/* 좋아요 버튼 */
.like-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    opacity: 0.8;
    color: white;
    font-size: 0.85rem;
}

.like-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    opacity: 1;
    transform: scale(1.05);
}

.like-btn:active {
    transform: scale(0.95);
}

.like-btn.liked {
    background: rgba(255, 20, 147, 0.6);
    border-color: rgba(255, 20, 147, 0.8);
}

.like-btn.liked:hover {
    background: rgba(255, 20, 147, 0.8);
}

.like-icon {
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 0.2s;
}

.like-btn.liked .like-icon {
    transform: scale(1.2);
}

.like-count {
    font-weight: 500;
    min-width: 12px;
    text-align: center;
}

/* 진행 바 */
.progress-container {
    margin-bottom: 20px;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.1s;
}

/* 컨트롤 버튼 */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.control-btn.play-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-size: 1.5rem;
}

.control-btn.play-btn:hover {
    background: linear-gradient(135deg, #7c8eea 0%, #8a5ab2 100%);
}

/* 볼륨 컨트롤 */
.volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-icon {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
}

.volume-slider {
    flex: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
}

.volume-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 70%;
}

/* 플레이 모드 선택 */
.play-mode-container {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.play-mode-btn {
    flex: 1;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    outline: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-height: 60px;
    justify-content: center;
}

.play-mode-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.play-mode-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.play-mode-btn .mode-icon {
    font-size: 1.2rem;
}

.play-mode-btn .mode-text {
    font-size: 0.75rem;
    white-space: nowrap;
}

/* 플레이리스트 */
.playlist {
    margin-top: 20px;
    max-height: 200px;
    overflow-y: auto;
}

.playlist-item {
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.playlist-item.active {
    background: rgba(102, 126, 234, 0.3);
}

/* 스크롤바 스타일 */
.playlist::-webkit-scrollbar {
    width: 6px;
}

.playlist::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.playlist::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

/* 관리자 설정 버튼 */
.admin-settings-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 25px;
    height: 25px;
    /* background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2); */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.5s ease;
    z-index: 900;
    text-decoration: none;
    font-size: 22px;
}

.admin-settings-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg) scale(1.1);
}

/* 하단 고정 네비게이션 바 */
.bottom-nav-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    height: 70px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    padding: 0;
    padding-bottom: max(0px, env(safe-area-inset-bottom));
    z-index: 1000;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3);
    transition: transform 1.5s ease-out, opacity 1.5s ease-out;
    box-sizing: border-box;
}

/* About, Contact, Privacy 페이지에서 하단 바 아래로 숨기기 (부드러운 애니메이션) */
body:has(.about-player) .bottom-nav-bar,
body:has(.contact-player) .bottom-nav-bar,
body:has(.privacy-player) .bottom-nav-bar {
    transform: translateX(-50%) translateY(100%);
    opacity: 0;
    pointer-events: none;
}

/* 브랜딩 바 (About, Contact, Privacy 페이지용) */
.branding-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: 500px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    padding: 0 20px;
    padding-bottom: max(0px, env(safe-area-inset-bottom));
    z-index: 1000;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: transform 1.5s ease-out, opacity 1.5s ease-out;
    box-sizing: border-box;
}

/* About, Contact, Privacy 페이지에서 브랜딩 바 표시 */
body:has(.about-player) .branding-bar,
body:has(.contact-player) .branding-bar,
body:has(.privacy-player) .branding-bar {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.branding-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.branding-text {
    color: #ccc;
    font-size: 1.5rem;
    font-weight: 500;
    white-space: nowrap;
}

.bottom-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px 5px;
    transition: transform 1.5s ease-out;
    border-radius: 8px;
    min-height: 50px;
    gap: 4px;
}

.bottom-nav-btn:hover {
    background: none;
    transform: translateY(-2px);
}

.bottom-nav-btn:active {
    transform: translateY(0);
}

.bottom-nav-btn .btn-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.bottom-nav-btn .btn-text {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1;
}

.bottom-nav-btn.active {
    background: none;
    color: #fff;
}

/* 한번만 재생 모드: 순회 아이콘에 사선 추가 */
.bottom-nav-btn.repeat-once .btn-icon {
    position: relative;
}

.bottom-nav-btn.repeat-once .btn-icon::after {
    content: '/';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    font-size: 1.5rem;
    font-weight: 900;
    color: #ff6b35;
    line-height: 1;
    pointer-events: none;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}

/* App 설치 메시지 레이어 (좌측 상단) */
.install-message {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.install-message-content {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 280px;
    max-width: 320px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.install-message-text {
    flex: 1;
    color: white;
}

.install-message-text strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
    color: #fff;
}

.install-message-text p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.install-message-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.install-message-btn:hover {
    background: linear-gradient(135deg, #7c8eea 0%, #8a5ab2 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.install-message-btn:active {
    transform: translateY(0);
}

.install-message-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.install-message-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .admin-settings-btn {
        width: 25px;
        height: 25px;
        top: 10px;
        right: 10x;
        font-size: 20px;
    }
    
    .bottom-nav-bar {
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
    
    .bottom-nav-btn {
        min-height: 45px;
        padding: 6px 3px;
    }
    
    .bottom-nav-btn .btn-icon {
        font-size: 1.3rem;
    }
    
    .install-message {
        top: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .install-message-content {
        min-width: auto;
        max-width: 100%;
        padding: 12px 15px;
    }
    
    .install-message-text strong {
        font-size: 0.9rem;
    }
    
    .install-message-text p {
        font-size: 0.8rem;
    }
    
    .install-message-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

