/* MP3 게시판 재생 페이지 CSS - 모바일 퍼스트 */

/* 기본 모바일 스타일 */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
}

/* 게시물 헤더 */
.post-header {
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.post-category {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.breadcrumb {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.breadcrumb:hover {
    color: white;
}

.category-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-title {
    font-size: 22px;
    font-weight: bold;
    margin: 0 0 15px 0;
    line-height: 1.3;
    word-break: break-word;
}

.post-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    opacity: 0.9;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stats {
    display: flex;
    gap: 15px;
}

/* MP3 플레이어 섹션 */
.mp3-player-section {
    margin-bottom: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.player-container {
    padding: 15px;
}

/* 플레이어 제목 */
.player-title {
    text-align: center;
    padding: 15px 0px;
    background: linear-gradient(90deg, #f8f9fa, #e9ecef, #f8f9fa);
    border-radius: 10px;
    margin-bottom: 25px;
    position: relative;
	display: flex;
    align-items: center;
    justify-content: space-between; /* 양쪽 끝 정렬 */
}

.prev-btn,
.next-btn {
/*
    position: absolute;
    top: 50%;
*/
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    user-select: none;
	flex-shrink: 0; /* 크기 고정 */
}

.prev-btn {
    left: 15px;
}

.next-btn {
    right: 15px;
}

.prev-btn:hover,
.next-btn:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

.current-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    padding: 0 20px;
    word-break: break-word;
	flex: 1; /* 남은 공간 모두 차지 */
    text-align: center;
}

/* 원형 플레이어 */
.player-body {
    margin-bottom: 25px;
}

.circle-player {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    background: conic-gradient(#e0e0e0 0deg, #e0e0e0 0deg, #e0e0e0 0deg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 0 auto;
}

.circle-player:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.player-image {
    cursor: default;
    background: radial-gradient(#ffffff 65%, #ffffff00 65%);
    border-radius: 50%;
    overflow: hidden;
}

.player-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.button-table {
    position: absolute;
    cursor: default;
    width: 100%;
    table-layout: fixed;
    clip-path: circle(50%);
}

.button-table td {
    font-family: 'NEXON Lv1 Gothic OTF', sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    padding: 5px;
}

.time-display {
    font-size: 12px;
    min-width: 45px;
}

.time-display.left {
    text-align: right;
}

.time-display.right {
    text-align: left;
}

.controls {
    text-align: center;
}

.play-btn,
.stop-btn {
    width: 50px;
    height: 50px;
    cursor: pointer;
    border-radius: 50%;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.play-btn:hover,
.stop-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

/* 플레이어 정보 */
.player-info {
    text-align: center;
}

.current-track-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.track-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 15px 0;
    color: #333;
}

.track-lyrics {
    color: #666;
    line-height: 1.6;
    white-space: pre-wrap;
    font-size: 14px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* 플레이리스트 섹션 */
.playlist-section {
    margin-bottom: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.playlist-title {
    padding: 20px;
    margin: 0;
    background: linear-gradient(90deg, #f8f9fa, #e9ecef);
    font-size: 18px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.playlist {
    padding: 0;
}

.list-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.list-item.active {
    background: linear-gradient(90deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
}

.list-item.active:hover {
    background: linear-gradient(90deg, #5a67d8, #6b46c1);
}

.track-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    margin-right: 15px;
    flex-shrink: 0;
}

.list-item.active .track-number {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.track-info {
    flex: 1;
    min-width: 0;
}

.track-name {
    font-size: 16px;
    font-weight: 600;
    word-break: break-word;
}

/* 게시물 내용 */
.post-content {
    margin-bottom: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.post-content h3 {
    padding: 20px;
    margin: 0;
    background: linear-gradient(90deg, #f8f9fa, #e9ecef);
    font-size: 18px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.content-text {
    padding: 25px;
    line-height: 1.7;
    color: #555;
    font-size: 15px;
}

/* 추가 이미지 갤러리 */
.additional-images {
    margin-bottom: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.additional-images h3 {
    padding: 20px;
    margin: 0;
    background: linear-gradient(90deg, #f8f9fa, #e9ecef);
    font-size: 18px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.image-gallery {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 이미지 모달 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.modal-close:hover {
    opacity: 0.7;
}

#modalImage {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

/* 게시물 액션 */
.post-actions {
    text-align: center;
    margin-bottom: 25px;
}

.like-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.like-btn:hover:not(.disabled) {
    background: linear-gradient(135deg, #ee5a24, #ff6b6b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.like-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* 관리 버튼 */
.management-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    color: white;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    color: white;
}

/* 반응형 - 태블릿 (768px 이상) */
@media (min-width: 768px) {
    .container {
        padding: 20px;
        max-width: 800px;
    }
    
    .post-title {
        font-size: 28px;
    }
    
    .post-meta {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .current-title {
        font-size: 18px;
    }
    
    .track-title {
        font-size: 20px;
    }
    
    .track-lyrics {
        font-size: 15px;
        max-height: 300px;
    }
    
    .image-gallery {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .management-buttons {
        justify-content: flex-start;
    }
}

/* 반응형 - 데스크탑 (1024px 이상) */
@media (min-width: 1024px) {
    .container {
        padding: 30px;
        max-width: 900px;
    }
    
    .player-container {
        padding: 40px;
    }
    
    .post-title {
        font-size: 32px;
    }
    
    .image-gallery {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
    }
}

/* 모바일에서 버튼 크기 조정 */
@media (hover: none) and (pointer: coarse) {
    .button-table td {
        font-size: 12px;
    }
    
    .play-btn,
    .stop-btn {
        width: 40px;
        height: 40px;
    }
    
    .prev-btn,
    .next-btn {
        padding: 12px;
        font-size: 16px;
    }
}

/* 접근성 향상 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .circle-player:hover {
        transform: none;
    }
    
    .gallery-item:hover {
        transform: none;
    }
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .mp3-player-section,
    .playlist-section,
    .post-content,
    .additional-images {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .player-title,
    .playlist-title,
    .post-content h3,
    .additional-images h3 {
        background: linear-gradient(90deg, #4a5568, #2d3748);
        color: #e2e8f0;
        border-bottom-color: #4a5568;
    }
    
    .current-track-info {
        background: #4a5568;
    }
    
    .track-lyrics {
        background: #2d3748;
        border-color: #4a5568;
        color: #cbd5e0;
    }
    
    .list-item:hover {
        background: #4a5568;
    }
    
    .management-buttons {
        background: #4a5568;
    }
    
    .track-number {
        background: #4a5568;
        color: #e2e8f0;
    }
}

