/* 기본 배경 및 글꼴 설정 */
body {
    background-color: #f4f7f6;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* 헤더 스타일 */
.header h1 {
    font-weight: bold;
    color: #333;
}
.header p {
    color: #666;
    font-size: 1.1rem;
}

/* 3D 뷰를 위한 원근감(카메라 거리) 설정 */
.map-container {
    height: clamp(400px, 70vh, 700px);
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 2000px;
}

/* 3D 건물 전체를 감싸는 컨테이너 */
.building-exploded {
    position: relative;
    width: clamp(250px, 50vw, 400px);
    height: clamp(320px, 60vw, 500px);
    transform-style: preserve-3d;
    transform: rotateX(55deg) rotateZ(45deg);
}

/* 각 층(레이어)의 기본 스타일 */
.floor-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.4s ease-out;
    transform-style: preserve-3d;
}

/* 마우스를 올렸을 때 효과 */
.floor-layer:hover {
    transform: translateY(-20px) scale(1.08);
    filter: brightness(1.1);
}

/* 각 층의 평면(판) 스타일 */
.floor-plate {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
}

/* 층의 윗면 스타일 */
.floor-top {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    border: 3px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 8px 25px rgba(0,0,0,0.3),
        inset 0 -2px 10px rgba(0,0,0,0.2),
        inset 0 2px 10px rgba(255,255,255,0.1);
    transform: translateZ(0);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* 각 층의 측면들 추가 */
.floor-top::before,
.floor-top::after {
    content: '';
    position: absolute;
    background: inherit;
    filter: brightness(0.7);
}

/* 앞면 */
.floor-top::before {
    width: 100%;
    height: 30px;
    bottom: 0;
    left: 0;
    transform-origin: bottom;
    transform: rotateX(-90deg);
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

/* 옆면 */
.floor-top::after {
    width: 30px;
    height: 100%;
    right: 0;
    top: 0;
    transform-origin: right;
    transform: rotateY(90deg);
    box-shadow: 5px 0 15px rgba(0,0,0,0.4);
}

/* 각 층별 평면도 배경 이미지 및 Y축 위치(분리 효과) 설정 */
.floor-4 .floor-top { 
    background: url('/static/images/4층.svg') center/contain no-repeat,
                linear-gradient(135deg, #00bfa5 0%, #00897b 100%);
}
.floor-3 .floor-top { 
    background: url('/static/images/3층.svg') center/contain no-repeat,
                linear-gradient(135deg, #ff4081 0%, #e91e63 100%);
}
.floor-2 .floor-top { 
    background: url('/static/images/2층.svg') center/contain no-repeat,
                linear-gradient(135deg, #ff6d00 0%, #f57c00 100%);
}
.floor-1 .floor-top { 
    background: url('/static/images/1층.svg') center/contain no-repeat,
                linear-gradient(135deg, #f50057 0%, #c51162 100%);
}

/* 층간 간격을 더 넓게 조정 */
.floor-4 { transform: translateY(-100px); }
.floor-3 { transform: translateY(-20px); }
.floor-2 { transform: translateY(60px); }
.floor-1 { transform: translateY(140px); }

/* 마우스를 올렸을 때의 위치 보정 */
.floor-4:hover { transform: translateY(-120px) scale(1.08); }
.floor-3:hover { transform: translateY(-40px) scale(1.08); }
.floor-2:hover { transform: translateY(40px) scale(1.08); }
.floor-1:hover { transform: translateY(120px) scale(1.08); }

/* 층 내부 구조 표시를 위한 추가 요소 */
.floor-plate::before {
    content: '';
    position: absolute;
    width: 90%;
    height: 90%;
    top: 5%;
    left: 5%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
    z-index: 1;
}

/* 층별 상세 2D 뷰 스타일 */
#floor-detail-view {
    width: 100%;
    text-align: center;
}

.floor-plan-container {
    max-width: min(800px, 95vw);
    margin: 0 auto;
    border: 1px solid #ddd;
    background-color: white;
    position: relative;
    overflow: hidden;  /* 스크롤 없이 한눈에 보기 */
}

#floor-plan-image {
    width: 100%;
    height: auto;
    display: block;  /* 이미지 아래 공백 제거 */
}

/* ===== 시간표 모달 스타일 (모던 디자인) ===== */
.schedule-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    overflow-y: auto;  /* 🔧 전체 스크롤 가능 */
    padding: 20px 0;  /* 🔧 상하 여백 */
    animation: fadeIn 0.2s ease;
    backdrop-filter: blur(4px);
    padding: 20px 0;
}

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

.schedule-modal {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;  /* 🔧 너비 축소 */
    width: 85%;  /* 🔧 비율 축소 */
    max-height: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    margin: auto;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.schedule-header {
    background: #10b981;
    color: white;
    padding: 20px 28px;
    position: relative;
    border-bottom: 3px solid #059669;
}

.schedule-header h3 {
    margin: 0 0 6px 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.semester-info {
    margin: 0;
    opacity: 0.85;
    font-size: 13px;
    font-weight: 400;
}

.close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.schedule-content {
    padding: 16px;
    overflow-y: visible;  /* 🔧 스크롤 제거 */
    background: #f8fafc;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-schedule {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
    font-size: 16px;
}

/* ===== 시간표 테이블 스타일 ===== */
.timetable {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 2px solid #cbd5e1;
    table-layout: fixed; /* 🔧 테이블 셀 너비 고정 - 월~금 동일 간격 */
    font-size: 12px;  /* 🔧 폰트 크기 조정으로 한눈에 보이게 */
}

.timetable thead {
    background: #f1f5f9;
    color: #1e293b;
}

.timetable thead th {
    padding: 10px 8px;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    border-right: 1px solid #e2e8f0;
    border-bottom: 2px solid #cbd5e1;
    width: auto; /* 월/화/수/목/금 동일한 너비 */
}

.timetable thead th:last-child {
    border-right: none;
}

.period-header {
    width: 100px !important; /* 교시 칸만 고정 너비 */
    background: #e2e8f0 !important;
    font-weight: 700;
}

.timetable tbody tr {
    border-bottom: 1px solid #cbd5e1;
}

.timetable tbody tr:last-child {
    border-bottom: none;
}

.timetable td {
    border: 1px solid #cbd5e1;
}

.timetable tbody tr:hover {
    background: #f8f9fa;
}

.period-cell {
    background: #f8fafc;
    text-align: center;
    padding: 4px 2px;  /* 🔧 패딩 더 축소 */
    border-right: 2px solid #cbd5e1;
    vertical-align: middle;
    font-weight: 500;
    height: 50px;  /* 🔧 높이 축소 */
}

.period-number {
    font-size: 14px;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 2px;
}

.period-time {
    font-size: 10px;
    color: #64748b;
    font-weight: 400;
}

.empty-cell {
    background: #ffffff;
    padding: 8px;
    text-align: center;
    height: 60px;  /* 🔧 고정 높이 */
    transition: background 0.2s;
}

.empty-cell:hover {
    background: #f8fafc;
}

.course-cell {
    padding: 0;
    text-align: center;
    vertical-align: middle;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.course-cell:hover {
    filter: brightness(0.95);
    transform: scale(1.02);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.course-info {
    padding: 6px 4px;  /* 🔧 패딩 축소 */
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
}

.course-cell .course-name {
    font-size: 11px;  /* 🔧 폰트 축소 */
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    word-break: keep-all;
}

.course-cell .course-professor {
    font-size: 10px;  /* 🔧 폰트 축소 */
    margin: 0;
    font-weight: 500;
    opacity: 0.9;
}

.course-cell .course-classroom {  /* 🆕 교수실용 강의실 표시 */
    font-size: 10px;
    margin: 0;
    font-weight: 500;
    opacity: 0.9;
}

.course-cell .course-time {
    font-size: 9px;  /* 🔧 폰트 축소 */
    margin: 2px 0 0 0;
    font-weight: 400;
    opacity: 0.8;
}

/* 다양한 수업 색상 */
.course-color-1 { background: #ddd6fe; color: #5b21b6; }
.course-color-2 { background: #fae8ff; color: #86198f; }
.course-color-3 { background: #fce7f3; color: #9f1239; }
.course-color-4 { background: #ccfbf1; color: #115e59; }
.course-color-5 { background: #dbeafe; color: #1e40af; }
.course-color-6 { background: #fef3c7; color: #92400e; }
.course-color-7 { background: #fed7aa; color: #9a3412; }
.course-color-8 { background: #d1fae5; color: #065f46; }
.course-color-9 { background: #fecaca; color: #991b1b; }
.course-color-10 { background: #e0e7ff; color: #3730a3; }

/* 반응형 디자인 */
@media (max-width: 768px) {
    .schedule-modal {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .schedule-header {
        padding: 18px 20px;
    }
    
    .schedule-header h3 {
        font-size: 18px;
    }
    
    .schedule-content {
        padding: 16px;
    }
    
    .timetable {
        font-size: 12px;
    }
    
    .timetable thead th {
        padding: 10px 6px;
        font-size: 12px;
    }
    
    .period-header {
        width: 70px;
    }
    
    .period-cell {
        padding: 8px 4px;
    }
    
    .period-number {
        font-size: 14px;
    }
    
    .period-time {
        font-size: 10px;
    }
    
    .course-info {
        padding: 8px 6px;
    }
    
    .course-cell .course-name {
        font-size: 12px;
    }
    
    .course-cell .course-professor {
        font-size: 11px;
    }
    
    .course-cell .course-time {
        font-size: 10px;
    }
    
    .empty-cell {
        min-height: 60px;
        padding: 12px;
    }
}

/* ===== 강의실 영역 상태별 배경색 스타일 ===== */
.floor-plan-container {
    position: relative;
}

/* 강의실 영역 상태 표시를 위한 오버레이 */
.classroom-status-overlay {
    position: absolute;
    pointer-events: none;
    z-index: 4;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* 사용중 상태 - 연한 빨간색 배경 */
.classroom-status-overlay.status-occupied {
    background-color: rgba(255, 68, 68, 0.25);
    border: 1px solid rgba(255, 68, 68, 0.4);
}

/* 곧시작 상태 - 연한 주황색 배경 */
.classroom-status-overlay.status-soon {
    background-color: rgba(255, 170, 0, 0.25);
    border: 1px solid rgba(255, 170, 0, 0.4);
}

/* 사용가능 상태 - 연한 초록색 배경 */
.classroom-status-overlay.status-available {
    background-color: rgba(68, 170, 68, 0.25);
    border: 1px solid rgba(68, 170, 68, 0.4);
}

/* 강의실 라벨 기본 스타일 */
.room-label-permanent {
    transition: all 0.15s ease;
}

/* 현재 시간 표시 스타일 */
#current-time-display {
    font-family: 'Courier New', monospace;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* 층별 상세 뷰 제목 스타일 */
#floor-title {
    color: #ffffff !important;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

/* ===== 상담 신청 버튼 ===== */
.consultation-request-btn {
    position: absolute;
    right: 60px;
    top: 20px;
    background: #20b2aa;
    border: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.consultation-request-btn:hover {
    background: #3ccbc4;
    box-shadow: 0 4px 12px rgba(32, 178, 170, 0.4);
}

/* ===== 강의실 예약 버튼 ===== */
.reservation-request-btn {
    position: absolute;
    right: 60px;
    top: 20px;
    background: #ff9800;
    border: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reservation-request-btn:hover {
    background: #ffb033;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

/* ===== 📅 상담 신청 모달 ===== */
.consultation-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    backdrop-filter: blur(4px);
}

.consultation-modal {
    background: #1a1a1d;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

.consultation-header {
    padding: 24px;
    border-bottom: 1px solid #2a2a2e;
    position: relative;
}

.consultation-header h3 {
    color: #ffffff;
    font-size: 22px;
    margin: 0 0 8px 0;
}

.consultation-header p {
    color: #a0a0a0;
    font-size: 14px;
    margin: 0;
}

.consultation-header .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #808080;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s;
}

.consultation-header .close-btn:hover {
    color: #ffffff;
}

.consultation-content {
    padding: 24px;
}

.consultation-content .form-group {
    margin-bottom: 20px;
}

.consultation-content label {
    display: block;
    color: #d0d0d0;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.consultation-content input[type="date"],
.consultation-content input[type="text"],
.consultation-content textarea {
    width: 100%;
    padding: 12px 16px;
    background: #2a2a2e;
    border: 1px solid #3a3a3e;
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.consultation-content input:focus,
.consultation-content textarea:focus {
    border-color: #20b2aa;
    box-shadow: 0 0 0 3px rgba(32, 178, 170, 0.15);
    outline: none;
}

.consultation-content textarea {
    resize: vertical;
    min-height: 100px;
}

/* 시간 슬롯 그리드 */
.slots-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.slot-btn {
    padding: 12px 8px;
    border: 2px solid #3a3a3e;
    border-radius: 8px;
    background: #2a2a2e;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.slot-btn .slot-period {
    display: block;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.slot-btn .slot-status {
    display: block;
    font-size: 11px;
    margin-top: 4px;
}

/* 가능한 슬롯 */
.slot-btn.slot-available {
    border-color: #20b2aa;
    background: rgba(32, 178, 170, 0.1);
}

.slot-btn.slot-available .slot-status {
    color: #20b2aa;
}

.slot-btn.slot-available:hover {
    background: rgba(32, 178, 170, 0.25);
    transform: translateY(-2px);
}

.slot-btn.slot-available.selected {
    background: #20b2aa;
    border-color: #20b2aa;
}

.slot-btn.slot-available.selected .slot-period,
.slot-btn.slot-available.selected .slot-status {
    color: #ffffff;
}

/* 수업 있는 슬롯 */
.slot-btn.slot-busy {
    border-color: #ff5252;
    background: rgba(255, 82, 82, 0.1);
    cursor: not-allowed;
    opacity: 0.7;
}

.slot-btn.slot-busy .slot-status {
    color: #ff5252;
}

/* 예약된 슬롯 */
.slot-btn.slot-booked {
    border-color: #ffa500;
    background: rgba(255, 165, 0, 0.1);
    cursor: not-allowed;
    opacity: 0.7;
}

.slot-btn.slot-booked .slot-status {
    color: #ffa500;
}

.slots-placeholder,
.slots-loading,
.slots-error,
.slots-none {
    color: #808080;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

.slots-error {
    color: #ff5252;
}

/* 상담 신청 버튼 영역 */
.consultation-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.consultation-actions .btn-cancel,
.consultation-actions .btn-submit {
    flex: 1;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.consultation-actions .btn-cancel {
    background: #2a2a2e;
    border: 1px solid #3a3a3e;
    color: #ffffff;
}

.consultation-actions .btn-cancel:hover {
    background: #3a3a3e;
}

.consultation-actions .btn-submit {
    background: #20b2aa;
    border: none;
    color: white;
}

.consultation-actions .btn-submit:hover {
    background: #3ccbc4;
    box-shadow: 0 4px 15px rgba(32, 178, 170, 0.3);
}

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

/* ===== 📋 상담 목록 모달 ===== */
.consultation-list-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.consultation-list-modal {
    background: #1a1a1d;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

.consultation-list-header {
    padding: 24px;
    border-bottom: 1px solid #2a2a2e;
    position: relative;
    flex-shrink: 0;
}

.consultation-list-header h3 {
    color: #ffffff;
    font-size: 22px;
    margin: 0;
}

.consultation-list-header .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #808080;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s;
}

.consultation-list-header .close-btn:hover {
    color: #ffffff;
}

.consultation-list-content {
    padding: 16px 24px 24px;
    overflow-y: auto;
    flex: 1;
}

.no-consultations {
    color: #808080;
    text-align: center;
    padding: 40px 20px;
    font-size: 15px;
}

.consultation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.consultation-item {
    background: #2a2a2e;
    border-radius: 12px;
    padding: 16px;
    border-left: 4px solid #808080;
}

.consultation-item.status-pending {
    border-left-color: #20b2aa;
}

.consultation-item.status-approved {
    border-left-color: #5fb878;
}

.consultation-item.status-rejected {
    border-left-color: #ff5252;
}

.consultation-item.status-completed {
    border-left-color: #1e9fff;
}

.consultation-item.status-cancelled {
    border-left-color: #808080;
}

.consultation-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.consultation-date {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.consultation-status {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.consultation-status.status-pending {
    background: rgba(32, 178, 170, 0.2);
    color: #20b2aa;
}

.consultation-status.status-approved {
    background: rgba(95, 184, 120, 0.2);
    color: #5fb878;
}

.consultation-status.status-rejected {
    background: rgba(255, 82, 82, 0.2);
    color: #ff5252;
}

.consultation-status.status-completed {
    background: rgba(30, 159, 255, 0.2);
    color: #1e9fff;
}

.consultation-status.status-cancelled {
    background: rgba(128, 128, 128, 0.2);
    color: #808080;
}

.consultation-item-body {
    margin-bottom: 10px;
}

.consultation-person {
    color: #d0d0d0;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
}

.consultation-topic {
    color: #a0a0a0;
    font-size: 14px;
    margin-bottom: 4px;
}

.consultation-office {
    color: #808080;
    font-size: 13px;
}

.consultation-note {
    background: #1a1a1d;
    padding: 10px 12px;
    border-radius: 6px;
    color: #a0a0a0;
    font-size: 13px;
    margin-top: 10px;
}

.consultation-item-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.consultation-item-actions button {
    flex: 1;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-approve {
    background: #5fb878;
    border: none;
    color: white;
}

.btn-approve:hover {
    background: #6fcf8f;
}

.btn-reject {
    background: #ff5252;
    border: none;
    color: white;
}

.btn-reject:hover {
    background: #ff6b6b;
}

.btn-cancel-consultation {
    background: transparent;
    border: 1px solid #808080;
    color: #808080;
}

.btn-cancel-consultation:hover {
    background: rgba(128, 128, 128, 0.1);
    border-color: #ff5252;
    color: #ff5252;
}

/* ===== 강의실 예약 모달 ===== */
.reservation-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    backdrop-filter: blur(4px);
}

.reservation-modal {
    background: #1a1a1d;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

.reservation-header {
    padding: 24px;
    border-bottom: 1px solid #2a2a2e;
    position: relative;
}

.reservation-header h3 {
    color: #ffffff;
    font-size: 22px;
    margin: 0 0 8px 0;
}

.reservation-header p {
    color: #ff9800;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.reservation-header .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #808080;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s;
}

.reservation-header .close-btn:hover {
    color: #ffffff;
}

.reservation-content {
    padding: 24px;
}

.reservation-content .form-group {
    margin-bottom: 20px;
}

.reservation-content label {
    display: block;
    color: #d0d0d0;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reservation-content input[type="date"],
.reservation-content input[type="text"],
.reservation-content textarea {
    width: 100%;
    padding: 12px 16px;
    background: #2a2a2e;
    border: 1px solid #3a3a3e;
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.reservation-content input:focus,
.reservation-content textarea:focus {
    border-color: #ff9800;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.15);
    outline: none;
}

.reservation-content textarea {
    resize: vertical;
    min-height: 80px;
}

.reservation-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.reservation-actions .btn-cancel,
.reservation-actions .btn-submit {
    flex: 1;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reservation-actions .btn-cancel {
    background: #2a2a2e;
    border: 1px solid #3a3a3e;
    color: #ffffff;
}

.reservation-actions .btn-cancel:hover {
    background: #3a3a3e;
}

.reservation-actions .btn-submit {
    background: #ff9800;
    border: none;
    color: white;
}

.reservation-actions .btn-submit:hover {
    background: #ffb033;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

/* ===== 예약 목록 모달 ===== */
.reservation-list-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.reservation-list-modal {
    background: #1a1a1d;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

.reservation-list-header {
    padding: 24px;
    border-bottom: 1px solid #2a2a2e;
    position: relative;
    flex-shrink: 0;
}

.reservation-list-header h3 {
    color: #ffffff;
    font-size: 22px;
    margin: 0;
}

.reservation-list-header .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #808080;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s;
}

.reservation-list-header .close-btn:hover {
    color: #ffffff;
}

.reservation-list-content {
    padding: 16px 24px 24px;
    overflow-y: auto;
    flex: 1;
}

.no-reservations {
    color: #808080;
    text-align: center;
    padding: 40px 20px;
    font-size: 15px;
}

.reservation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reservation-item {
    background: #2a2a2e;
    border-radius: 12px;
    padding: 16px;
    border-left: 4px solid #ff9800;
}

.reservation-item.status-cancelled {
    border-left-color: #808080;
    opacity: 0.7;
}

.reservation-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.reservation-date {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.reservation-status {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.reservation-status.status-approved {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.reservation-status.status-cancelled {
    background: rgba(128, 128, 128, 0.2);
    color: #808080;
}

.reservation-item-body {
    margin-bottom: 10px;
}

.reservation-room {
    color: #ff9800;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.reservation-purpose {
    color: #d0d0d0;
    font-size: 14px;
}

.reservation-item-actions {
    margin-top: 12px;
}

.btn-cancel-reservation {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    border: 1px solid #808080;
    color: #808080;
    transition: all 0.2s ease;
}

.btn-cancel-reservation:hover {
    background: rgba(255, 82, 82, 0.1);
    border-color: #ff5252;
    color: #ff5252;
}

/* ===== 추가 반응형 스타일 ===== */

/* 태블릿 (768px 이하) */
@media (max-width: 768px) {
    /* 3D 건물 뷰 조정 */
    .building-exploded {
        width: 280px;
        height: 350px;
    }

    /* 층간 간격 조정 */
    .floor-4 { transform: translateY(-70px); }
    .floor-3 { transform: translateY(-15px); }
    .floor-2 { transform: translateY(40px); }
    .floor-1 { transform: translateY(95px); }

    .floor-4:hover { transform: translateY(-85px) scale(1.05); }
    .floor-3:hover { transform: translateY(-30px) scale(1.05); }
    .floor-2:hover { transform: translateY(25px) scale(1.05); }
    .floor-1:hover { transform: translateY(80px) scale(1.05); }

    /* 층 텍스트 크기 */
    .floor-top {
        font-size: 2rem;
    }

    /* 상담/예약 모달 */
    .consultation-modal,
    .reservation-modal {
        width: 95%;
        max-width: none;
    }

    .consultation-header,
    .reservation-header {
        padding: 18px;
    }

    .consultation-content,
    .reservation-content {
        padding: 18px;
    }

    /* 슬롯 그리드 */
    .slots-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .slot-btn {
        padding: 10px 6px;
    }

    .slot-btn .slot-period {
        font-size: 12px;
    }

    .slot-btn .slot-status {
        font-size: 10px;
    }
}

/* 모바일 (480px 이하) */
@media (max-width: 480px) {
    /* 3D 건물 뷰 더 축소 */
    .building-exploded {
        width: 220px;
        height: 280px;
    }

    .floor-top {
        font-size: 1.5rem;
    }

    /* 층간 간격 더 축소 */
    .floor-4 { transform: translateY(-55px); }
    .floor-3 { transform: translateY(-10px); }
    .floor-2 { transform: translateY(30px); }
    .floor-1 { transform: translateY(75px); }

    /* 슬롯 그리드 2열로 */
    .slots-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 상담/예약 목록 모달 */
    .consultation-list-modal,
    .reservation-list-modal {
        width: 98%;
        max-height: 90vh;
    }

    .consultation-item,
    .reservation-item {
        padding: 12px;
    }

    .consultation-item-actions {
        flex-direction: column;
    }

    .consultation-item-actions button {
        width: 100%;
    }

    /* 시간표 테이블 */
    .timetable {
        font-size: 10px;
    }

    .period-header {
        width: 55px !important;
    }

    .period-cell {
        padding: 4px 2px;
        height: 45px;
    }

    .period-number {
        font-size: 12px;
    }

    .period-time {
        font-size: 8px;
    }

    .course-cell .course-name {
        font-size: 9px;
    }

    .course-cell .course-professor,
    .course-cell .course-classroom {
        font-size: 8px;
    }

    .course-cell .course-time {
        font-size: 7px;
    }
}

/* 터치 디바이스 최적화 */
@media (pointer: coarse) {
    /* 터치 영역 확대 */
    .floor-layer {
        cursor: pointer;
    }

    .slot-btn {
        min-height: 50px;
    }

    .consultation-item-actions button,
    .reservation-item-actions button {
        min-height: 44px;
    }

    .close-btn {
        width: 44px;
        height: 44px;
    }

    /* 호버 효과 제거 (터치에서는 불필요) */
    .floor-layer:hover {
        transform: none;
        filter: none;
    }

    .floor-layer:active {
        transform: scale(0.98);
        filter: brightness(0.9);
    }
}