/* 自定義樣式 */
.sticky-col {
    position: sticky;
    left: 0;
    z-index: 10;
}

.course-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.course-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* 響應式表格 */
@media (max-width: 768px) {
    .table-container {
        font-size: 0.75rem;
    }
    
    .student-name {
        font-size: 0.7rem;
    }
    
    .status-btn {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.7rem;
    }
}

/* 管理按鈕區域 */
.admin-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e5e7eb;
    z-index: 40; /* 降低 z-index */
}

.admin-panel.hidden {
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.admin-panel.visible {
    transform: translateY(0);
    transition: transform 0.3s ease;
}

/* 浮動按鈕 */
.floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 45; /* 調整 z-index */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 模態框 */
.modal-backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 50; /* 確保模態框在最上層 */
}

/* 認證模態框特別設定 */
.auth-modal {
    z-index: 9999 !important; /* 最高優先級 */
}

.modal-content {
    animation: modalSlideIn 0.3s ease-out;
    position: relative;
    z-index: 51; /* 確保內容在背景之上 */
}

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

/* 表格 sticky 元素的 z-index 調整 */
.table-sticky-left {
    position: sticky;
    left: 0;
    z-index: 15; /* 降低 z-index */
}

.table-sticky-second {
    position: sticky;
    left: 24px; /* 96px / 4 = 24 (w-24) */
    z-index: 14; /* 降低 z-index */
}

/* 確保模態框輸入框可以正常使用 */
.modal-input {
    position: relative;
    z-index: 52;
}
