/* AMI School Student Leave Management System - Stylesheet */

/* Base reset and variables */
:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #a5b4fc;
    --primary-dark: #3730a3;
    --secondary-color: #64748b;
    --accent-color: #06b6d4;
    --accent-hover: #0891b2;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: linear-gradient(135deg, var(--light-bg) 0%, var(--white) 100%);
    min-height: 100vh;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    padding-top: 80px;
    font-size: 14px;
    overflow-x: hidden;
}

body.loaded {
    opacity: 1;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 統一語言切換器樣式 */
.language-switcher {
    margin-left: auto;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 8px;
}

.language-switcher select {
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--gray-700);
    cursor: pointer;
    outline: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.language-switcher select:hover {
    background: var(--gray-50);
}

/* Bootstrap 5 導航列基礎樣式 */
.main-nav {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    padding: 0.75rem 0;
}

.main-nav.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: var(--shadow-lg);
}

/* 確保主要內容不被固定導航列遮擋 */
.main-container {
    margin-top: 80px;
    padding: 20px;
}

/* 響應式主要內容區域調整 */
@media (max-width: 991.98px) {
    .main-container {
        margin-top: 100px; /* 移動端漢堡菜單需要更多空間 */
    }
}

@media (max-width: 575.98px) {
    .main-container {
        margin-top: 90px;
        padding: 15px;
    }
}

/* 頁面標題 */
.page-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* 統計卡片網格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* 篩選區域 */
.filter-section {
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

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

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-control {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 按鈕樣式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    gap: 6px;
    position: relative;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-loading {
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
}

.btn-success {
    background-color: var(--success-color);
    color: var(--white);
}

.btn-success:hover {
    background-color: #047857;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #475569;
}

.btn-warning {
    background-color: var(--warning-color);
    color: var(--white);
}

.btn-warning:hover {
    background-color: #b45309;
}

.btn-danger {
    background-color: var(--danger-color);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* 卡片樣式 */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: visible;  /*超出内容处理 完全显示（不裁剪）*/
}

.card-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: var(--white);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.card-body {
    padding: 25px;
}

/* 表格樣式 */
.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

thead {
    background: var(--light-bg);
}

th {
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
    font-size: 12px;
}

td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

tbody tr:hover {
    background-color: #f1f5f9;
}

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

/* 排序功能樣式 */
.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: var(--transition);
}

.sortable:hover {
    background-color: #e2e8f0;
    color: var(--primary-color);
}

.sort-indicator {
    display: inline-block;
    margin-left: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
    opacity: 0.6;
}

.sortable:hover .sort-indicator {
    opacity: 1;
    color: var(--primary-color);
}

.sortable.sort-asc .sort-indicator {
    color: var(--primary-color);
    opacity: 1;
}

.sortable.sort-asc .sort-indicator::before {
    content: '↑';
}

.sortable.sort-desc .sort-indicator {
    color: var(--primary-color);
    opacity: 1;
}

.sortable.sort-desc .sort-indicator::before {
    content: '↓';
}

/* 隱藏原始文字，只顯示箭頭 */
.sortable.sort-asc .sort-indicator,
.sortable.sort-desc .sort-indicator {
    font-size: 16px;
}

.sortable.sort-asc .sort-indicator::before,
.sortable.sort-desc .sort-indicator::before {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.sortable .sort-indicator {
    position: relative;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sortable.sort-asc .sort-indicator,
.sortable.sort-desc .sort-indicator {
    font-weight: bold;
}

/* 排序動畫效果 */
.table-sorting {
    opacity: 0.7;
    transition: opacity 0.2s ease-in-out;
}

.table-sorted {
    opacity: 1;
}

/* 載入指示器 */
.loading {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 模態框樣式 */
.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 ease;
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

.modal-header {
    padding: 20px 25px;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close {
    color: var(--white);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 25px;
}

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

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

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

/* 警告容器 */
#alertContainer {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    width: 90%;
    max-width: 500px;
}

.alert {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: var(--border-radius);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.3s ease;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

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

/* 狀態標籤 */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    min-width: 80px;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-approved {
    background-color: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-notified {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-cancelled {
    background-color: #f3f4f6;
    color: #374151;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .page-header {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .filter-section {
        padding: 15px;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .card-header {
        padding: 15px;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .table-container {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px 6px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .btn-sm {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .language-switcher {
        margin-left: 0;
        margin-bottom: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .table-container {
        font-size: 11px;
    }
    
    th, td {
        padding: 6px 4px;
    }
    
    .modal-content {
        width: 98%;
        margin: 5% auto;
    }
}

/* 可編輯欄位樣式 */
.editable {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.editable:hover {
    background-color: #f1f5f9;
}

/* 雙欄位電話輸入框樣式 */
.phone-info {
    padding: 8px;
    min-width: 200px;
}

.phone-field {
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
}

.phone-field:last-child {
    margin-bottom: 0;
}

.phone-field label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
    display: block;
}

.phone-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
    background-color: var(--white);
    transition: var(--transition-fast);
}

.phone-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.phone-input::placeholder {
    color: var(--gray-400);
    font-size: 12px;
}

.editing {
    background-color: #fef3c7;
}

/* 詳細資料樣式 */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    padding: 10px;
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--primary-color);
}

.detail-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.detail-value {
    color: var(--text-primary);
    font-size: 1rem;
    word-break: break-word;
}

/* 動畫效果 */
.fade-in {
    animation: fadeIn 0.3s ease;
}

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

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

/* 工具提示 */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* 打印樣式 */
@media print {
    .language-switcher,
    .card-header,
    .filter-section,
    .btn {
        display: none !important;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    table {
        font-size: 10px;
    }
    
    th, td {
        padding: 5px;
    }
}

/* 合併欄位樣式 */
.student-info div,
.date-info div {
    padding: 2px 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.student-info div:first-child,
.date-info div:first-child {
    font-weight: 600;
    color: var(--text-primary);
}

.student-info div:not(:first-child),
.date-info div:not(:first-child) {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* 分頁控制項樣式 */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 15px;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.items-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.items-per-page select {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--white);
    font-size: 14px;
    cursor: pointer;
    min-width: 70px;
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    min-width: 40px;
    height: 36px;
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--light-bg);
    color: var(--text-secondary);
}

.pagination-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 2px;
}

.page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.page-number:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.page-number.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.page-ellipsis {
    padding: 8px 4px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 手機版響應式設計 */
@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 800px;
    }
    
    .student-info,
    .date-info {
        min-width: 120px;
        white-space: nowrap;
    }
    
    .student-info div,
    .date-info div {
        font-size: 0.8rem;
        padding: 1px 0;
    }
    
    th {
        font-size: 0.85rem;
        padding: 8px 6px;
    }
    
    td {
        padding: 8px 6px;
    }
    
    .btn {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    
    /* 分頁響應式設計 */
    .pagination-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 15px 0;
    }
    
    .pagination-info {
        text-align: center;
        font-size: 13px;
    }
    
    .pagination-controls {
        justify-content: center;
        gap: 8px;
    }
    
    .items-per-page {
        font-size: 13px;
    }
    
    .pagination-btn {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 36px;
        height: 32px;
    }
    
    .page-number {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .page-numbers {
        gap: 1px;
    }
}

/* 導航圖示樣式 */
.icon-home::before { content: '🏠'; }
.icon-form::before { content: '📝'; }
.icon-search::before { content: '🔍'; }
.icon-admin::before { content: '👨‍💼'; }

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .student-info div,
    .date-info div {
        font-size: 0.75rem;
    }
    
    th {
        font-size: 0.8rem;
        padding: 6px 4px;
    }
    
    td {
        padding: 6px 4px;
    }
}

/* ========== 首頁專用樣式 ========== */

/* 主容器 */
.main-container {
    width: 100%;
    margin: 0;
    padding: 0;
    margin-top: 30px; /* 為固定導航列預留空間 */
}

/* 英雄區域 */
.hero-section {
    text-align: center;
    padding: 60px 0 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 50%, var(--primary-dark) 100%);
    color: var(--white);
    margin: 0 -20px 60px;
    position: relative;
    overflow: hidden;
    min-height: 56vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.2) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, rgba(248, 250, 252, 0.1) 0%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.logo-icon {
    font-size: 5rem;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
    animation: float 4s ease-in-out infinite;
    background: linear-gradient(45deg, #ffffff, #f0f9ff);
     -webkit-background-clip: text; 
   /* -webkit-text-fill-color: transparent; */
    background-clip: text;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(1deg); }
    50% { transform: translateY(-12px) rotate(0deg); }
    75% { transform: translateY(-8px) rotate(-1deg); }
}

.system-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin: 0;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.03em;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
   /* -webkit-text-fill-color: transparent; */
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3)); }
    100% { filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5)); }
}

.system-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    opacity: 0.95;
    margin: 20px 0 0;
    font-weight: 400;
    line-height: 1.5;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: subtitleFade 2s ease-out 0.5s both;
}

@keyframes subtitleFade {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 0.95; transform: translateY(0); }
}

/* 區段標題 */
.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--gray-800);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    border-radius: 2px;
}

/* 系統介紹區 */
.intro-section {
    padding: 60px 0;
    background: var(--white);
    margin: 0 -20px;
}

.intro-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    background: var(--white);
    padding: 50px 40px;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    opacity: 0;
    transition: var(--transition);
    z-index: 0;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color), var(--primary-hover));
    border-radius: var(--border-radius-xl);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-2xl);
    color: var(--white);
}

.feature-card:hover::before {
    opacity: 0.95;
}

.feature-card:hover::after {
    opacity: 1;
}

.feature-card > * {
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.feature-icon {
    font-size: 4rem;
    margin-bottom: 30px;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    animation: featureIconFloat 3s ease-in-out infinite;
}

@keyframes featureIconFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-8px) rotate(2deg); }
    66% { transform: translateY(-4px) rotate(-1deg); }
}

.feature-card:hover .feature-icon {
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
    animation-play-state: paused;
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--gray-800);
    line-height: 1.3;
}

.feature-card:hover h3 {
    color: var(--white);
}

.feature-card p {
    color: var(--gray-600);
    line-height: 1.7;
    font-size: 1.1rem;
}

.feature-card:hover p {
    color: rgba(255, 255, 255, 0.95);
}

/* 服務入口區 */
.services-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    margin: 0 -20px;
    position: relative;
}

.services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.services-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 50px;
    justify-items: center;
}

.service-card {
    background: var(--white);
    padding: 50px 40px;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    display: block;
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(79, 70, 229, 0.02) 100%);
    opacity: 0;
    transition: var(--transition);
}

.service-card.primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: var(--white);
    box-shadow: var(--shadow-lg);
    transform: scale(1.05);
}

.service-card.primary::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-light);
}

.service-card.primary:hover {
    transform: translateY(-12px) scale(1.08);
    box-shadow: 0 25px 50px -12px rgba(79, 70, 229, 0.4);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    font-size: 4rem;
    margin-bottom: 30px;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.service-card.primary .service-icon {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.service-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.service-card p {
    line-height: 1.7;
    margin-bottom: 30px;
    opacity: 0.9;
    font-size: 1.1rem;
}

.service-card.primary p {
    opacity: 0.95;
}

.service-arrow {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    transition: var(--transition);
    display: inline-block;
    background: rgba(79, 70, 229, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.service-card.primary .service-arrow {
    background: rgba(255, 255, 255, 0.2);
}

.service-card:hover .service-arrow {
    transform: translateX(8px) rotate(15deg);
    background: var(--primary-color);
    color: var(--white);
}

.service-card.primary:hover .service-arrow {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(8px) rotate(15deg) scale(1.1);
}

/* 使用說明區 */
.help-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
    margin: 0 -20px;
    position: relative;
}

.help-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(79, 70, 229, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(6, 182, 212, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.help-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    gap: 30px;
    flex-wrap: wrap;
}

.help-item {
    flex: 1;
    min-width: 280px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.help-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.help-item h4 {
    color: #4f46e5;
    margin-bottom: 15px;
    font-weight: 600;
}

.help-item p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 0;
}

.help-item ul {
    margin: 0;
    padding-left: 20px;
}

.help-item li {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 8px;
}

/* 手機端響應式布局 */
@media (max-width: 768px) {
    .help-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .help-item {
        min-width: auto;
        padding: 15px;
    }
}

.steps-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    gap: 30px;
    margin-top: 30px;
    position: relative;
    flex-wrap: wrap;
}

.steps-container::before {
    content: '';
    position: absolute;
    top: 80px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    opacity: 0.3;
    z-index: 0;
}

@media (max-width: 768px) {
    .steps-container::before {
        display: none;
    }
}

.step-item {
    background: var(--white);
    padding: 50px 40px;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-align: center;
    position: relative;
    z-index: 1;
    border: 2px solid transparent;
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.step-item:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-light);
}

.step-item:nth-child(2) {
    animation-delay: 0.2s;
}

.step-item:nth-child(3) {
    animation-delay: 0.4s;
}

.step-number {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: var(--white);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    margin: 0 auto 30px;
    box-shadow: var(--shadow-lg);
    position: relative;
    transition: var(--transition);
}

.step-number::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.step-item:hover .step-number {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-xl);
}

.step-item:hover .step-number::before {
    opacity: 0.3;
    transform: scale(1.2);
}

.step-content {
    text-align: center;
}

.step-content h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--gray-800);
    line-height: 1.3;
}

.step-content p {
    color: var(--gray-600);
    line-height: 1.7;
    font-size: 1.1rem;
}

.step-content h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--gray-800);
}

.step-content p {
    color: var(--gray-600);
    line-height: 1.6;
    font-size: 1.1rem;
}

/* 頁腳 */
.footer {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    color: var(--white);
    padding: 60px 0 30px;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
}

.footer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(79, 70, 229, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
    text-align: center;
}

.footer-info {
    margin-bottom: 30px;
}

.footer-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.footer-info p {
    margin: 8px 0;
    opacity: 0.9;
    font-size: 1.1rem;
    line-height: 1.6;
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    margin: 30px 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    margin: 0;
    opacity: 0.7;
    font-size: 0.95rem;
}

.footer-social {
    display: flex;
    gap: 15px;
    align-items: center;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
    color: var(--white);
}

.social-link i {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
}

/* 載入動畫 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color), 0 0 15px var(--primary-color);
    }
    50% {
        box-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color), 0 0 30px var(--primary-color);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 滾動動畫 */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.scroll-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

/* 載入指示器 */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 9999;
}

.loading-indicator.loading {
    animation: loadingProgress 2s ease-in-out;
}

@keyframes loadingProgress {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0%);
    }
}

/* 回到頂部按鈕 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 999;
    display: none;
    opacity: 0.9;
}

.back-to-top:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-xl);
    opacity: 1;
}

.back-to-top:active {
    transform: translateY(-1px) scale(1.05);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

.feature-card,
.service-card,
.step-item {
    animation: fadeInUp 0.6s ease-out;
}

.feature-card:nth-child(2) { animation-delay: 0.1s; }
.feature-card:nth-child(3) { animation-delay: 0.2s; }
.feature-card:nth-child(4) { animation-delay: 0.3s; }

.service-card:nth-child(2) { animation-delay: 0.1s; }

.step-item:nth-child(2) { animation-delay: 0.1s; }
.step-item:nth-child(3) { animation-delay: 0.2s; }

/* 首頁響應式設計 */
@media (min-width: 1200px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .services-grid {
        flex-direction: row;
    }
    
    .service-card {
        flex: 1;
        max-width: 400px;
    }
    
    .steps-container {
        flex-direction: row;
    }
    
    .step-item {
        flex: 1;
        flex-direction: column;
        text-align: center;
        max-width: 350px;
    }
    
    .step-item:hover {
        transform: translateY(-10px);
    }
}

@media (min-width: 769px) {
    .services-grid {
        flex-direction: row;
    }
    
    .service-card {
        flex: 1;
        max-width: 400px;
    }
    
    .steps-container {
        flex-direction: row;
    }
    
    .step-item {
        flex: 1;
        flex-direction: column;
        text-align: center;
        max-width: 350px;
    }
    
    .step-item:hover {
        transform: translateY(-10px);
    }
}

@media (max-width: 767px) {
    .main-container {
        padding: 0 15px;
    }
    
    .hero-section {
        padding: 60px 0 40px;
        margin: 0 -15px 40px;
    }
    
    .logo-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo-icon {
        font-size: 3rem;
    }
    
    .system-title {
        font-size: 2rem;
    }
    
    .system-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .intro-section,
    .services-section,
    .help-section {
        padding: 40px 0;
        margin: 0 -15px;
    }
    
    .intro-content,
    .services-content,
    .help-content {
        padding: 0 15px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .services-grid {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .service-card {
        width: 100%;
        max-width: 400px;
        padding: 30px 20px;
    }
    
    .feature-card {
        padding: 30px 20px;
    }
    
    .steps-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .step-item {
        width: 100%;
        max-width: 400px;
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
        min-width: auto;
    }
    
    .step-item:hover {
        transform: translateX(10px);
    }
    
    .footer {
        margin: 0;
    }
    
    .footer-content {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .system-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .feature-card h3,
    .step-content h4 {
        font-size: 1.25rem;
    }
    
    .service-card h3 {
        font-size: 1.5rem;
    }
    
    .step-item {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .step-item:hover {
        transform: translateY(-5px);
    }
}

/* 無障礙設計 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .logo-icon {
        animation: none;
    }
}

/* 高對比模式支援 */
@media (prefers-contrast: high) {
    .feature-card,
    .service-card,
    .step-item {
        border: 2px solid var(--gray-300);
    }
}

/* 注意事項區域樣式 */
.notice-section {
    margin-top: 40px;
}

.notice-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.notice-item {
    flex: 1;
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
}

.notice-item h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.notice-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notice-item li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.5;
}

.notice-item li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* 響應式設計 - 小屏幕時上下排列 */
@media (max-width: 768px) {
    .notice-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .notice-item {
        margin-bottom: 0;
    }
}

/* 表單行布局樣式 */
.form-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}

/* 學生基本信息區域 - 響應式設計 */
.form-section:nth-of-type(1) .form-row:nth-of-type(1) .form-group:first-child {
    flex: 1; /* 學生姓名 */
}

.form-section:nth-of-type(1) .form-row:nth-of-type(1) .form-group:last-child {
    flex: 1; /* 學號 */
}

.form-section:nth-of-type(1) .form-row:nth-of-type(2) .form-group:first-child {
    flex: 1; /* 學生類型 */
}

.form-section:nth-of-type(1) .form-row:nth-of-type(2) .form-group:last-child {
    flex: 1; /* 班級 */
}

.form-section:nth-of-type(1) .form-row:nth-of-type(3) .form-group:first-child {
    flex: 1; /* 性別 */
}

.form-section:nth-of-type(1) .form-row:nth-of-type(3) .form-group:last-child {
    flex: 1; /* 學生手機 */
}

/* 請假信息區域 - 響應式設計 */
.form-section:nth-of-type(2) .form-row:nth-of-type(1) .form-group:first-child {
    flex: 1; /* 請假開始日期 */
}

.form-section:nth-of-type(2) .form-row:nth-of-type(1) .form-group:last-child {
    flex: 1; /* 請假結束日期 */
}

/* 請假類型和請假事由 - 響應式設計 */
.form-row.leave-type-reason .form-group:first-child {
    flex: 1; /* 請假類型 */
}

.form-row.leave-type-reason .form-group:last-child {
    flex: 1; /* 請假事由 */
}

/* 聯絡信息區域 - 響應式設計 */
.form-section:nth-of-type(3) .form-row .form-group:first-child {
    flex: 1; /* 是否已通知班導師 */
}

.form-section:nth-of-type(3) .form-row .form-group:last-child {
    flex: 1; /* 家長聯繫電話 */
}

/* 全寬度表單組 */
.form-group.full-width {
    flex: 1 1 100%;
}

/* 響應式設計 - 小屏幕時垂直排列 */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 20px;
    }
    
    /* 重置所有form-group為100%寬度 */
    .form-row .form-group,
    .form-section:nth-of-type(1) .form-row:nth-of-type(1) .form-group:first-child,
    .form-section:nth-of-type(1) .form-row:nth-of-type(1) .form-group:last-child,
    .form-section:nth-of-type(1) .form-row:nth-of-type(2) .form-group:first-child,
    .form-section:nth-of-type(1) .form-row:nth-of-type(2) .form-group:last-child,
    .form-section:nth-of-type(1) .form-row:nth-of-type(3) .form-group:first-child,
    .form-section:nth-of-type(1) .form-row:nth-of-type(3) .form-group:last-child,
    .form-section:nth-of-type(2) .form-row:nth-of-type(1) .form-group:first-child,
    .form-section:nth-of-type(2) .form-row:nth-of-type(1) .form-group:last-child,
    .form-row.leave-type-reason .form-group:first-child,
    .form-row.leave-type-reason .form-group:last-child,
    .form-section:nth-of-type(3) .form-row .form-group:first-child,
    .form-section:nth-of-type(3) .form-row .form-group:last-child {
        flex: 1 1 100% !important;
        max-width: 100%;
    }
}

/* 必填欄位標記樣式 */
.required::after {
    content: ' *';
    color: var(--danger-color);
    font-weight: bold;
}

/* 文件上傳樣式 */
.form-group input[type="file"] {
    padding: 12px;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    background: var(--gray-50);
    transition: var(--transition);
    cursor: pointer;
}

.form-group input[type="file"]:hover {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.1);
}

.form-group input[type="file"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.file-info {
    margin-top: 8px;
}

.file-info small {
    color: var(--gray-500);
    font-size: 12px;
}

.file-list {
    margin-top: 15px;
}

.selected-files {
    background: var(--gray-50);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 15px;
}

.selected-files h5 {
    margin-bottom: 10px;
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 600;
}

.selected-files ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.selected-files li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
}

.selected-files li:last-child {
    border-bottom: none;
}

.file-name {
    font-weight: 500;
    color: var(--gray-800);
    flex: 1;
    margin-right: 10px;
    word-break: break-all;
}

.file-size {
    color: var(--gray-500);
    font-size: 12px;
    margin-right: 10px;
}

.file-error {
    color: var(--danger-color);
    font-size: 12px;
    font-weight: 500;
}

.file-too-large {
    background: rgba(239, 68, 68, 0.1);
    border-radius: 4px;
    padding: 4px 8px;
    margin: 2px 0;
}

.file-too-large .file-name {
    color: var(--danger-color);
}

/* 首頁打印樣式 */
@media print {
    .hero-section {
        background: none !important;
        color: var(--gray-800) !important;
    }
    
    .service-card.primary {
        background: none !important;
        color: var(--gray-800) !important;
        border: 2px solid var(--gray-300) !important;
    }
    
    .notice-section {
        page-break-inside: avoid;
    }
}