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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%), url('./sn_concert.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: overlay;
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

/* 헤더 내 텍스트 가독성 강화 */
.header h1 {
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.header .sync-time-value {
    color: #fff;
    background: rgba(0,0,0,0.35);
    padding: 4px 8px;
    border-radius: 10px;
}

/* 헤더 버튼 가독성 개선: 어두운 배경 위에서 흰 배경/어두운 글자 */
.member-manage-btn, .sheet-music-manage-btn {
    background: #ffffff;
    color: #333;
    border: 1px solid rgba(0,0,0,0.08);
    margin-right: 10px;
}


.member-manage-btn:hover, .sheet-music-manage-btn:hover {
    background: #f2f2f2;
}


/* GitHub에서 이미지가 로드되지 않을 때를 대비한 대체 배경 */
.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -1;
}

.logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 0 10px auto;
    border: 3px solid white;
    background-color: white;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    display: block;
}

/* 로고가 로드되지 않을 때를 대비한 대체 스타일 */
.logo-fallback {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 0 10px auto;
    border: 3px solid white;
    background-color: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.sync-time {
    position: absolute;
    top: 15px;
    left: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-size: 0.8rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.sync-time-label {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-bottom: 2px;
}

.sync-time-value {
    font-weight: 600;
    font-family: 'Courier New', monospace;
    background: rgba(255,255,255,0.2);
    padding: 2px 6px;
    border-radius: 4px;
    backdrop-filter: blur(5px);
}

.class-info {
    background: #ffffff;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
}

.class-info h2 {
    font-size: 1.2rem;
    color: #495057;
    margin-bottom: 5px;
}

.class-info p {
    color: #6c757d;
    font-size: 0.9rem;
}

.session-selector {
    padding: 20px;
    background: white;
    border-bottom: 1px solid #e9ecef;
}

.session-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #495057;
}

.session-selector select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s ease;
}

.session-selector select:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.attendance-summary {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
}

.summary-item {
    text-align: center;
}

.summary-label {
    display: block;
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 5px;
}

.summary-count {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 900;
    color: #2c3e50;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
    min-height: 2.8rem;
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.member-list {
    padding: 0 20px 20px;
    background: linear-gradient(135deg, #f1f3f4 0%, #e8eaf6 100%);
    border-radius: 8px;
    margin: 10px;
}

.member-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
    position: relative;
    gap: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 6px;
    margin-bottom: 4px;
}

.member-item:hover {
    background-color: #f8f9fa;
}


.member-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.member-name {
    font-weight: 600;
    font-size: 1rem;
    color: #212529;
    margin-bottom: 1px;
    line-height: 1.2;
}

.member-instrument {
    font-size: 0.8rem;
    color: #ffffff;
    font-weight: 600;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    padding: 2px 8px;
    border-radius: 8px;
    display: inline-block;
    margin-top: 1px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    border: 1px solid #2980b9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    max-width: fit-content;
}

.attendance-buttons {
    display: flex;
    gap: 8px;
}

.timestamp-info {
    display: flex;
    align-items: center;
    min-width: 70px;
    justify-content: flex-end;
}

.timestamp {
    font-size: 0.75rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    white-space: nowrap;
}

.attendance-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 45px;
}

.attendance-btn.present {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.attendance-btn.present.active {
    background: #28a745;
    color: white;
    transform: scale(1.05);
    border: 3px solid #155724 !important;
    font-weight: 700;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.3);
}

.attendance-btn.absent {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.attendance-btn.absent.active {
    background: #dc3545;
    color: white;
    transform: scale(1.05);
    border: 3px solid #721c24 !important;
    font-weight: 700;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.3);
}

.attendance-btn.pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.attendance-btn.pending.active {
    background: #ffc107;
    color: #212529;
    transform: scale(1.05);
    border: 3px solid #856404 !important;
    font-weight: 700;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.3);
}

.attendance-btn.holiday {
    background: #e2e3e5;
    color: #6c757d;
    border: 1px solid #d6d8db;
    cursor: not-allowed;
}

.attendance-btn.holiday.active {
    background: #6c757d;
    color: white;
    transform: none;
    border: 3px solid #495057 !important;
    font-weight: 700;
    box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.3);
}


.instrument-summary {
    padding: 20px;
    background: white;
    border-bottom: 1px solid #e9ecef;
}

.instrument-summary h3 {
    font-size: 1.2rem;
    color: #495057;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
}

.instrument-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.instrument-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s ease;
}

.instrument-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.instrument-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.instrument-header h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.member-count {
    font-size: 0.8rem;
    color: #6c757d;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 10px;
}

.attendance-rate {
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.instrument-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
}

.stat-count {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 20px;
    text-align: center;
}

.stat-count.present {
    background: #d4edda;
    color: #155724;
}

.stat-count.absent {
    background: #f8d7da;
    color: #721c24;
}

.stat-count.pending {
    background: #fff3cd;
    color: #856404;
}

.stat-count.holiday {
    background: #e2e3e5;
    color: #6c757d;
}

.sync-status-section {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #6c757d;
}

.sync-indicator {
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.sync-indicator.online {
    color: #28a745;
}

.sync-indicator.offline {
    color: #dc3545;
}

.sync-indicator.syncing {
    color: #ffc107;
    animation: pulse 1s infinite;
}

.sync-text {
    font-weight: 500;
}

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

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 모바일 최적화 */
@media (max-width: 480px) {
    .container {
        margin: 0;
        box-shadow: none;
    }
    
    .header {
        padding: 15px;
        background-size: cover;
        background-position: center;
    }
    
    .header h1 {
        font-size: 1.3rem;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    }
    
    .sync-time {
        top: 10px;
        left: 15px;
        font-size: 0.7rem;
    }
    
    .sync-time-label {
        font-size: 0.6rem;
    }
    
    .sync-time-value {
        font-size: 0.7rem;
        padding: 1px 4px;
    }
    
    .member-item {
        padding: 6px 0;
        gap: 6px;
    }
    
    .attendance-buttons {
        gap: 6px;
    }
    
    .attendance-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
        min-width: 45px;
    }
    
    .timestamp-info {
        min-width: 70px;
    }
    
    .timestamp {
        font-size: 0.7rem;
        padding: 1px 4px;
    }
    
    .summary-count {
        font-size: 1.8rem;
        min-height: 2.2rem;
    }
    
    .member-instrument {
        font-size: 0.9rem;
        padding: 1px 6px;
    }
    
    .instrument-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .instrument-card {
        padding: 10px;
    }
    
    .instrument-header h4 {
        font-size: 0.9rem;
    }
    
    .member-count {
        font-size: 0.7rem;
        padding: 1px 4px;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .stat-count {
        font-size: 0.85rem;
        padding: 1px 4px;
    }
}

/* 다크모드 지원 */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }
    
    .container {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .class-info, .attendance-summary, .save-section {
        background: #34495e;
        border-color: #4a5f7a;
    }
    
    .summary-count {
        background: rgba(52, 73, 94, 0.9);
        color: #ecf0f1;
        text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    }
    
    .member-item {
        border-color: #4a5f7a;
    }
    
    .member-item:hover {
        background-color: #34495e;
    }
    
    .member-instrument {
        background: linear-gradient(135deg, #2980b9 0%, #1f5f8b 100%);
        color: #ffffff;
        text-shadow: 0 1px 2px rgba(0,0,0,0.5);
        border: 1px solid #1f5f8b;
    }
    
    .session-selector select {
        background: #34495e;
        color: #ecf0f1;
        border-color: #4a5f7a;
    }
}

/* 회원 관리 관련 스타일 */
.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

/* 헤더 버튼 통일된 디자인 - 더 눈에 잘 들어오도록 개선 */
.member-manage-btn, .sheet-music-manage-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #2c3e50;
    border: 2px solid rgba(255,255,255,0.8);
    border-radius: 25px;
    padding: 10px 20px;
    margin-right: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-shadow: none;
    letter-spacing: 0.5px;
}

.member-manage-btn:hover, .sheet-music-manage-btn:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    border-color: rgba(255,255,255,1);
}

.member-manage-btn:active, .sheet-music-manage-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background-color: rgba(255,255,255,0.2);
}

.modal-body {
    padding: 20px;
}

.member-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.add-member-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.add-member-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.member-manage-list {
    max-height: 400px;
    overflow-y: auto;
}

.member-manage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 10px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.member-manage-item:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.member-info {
    flex: 1;
}

.member-info .member-name {
    font-weight: 800;
    font-size: 16px;
    color: #111827; /* 거의 검정, 더 선명 */
    margin-bottom: 4px;
}

.member-info .member-instrument {
    color: #374151; /* 중간 진회색 */
    font-size: 13.5px;
}

.member-actions {
    display: flex;
    gap: 10px;
}

.edit-member-btn, .delete-member-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.edit-member-btn {
    background: #4CAF50;
    color: white;
}

.edit-member-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.delete-member-btn {
    background: #f44336;
    color: white;
}

.delete-member-btn:hover {
    background: #da190b;
    transform: translateY(-1px);
}

/* 회원 폼 스타일 */
.member-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

.cancel-btn, .save-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.cancel-btn {
    background: #f5f5f5;
    color: #666;
    border: 2px solid #e0e0e0;
}

.cancel-btn:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.save-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 반응형 디자인 */
@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .member-manage-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .member-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

/* 악보 관리 스타일 */
.sheet-music-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.add-sheet-music-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.3s;
}

.add-sheet-music-btn:hover {
    background: #218838;
}

.search-box {
    flex: 1;
    max-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem;
}

.sheet-music-list {
    max-height: 400px;
    overflow-y: auto;
}

.sheet-music-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.sheet-music-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.sheet-music-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.sheet-music-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.sheet-music-actions {
    display: flex;
    gap: 8px;
}

.sheet-music-actions button {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.3s;
}

.edit-sheet-music-btn {
    background: #007bff;
    color: white;
}

.edit-sheet-music-btn:hover {
    background: #0056b3;
}

.delete-sheet-music-btn {
    background: #dc3545;
    color: white;
}

.delete-sheet-music-btn:hover {
    background: #c82333;
}

.sheet-music-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    font-size: 0.9rem;
    color: #6c757d;
}

.sheet-music-detail {
    display: flex;
    align-items: center;
}

.sheet-music-detail strong {
    margin-right: 5px;
    color: #495057;
}

.sheet-music-notes {
    margin-top: 8px;
    padding: 8px;
    background: #ffffff;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #6c757d;
    border-left: 3px solid #007bff;
}

.sheet-music-form {
    max-width: 500px;
    margin: 0 auto;
}

.sheet-music-form .form-group {
    margin-bottom: 15px;
}

.sheet-music-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.sheet-music-form input,
.sheet-music-form select,
.sheet-music-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.sheet-music-form input:focus,
.sheet-music-form select:focus,
.sheet-music-form textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.sheet-music-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* 모바일 대응 */
@media (max-width: 600px) {
    .sheet-music-list-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: none;
    }
    
    .sheet-music-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .sheet-music-actions {
        justify-content: flex-end;
    }
    
    .sheet-music-details {
        grid-template-columns: 1fr;
    }
}

/* 모바일 터치 개선 */
.file-tag {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.file-preview-btn, .file-download-btn, .file-delete-btn {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    -webkit-touch-callout: none;
    touch-action: manipulation;
    min-height: 44px; /* iOS 권장 터치 영역 */
    min-width: 44px;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

/* 모바일에서 버튼 터치 피드백 */
@media (max-width: 768px) {
    .file-tag {
        padding: 12px 16px; /* 터치 영역 확대 */
        margin: 8px 0;
        border-radius: 8px;
        background-color: rgba(0, 123, 255, 0.1);
        border: 2px solid rgba(0, 123, 255, 0.3);
        transition: all 0.2s ease;
    }
    
    .file-tag:active {
        background-color: rgba(0, 123, 255, 0.2);
        transform: scale(0.95);
        border-color: rgba(0, 123, 255, 0.5);
    }
    
    .file-preview-btn, .file-download-btn, .file-delete-btn {
        padding: 12px 20px;
        margin: 4px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 600;
        transition: all 0.2s ease;
    }
    
    .file-preview-btn:active, .file-download-btn:active, .file-delete-btn:active {
        transform: scale(0.9);
        opacity: 0.8;
    }
    
    .file-preview-btn {
        background-color: #007bff;
        color: white;
        border: none;
    }
    
    .file-download-btn {
        background-color: #28a745;
        color: white;
        border: none;
    }
    
    .file-delete-btn {
        background-color: #dc3545;
        color: white;
        border: none;
    }
}

/* ==================== 연습곡 관리 스타일 ==================== */

/* 연습곡 관리 버튼 */
.practice-song-manage-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    margin-left: 10px;
}

.practice-song-manage-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.practice-song-manage-btn:active {
    transform: translateY(0);
}

/* 연습곡 관리 모달 */
.practice-song-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.add-practice-song-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-practice-song-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.practice-song-manage-list {
    max-height: 400px;
    overflow-y: auto;
}

.practice-song-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.practice-song-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.practice-song-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.practice-song-info h3 {
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 16px;
}

.practice-song-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
}

.practice-song-meta span {
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.practice-song-meta .practice-count {
    background: #007bff;
    color: white;
    font-weight: 500;
    border: 1px solid #007bff;
}

/* 연습곡 할당 모달의 메타 정보 스타일 */
.song-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.song-meta span {
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: #6c757d;
    border: 1px solid #e9ecef;
}

.song-meta .composer {
    background: #e3f2fd;
    color: #1976d2;
    border-color: #bbdefb;
}

.song-meta .difficulty {
    background: #f3e5f5;
    color: #7b1fa2;
    border-color: #e1bee7;
}

.song-meta .practice-count-badge {
    background: #007bff;
    color: white;
    font-weight: 500;
    border: 1px solid #007bff;
}

.practice-song-description {
    color: #495057;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.practice-song-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.practice-song-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-practice-song-btn {
    background: #007bff;
    color: white;
}

.edit-practice-song-btn:hover {
    background: #0056b3;
}

.delete-practice-song-btn {
    background: #dc3545;
    color: white;
}

.delete-practice-song-btn:hover {
    background: #c82333;
}

.assign-practice-song-btn {
    background: #28a745;
    color: white;
}

.assign-practice-song-btn:hover {
    background: #218838;
}

/* 연습곡 폼 */
.practice-song-form {
    max-width: 500px;
    margin: 0 auto;
}

.practice-song-form .form-group {
    margin-bottom: 20px;
}

.practice-song-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.practice-song-form input,
.practice-song-form textarea,
.practice-song-form select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.practice-song-form input:focus,
.practice-song-form textarea:focus,
.practice-song-form select:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.practice-song-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* 차수별 연습곡 설정 */
.session-practice-song-content {
    max-width: 800px;
    margin: 0 auto;
}

.session-selector {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.session-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
}

.session-selector select {
    width: 200px;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
}

.practice-song-assignment {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.available-songs,
.assigned-songs {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

.available-songs h3,
.assigned-songs h4 {
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.song-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.song-item:hover {
    background: #e9ecef;
}

.song-info {
    flex: 1;
}

.song-info h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #2c3e50;
}

.song-info p {
    margin: 0;
    font-size: 12px;
    color: #6c757d;
}

.song-actions {
    display: flex;
    gap: 5px;
}

.song-actions button {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-song-btn {
    background: #28a745;
    color: white;
}

.add-song-btn:hover {
    background: #218838;
}

.remove-song-btn {
    background: #dc3545;
    color: white;
}

.remove-song-btn:hover {
    background: #c82333;
}

.assigned-songs-list {
    min-height: 200px;
    max-height: 300px;
    overflow-y: auto;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .practice-song-manage-btn {
        padding: 10px 15px;
        font-size: 12px;
        margin-left: 5px;
    }
    
    .practice-song-list-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .practice-song-assignment {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .practice-song-actions {
        flex-wrap: wrap;
    }
    
    .practice-song-actions button {
        flex: 1;
        min-width: 60px;
    }
    
}

/* 이번 회차 연습곡 표시 영역 */
.current-session-songs {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.current-session-songs h3 {
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 8px;
}

.session-songs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    min-height: 40px;
}

.session-songs-list .no-songs {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    width: 100%;
    padding: 10px;
}

.session-songs-list .song-item {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
    transition: all 0.2s ease;
}

.session-songs-list .song-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.4);
}

/* 다크 모드 */
@media (prefers-color-scheme: dark) {
    .current-session-songs {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
        border-color: #4a5568;
    }
    
    .current-session-songs h3 {
        color: #e2e8f0;
        border-bottom-color: #4a5568;
    }
    
    .session-songs-list .no-songs {
        color: #a0aec0;
    }
    
    .session-songs-list .song-item {
        background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
        box-shadow: 0 2px 4px rgba(49,130,206,0.3);
    }
    
    .session-songs-list .song-item:hover {
        box-shadow: 0 4px 8px rgba(49,130,206,0.4);
    }
}
