/* Drama Ling - 主要樣式框架 */ /* CSS 變數系統 - 設計代幣 */ :root { /* 色彩系統 */ --primary-teal: #00E5CC; --primary-teal-light: #33EBDB; --primary-teal-dark: #00B8A3; --secondary-purple: #6366F1; --secondary-purple-light: #8B87F7; --secondary-purple-dark: #4F46E5; /* 背景色彩 */ --background-primary: #F7F9FC; --background-secondary: #FFFFFF; --background-tertiary: #F1F5F9; --background-dark: #1A1A1A; --background-dark-secondary: #2D2D2D; /* 文字色彩 */ --text-primary: #2C3E50; --text-secondary: #64748B; --text-tertiary: #94A3B8; --text-inverse: #FFFFFF; --text-success: #10B981; --text-warning: #F59E0B; --text-error: #EF4444; /* 邊框色彩 */ --border-light: #E2E8F0; --border-medium: #CBD5E1; --border-dark: #64748B; /* 陰影色彩 */ --shadow-light: rgba(0, 0, 0, 0.05); --shadow-medium: rgba(0, 0, 0, 0.1); --shadow-heavy: rgba(0, 0, 0, 0.15); --shadow-primary: rgba(0, 229, 204, 0.2); /* 間距系統 */ --space-1: 0.25rem; /* 4px */ --space-2: 0.5rem; /* 8px */ --space-3: 0.75rem; /* 12px */ --space-4: 1rem; /* 16px */ --space-5: 1.25rem; /* 20px */ --space-6: 1.5rem; /* 24px */ --space-8: 2rem; /* 32px */ --space-10: 2.5rem; /* 40px */ --space-12: 3rem; /* 48px */ --space-16: 4rem; /* 64px */ --space-20: 5rem; /* 80px */ /* 字體系統 */ --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --font-family-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif; --font-family-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, monospace; --text-xs: 0.75rem; /* 12px */ --text-sm: 0.875rem; /* 14px */ --text-base: 1rem; /* 16px */ --text-lg: 1.125rem; /* 18px */ --text-xl: 1.25rem; /* 20px */ --text-2xl: 1.5rem; /* 24px */ --text-3xl: 1.875rem; /* 30px */ --text-4xl: 2.25rem; /* 36px */ --text-5xl: 3rem; /* 48px */ --font-weight-light: 300; --font-weight-normal: 400; --font-weight-medium: 500; --font-weight-semibold: 600; --font-weight-bold: 700; /* 行高系統 */ --leading-none: 1; --leading-tight: 1.25; --leading-snug: 1.375; --leading-normal: 1.5; --leading-relaxed: 1.625; --leading-loose: 2; /* 圓角系統 */ --radius-sm: 0.25rem; /* 4px */ --radius-md: 0.5rem; /* 8px */ --radius-lg: 0.75rem; /* 12px */ --radius-xl: 1rem; /* 16px */ --radius-2xl: 1.5rem; /* 24px */ --radius-full: 9999px; /* 動畫過渡 */ --transition-fast: 0.15s ease-out; --transition-normal: 0.3s ease-out; --transition-slow: 0.5s ease-out; /* Z-index 層級 */ --z-dropdown: 1000; --z-sticky: 1020; --z-fixed: 1030; --z-modal-backdrop: 1040; --z-modal: 1050; --z-popover: 1060; --z-tooltip: 1070; } /* 暗色主題變數 */ @media (prefers-color-scheme: dark) { :root { --background-primary: #0F172A; --background-secondary: #1E293B; --background-tertiary: #334155; --text-primary: #F8FAFC; --text-secondary: #CBD5E1; --text-tertiary: #94A3B8; --border-light: #334155; --border-medium: #475569; --border-dark: #64748B; } } /* 全域重置和基礎樣式 */ *, *::before, *::after { box-sizing: border-box; } html { font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; } body { margin: 0; padding: 0; font-family: var(--font-family-base); font-size: var(--text-base); font-weight: var(--font-weight-normal); line-height: var(--leading-normal); color: var(--text-primary); background-color: var(--background-primary); overflow-x: hidden; } /* 可訪問性改善 */ *:focus { outline: 2px solid var(--primary-teal); outline-offset: 2px; } *:focus:not(:focus-visible) { outline: none; } /* 按鈕重置 */ button { margin: 0; padding: 0; border: none; background: none; font: inherit; cursor: pointer; } /* 連結重置 */ a { text-decoration: none; color: inherit; } /* 圖片重置 */ img { max-width: 100%; height: auto; } /* 表單元素重置 */ input, textarea, select { font: inherit; margin: 0; } /* 清單重置 */ ul, ol { list-style: none; margin: 0; padding: 0; } /* 載入畫面 */ .loading-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, var(--primary-teal), var(--secondary-purple)); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: var(--z-modal); transition: opacity var(--transition-slow), visibility var(--transition-slow); } .loading-screen.hidden { opacity: 0; visibility: hidden; } .loading-logo { text-align: center; margin-bottom: var(--space-8); } .loading-icon { width: 4rem; height: 4rem; margin-bottom: var(--space-4); animation: pulse 2s ease-in-out infinite; } .loading-text { font-size: var(--text-2xl); font-weight: var(--font-weight-bold); color: var(--text-inverse); font-family: var(--font-family-display); } .loading-progress { width: 12rem; height: 0.25rem; background-color: rgba(255, 255, 255, 0.2); border-radius: var(--radius-full); overflow: hidden; } .loading-bar { width: 100%; height: 100%; background: linear-gradient(90deg, var(--text-inverse) 0%, rgba(255, 255, 255, 0.8) 50%, var(--text-inverse) 100%); animation: loading 1.5s ease-in-out infinite; } @keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: 0.8; } } @keyframes loading { 0% { transform: translateX(-100%); } 50% { transform: translateX(0%); } 100% { transform: translateX(100%); } } /* 應用容器 */ .app-container { min-height: 100vh; display: flex; flex-direction: column; } /* 響應式設計斷點 */ /* 手機 */ @media (max-width: 767px) { .app-container { padding-top: 4rem; /* Header 高度 */ } } /* 平板 */ @media (min-width: 768px) and (max-width: 1023px) { .app-container { display: grid; grid-template-columns: 280px 1fr; grid-template-rows: auto 1fr; grid-template-areas: "sidebar header" "sidebar main"; } } /* 桌機 */ @media (min-width: 1024px) { .app-container { display: grid; grid-template-columns: 320px 1fr; grid-template-rows: auto 1fr; grid-template-areas: "sidebar header" "sidebar main"; } } /* 工具類別 */ .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } .text-center { text-align: center; } .text-left { text-align: left; } .text-right { text-align: right; } .hidden { display: none !important; } .invisible { visibility: hidden; } .flex { display: flex; } .flex-col { flex-direction: column; } .items-center { align-items: center; } .justify-center { justify-content: center; } .justify-between { justify-content: space-between; } .w-full { width: 100%; } .h-full { height: 100%; } .rounded { border-radius: var(--radius-md); } .rounded-lg { border-radius: var(--radius-lg); } .rounded-xl { border-radius: var(--radius-xl); } .rounded-full { border-radius: var(--radius-full); } .shadow { box-shadow: 0 1px 3px 0 var(--shadow-light); } .shadow-md { box-shadow: 0 4px 6px -1px var(--shadow-medium); } .shadow-lg { box-shadow: 0 10px 15px -3px var(--shadow-heavy); } .transition { transition: all var(--transition-normal); } /* 色彩工具類 */ .text-primary { color: var(--text-primary); } .text-secondary { color: var(--text-secondary); } .text-success { color: var(--text-success); } .text-warning { color: var(--text-warning); } .text-error { color: var(--text-error); } .bg-primary { background-color: var(--primary-teal); } .bg-secondary { background-color: var(--secondary-purple); } .bg-white { background-color: var(--background-secondary); } /* 間距工具類 */ .p-1 { padding: var(--space-1); } .p-2 { padding: var(--space-2); } .p-3 { padding: var(--space-3); } .p-4 { padding: var(--space-4); } .p-6 { padding: var(--space-6); } .p-8 { padding: var(--space-8); } .m-1 { margin: var(--space-1); } .m-2 { margin: var(--space-2); } .m-3 { margin: var(--space-3); } .m-4 { margin: var(--space-4); } .m-6 { margin: var(--space-6); } .m-8 { margin: var(--space-8); } .mt-1 { margin-top: var(--space-1); } .mt-2 { margin-top: var(--space-2); } .mt-4 { margin-top: var(--space-4); } .mt-6 { margin-top: var(--space-6); } .mt-8 { margin-top: var(--space-8); } .mb-1 { margin-bottom: var(--space-1); } .mb-2 { margin-bottom: var(--space-2); } .mb-4 { margin-bottom: var(--space-4); } .mb-6 { margin-bottom: var(--space-6); } .mb-8 { margin-bottom: var(--space-8); } /* 字體工具類 */ .text-xs { font-size: var(--text-xs); } .text-sm { font-size: var(--text-sm); } .text-base { font-size: var(--text-base); } .text-lg { font-size: var(--text-lg); } .text-xl { font-size: var(--text-xl); } .text-2xl { font-size: var(--text-2xl); } .text-3xl { font-size: var(--text-3xl); } .text-4xl { font-size: var(--text-4xl); } .font-light { font-weight: var(--font-weight-light); } .font-normal { font-weight: var(--font-weight-normal); } .font-medium { font-weight: var(--font-weight-medium); } .font-semibold { font-weight: var(--font-weight-semibold); } .font-bold { font-weight: var(--font-weight-bold); } /* 互動效果 */ .hover-lift { transition: transform var(--transition-fast), box-shadow var(--transition-fast); } .hover-lift:hover { transform: translateY(-2px); box-shadow: 0 8px 25px 0 var(--shadow-medium); } .hover-scale { transition: transform var(--transition-fast); } .hover-scale:hover { transform: scale(1.05); } /* 動畫關鍵幀 */ @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } @keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } } @keyframes slideInLeft { from { transform: translateX(-100%); } to { transform: translateX(0); } } .animate-fade-in { animation: fadeIn var(--transition-normal) ease-out; } .animate-fade-in-up { animation: fadeInUp var(--transition-normal) ease-out; } .animate-slide-in-right { animation: slideInRight var(--transition-normal) ease-out; } .animate-slide-in-left { animation: slideInLeft var(--transition-normal) ease-out; } /* 無障礙設計 - 減少動畫 */ @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }