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

/* 스플래시 화면 - 처음 접속 시 로고 3초 표시 */
.splash-screen {
    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.4s ease-out;
}

.splash-screen.splash-hidden {
    opacity: 0;
    pointer-events: none;
}

.splash-logo {
    max-width: 90%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.main-nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.nav-item {
    flex: 1;
    padding: 15px 20px;
    text-align: center;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.nav-item:hover {
    background: #e9ecef;
    color: #667eea;
}

.nav-item.active {
    background: white;
    color: #667eea;
    border-bottom-color: #667eea;
}

main {
    padding: 30px;
}

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

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

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

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.9em;
}

/* 홈 화면 */
.home-content {
    text-align: center;
}

.welcome-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.welcome-card h2 {
    font-size: 2em;
    margin-bottom: 10px;
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feature-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.feature-card h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #667eea;
}

.feature-card p {
    margin-bottom: 20px;
    color: #6c757d;
}

/* 단원 관리 */
.filter-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.filter-section label {
    margin-right: 10px;
    font-weight: 600;
}

.filter-section select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    font-size: 1em;
}

.members-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.member-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
}

.member-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.member-card h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.member-info {
    margin-bottom: 15px;
}

.member-info p {
    margin: 5px 0;
    color: #495057;
}

.member-info strong {
    color: #212529;
}

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

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    margin-right: 5px;
}

.badge-part {
    background: #e7f3ff;
    color: #0066cc;
}

.badge-role {
    background: #fff3cd;
    color: #856404;
}

/* 연습일 관리 */
.info-box {
    background: #e7f3ff;
    border-left: 4px solid #667eea;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.schedule-list {
    display: grid;
    gap: 15px;
}

.schedule-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.schedule-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.schedule-info {
    flex: 1;
}

.schedule-date {
    font-size: 1.2em;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 5px;
}

.schedule-memo {
    color: #6c757d;
    margin-top: 5px;
}

.schedule-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #667eea;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* 출석 체크 - 스크롤 최소화 컴팩트 레이아웃 */
.attendance-main {
    padding: 12px 20px 20px;
}

.attendance-main .empty-message {
    padding: 16px 20px;
}

/* 출석 요약: 파트별 출석 인원 + 총 출석 */
.attendance-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #e8f5e9 0%, #e3f2fd 100%);
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    font-size: 0.9em;
}

.attendance-summary-label {
    font-weight: 700;
    color: #2e7d32;
    margin-right: 4px;
}

.attendance-summary-parts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    flex: 1;
    min-width: 0;
}

.attendance-summary-chip {
    background: rgba(255, 255, 255, 0.85);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #b2dfdb;
    color: #37474f;
}

.attendance-summary-chip strong {
    color: #1565c0;
}

.attendance-summary-total {
    font-weight: 600;
    color: #1b5e20;
    white-space: nowrap;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    border: 2px solid #43a047;
}

.attendance-summary-total strong {
    font-size: 1.1em;
}

.attendance-top-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 20px;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 8px;
}

.attendance-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 16px;
}

.attendance-controls .form-group-inline {
    margin-bottom: 0;
}

.attendance-controls .form-group-inline label {
    display: block;
    margin-bottom: 2px;
    font-size: 0.85em;
}

.attendance-controls .form-group-inline select {
    padding: 6px 10px;
    font-size: 0.9em;
    min-width: 160px;
}

.legend-compact {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
    padding: 0 0 2px;
    background: transparent;
}

.legend-compact .legend-item {
    font-size: 0.85em;
}

.legend-compact .status-indicator {
    width: 14px;
    height: 14px;
    margin-right: 4px;
    vertical-align: middle;
}

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

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

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    font-size: 1em;
}

.form-group textarea {
    resize: vertical;
}

.legend {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
}

.status-present {
    background: #28a745;
}

.status-absent {
    background: #dc3545;
}

.status-unknown {
    background: #ffc107;
}

.attendance-section {
    margin-bottom: 30px;
}

.part-section {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.part-title {
    font-size: 1em;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e9ecef;
}

.members-attendance {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px 10px;
}

.member-attendance-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: box-shadow 0.2s;
}

.member-attendance-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.member-attendance-item.present {
    border-color: #28a745;
    background: #d4edda;
}

.member-attendance-item.absent {
    border-color: #dc3545;
    background: #f8d7da;
}

.member-attendance-item.unknown {
    border-color: #ffc107;
    background: #fff3cd;
}

.member-attendance-item .member-name {
    font-weight: 600;
    font-size: 0.9em;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.member-attendance-btns {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.btn-tiny {
    padding: 4px 8px;
    font-size: 0.75em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.btn-tiny:hover {
    opacity: 0.9;
}

.member-name {
    font-weight: 600;
    margin-bottom: 10px;
}

.status-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.status-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.status-btn:hover {
    transform: scale(1.1);
}

.status-btn.active {
    border-color: #333;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
}

/* 출석 체크(멀티) */
.multi-schedule-section {
    margin-top: 20px;
}

.multi-bulk-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.multi-bulk-actions .bulk-label {
    font-weight: 600;
    color: #495057;
    margin-right: 8px;
}

.multi-bulk-actions .btn-bulk[data-status="출석"] { background: #28a745; color: white; }
.multi-bulk-actions .btn-bulk[data-status="불참"] { background: #dc3545; color: white; }
.multi-bulk-actions .btn-bulk[data-status="미정"] { background: #ffc107; color: white; }

.schedules-multi-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.schedule-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    background: #fff;
}

.schedule-row.present { border-color: #28a745; background: #d4edda; }
.schedule-row.absent  { border-color: #dc3545; background: #f8d7da; }
.schedule-row.unknown { border-color: #ffc107; background: #fff3cd; }

.schedule-row-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    min-width: 200px;
}

.schedule-row-check .schedule-row-cb {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.schedule-date {
    font-weight: 500;
    color: #333;
}

.schedule-status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    min-width: 48px;
    text-align: center;
}

.schedule-status-badge.status-present { background: #28a745; color: white; }
.schedule-status-badge.status-absent  { background: #dc3545; color: white; }
.schedule-status-badge.status-unknown { background: #ffc107; color: #333; }

.schedule-row-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.schedule-row-actions .btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.schedule-row-actions button[data-status="출석"] { background: #28a745; color: white; border: none; }
.schedule-row-actions button[data-status="불참"] { background: #dc3545; color: white; border: none; }
.schedule-row-actions button[data-status="미정"] { background: #ffc107; color: #333; border: none; }

.empty-message {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-size: 1.1em;
}

/* 연습곡 목록 - 곡과 곡 사이 색상 구분 */
.songs-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.song-card {
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid transparent;
    transition: box-shadow 0.2s;
}

.song-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 홀수 번째 곡 - 연한 보라 톤 */
.song-card:nth-child(odd) {
    background-color: #f5f0ff;
    border-left-color: #667eea;
}

/* 짝수 번째 곡 - 연한 청록 톤 */
.song-card:nth-child(even) {
    background-color: #e8f4f8;
    border-left-color: #17a2b8;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
}

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

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    color: #000;
}

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

/* 반응형 디자인 */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .main-nav {
        flex-direction: column;
    }

    .nav-item {
        border-bottom: 1px solid #e9ecef;
    }

    .nav-item.active {
        border-bottom-color: #667eea;
    }

    .feature-cards {
        grid-template-columns: 1fr;
    }

    .members-list {
        grid-template-columns: 1fr;
    }

}


