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

body {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    display: grid;
    grid-template-columns: 250px 1fr;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
}

/* 導航區 */
.navbar {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #0D6EFD 0%, #0056b3 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.nav-brand p {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 300;
}

.student-login-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.3);
    font-weight: 500;
    transition: all 0.3s ease;
}

.student-login-btn:hover {
    background: rgba(255,255,255,0.3);
    color: white;
}

/* 側邊欄 */
.sidebar {
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    padding: 2rem 0;
}

.side-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #6c757d;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(13, 110, 253, 0.1);
    color: #0D6EFD;
    border-left-color: #0D6EFD;
}

.nav-icon {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* 主要內容區 */
.main-content {
    padding: 2rem;
    background: #f8f9fa;
    overflow-y: auto;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

/* 首頁英雄區塊 */
.hero-card {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    text-align: center;
    margin-bottom: 2rem;
}

.hero-card h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0D6EFD;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 3rem;
    font-weight: 300;
}

/* 功能網格 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: #0D6EFD;
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.15);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 區塊標題 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #0D6EFD;
}

/* 按鈕樣式 */
.btn-primary {
    background: linear-gradient(135deg, #0D6EFD 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-primary:hover {
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

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

/* 表單樣式 */
.form-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.form-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0D6EFD;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0D6EFD;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* 資料卡片 */
.data-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.data-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.data-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.data-item:hover {
    border-color: #0D6EFD;
    box-shadow: 0 2px 10px rgba(13, 110, 253, 0.1);
}

.data-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.data-item p {
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.data-item .meta {
    font-size: 0.9rem;
    color: #adb5bd;
}

/* 載入狀態 */
.loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
}

/* 訊息框 */
.message-box {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.message-box p {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* 隱藏元素 */
.hidden {
    display: none !important;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
    }
    
    .sidebar {
        order: 2;
    }
    
    .main-content {
        order: 3;
    }
    
    .side-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0 1rem;
    }
    
    .nav-item {
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .hero-card {
        padding: 2rem;
    }
    
    .hero-card h2 {
        font-size: 2rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}