/* MP3 게시판 목록 CSS - 모바일 퍼스트 */

/* 기본 모바일 스타일 */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
}

/* 헤더 영역 */
.mp3-board-header {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px 15px;
    background: linear-gradient(135deg, #f2f2f2 0%, #ffffe6 100%);
    border-radius: 12px;
    color: #000066;
}

.board-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.board-description {
    font-size: 14px;
    margin: 0;
    opacity: 0.9;
}

/* 검색 폼 */
.search-form-board {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-input,
.search-category {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-input:focus,
.search-category:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-button {
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.search-button:hover {
    background: #5a67d8;
}

/* 관리자 컨트롤 */
.admin-controls {
    margin-bottom: 15px;
}

.select-all-container {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.select-all-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    margin: 0;
}

.select-all-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* MP3 목록 컨테이너 */
.mp3-list-container {
    margin-bottom: 25px;
}

.mp3-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.mp3-item {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mp3-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.checkbox-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    padding: 5px;
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.mp3-card {
    padding: 15px;
}

/* 썸네일 영역 */
.mp3-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}

.thumb-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mp3-item:hover .thumb-image {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(102, 126, 234, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mp3-item:hover .play-overlay {
    opacity: 1;
}

.track-count {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 정보 영역 */
.mp3-info {
    padding: 0;
}

.mp3-category {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.mp3-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.4;
}

.mp3-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mp3-title a:hover {
    color: #667eea;
}

.first-track {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mp3-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

.mp3-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stats {
    display: flex;
    gap: 12px;
}

.stats i {
    margin-right: 4px;
}

/* 관리자 액션 */
.admin-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn-edit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.btn-edit:hover {
    background: #218838;
    color: white;
}

/* 버튼 그룹 */
.admin-button-group {
    text-align: center;
    margin-bottom: 20px;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-danger:hover:not(:disabled) {
    background: #c82333;
}

.btn-danger:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.write-button-container {
/*
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
*/
	text-align: center;
    margin: 20px 0;
}

.btn-write {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.btn-write:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 25px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: #5a67d8;
    color: white;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.pagination a:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination .active {
    background: #667eea;
    color: white;
    border-color: #667eea;
    font-weight: 600;
}

/* 반응형 - 태블릿 (768px 이상) */
@media (min-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .board-title {
        font-size: 28px;
    }
    
    .board-description {
        font-size: 16px;
    }
    
    .search-row {
        flex-direction: row;
        align-items: center;
    }
    
    .search-input {
        flex: 2;
    }
    
    .search-category {
        flex: 1;
    }
    
    .search-button {
        flex: 0 0 auto;
        padding: 12px 24px;
    }
    
    .mp3-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .mp3-meta {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .mp3-meta .author,
    .mp3-meta .date {
        flex: 0 0 auto;
    }
    
    .mp3-meta .stats {
        flex: 1;
        justify-content: flex-end;
    }
}

/* 반응형 - 데스크탑 (1024px 이상) */
@media (min-width: 1024px) {
    .container {
        max-width: 1200px;
        padding: 25px;
    }
    
    .mp3-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .mp3-card {
        padding: 20px;
    }
    
    .mp3-thumbnail {
        height: 220px;
        margin-bottom: 20px;
    }
    
    .mp3-title {
        font-size: 18px;
    }
    
    .first-track {
        font-size: 15px;
    }
    
    .write-button-container {
        bottom: 30px;
        right: 30px;
    }
}

/* 반응형 - 큰 데스크탑 (1200px 이상) */
@media (min-width: 1200px) {
    .mp3-list {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .search-form-board {
        padding: 20px;
    }
    
    .mp3-board-header {
        padding: 30px;
        margin-bottom: 35px;
    }
    
    .board-title {
        font-size: 32px;
    }
    
    .board-description {
        font-size: 18px;
    }
}

/* 애니메이션 효과 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mp3-item {
    animation: fadeInUp 0.5s ease-out;
}

.mp3-item:nth-child(1) { animation-delay: 0.1s; }
.mp3-item:nth-child(2) { animation-delay: 0.2s; }
.mp3-item:nth-child(3) { animation-delay: 0.3s; }
.mp3-item:nth-child(4) { animation-delay: 0.4s; }
.mp3-item:nth-child(5) { animation-delay: 0.5s; }
.mp3-item:nth-child(6) { animation-delay: 0.6s; }

/* 로딩 상태 */
.mp3-item.loading {
    opacity: 0.6;
    pointer-events: none;
}

.mp3-item.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 접근성 향상 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .mp3-item:hover {
        transform: none;
    }
    
    .mp3-item:hover .thumb-image {
        transform: none;
    }
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .mp3-item {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .search-form-board {
        background: #2d3748;
    }
    
    .search-input,
    .search-category {
        background: #4a5568;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .search-input:focus,
    .search-category:focus {
        background: #2d3748;
        border-color: #667eea;
    }
    
    .mp3-title a {
        color: #e2e8f0;
    }
    
    .mp3-title a:hover {
        color: #667eea;
    }
    
    .select-all-container {
        background: #4a5568;
    }
    
    .select-all-label {
        color: #cbd5e0;
    }
}

/* 포커스 표시 개선 */
.search-input:focus-visible,
.search-category:focus-visible,
.search-button:focus-visible,
.btn-write:focus-visible,
.btn-edit:focus-visible,
.btn-danger:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* 터치 디바이스 최적화 */
@media (hover: none) and (pointer: coarse) {
    .search-button,
    .btn-write,
    .btn-edit,
    .btn-danger {
        min-height: 44px;
    }
    
    .play-overlay {
        opacity: 1;
        background: rgba(102, 126, 234, 0.7);
    }
    
    .mp3-item:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    
    .mp3-item:hover .thumb-image {
        transform: none;
    }
}

/* 인쇄용 스타일 */
@media print {
    .search-form-board,
    .admin-controls,
    .admin-button-group,
    .write-button-container,
    .pagination {
        display: none;
    }
    
    .mp3-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .mp3-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}




/* 검색 결과 헤더 */
.search-result-header {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.search-result-header h3 {
    color: #495057;
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.search-result-header .result-count {
    color: #6c757d;
    margin: 0 0 15px 0;
    font-size: 0.9em;
}

.clear-search-btn {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
    transition: background 0.3s;
}

.clear-search-btn:hover {
    background: #0056b3;
    text-decoration: none;
    color: white;
}

.clear-search-btn i {
    margin-right: 5px;
}
/* 검색 결과 헤더 */