/* 
  Mio Dashboard 設計系統
  Liquid Glass + Premium Gold
  版本: 2.0
*/

:root {
    /* 主色調 */
    --primary-color: #CA8A04;
    --primary-hover: #EAB308;
    --secondary-color: #CA8A04;
    --accent-color: #CA8A04;
    
    /* 背景色 */
    --bg-primary: #0a0a0a;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #111;
    --bg-card: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    --bg-hover: rgba(255, 255, 255, 0.03);
    
    /* 文字色 */
    --text-primary: #d4d4d4;
    --text-secondary: #525252;
    --text-muted: #404040;
    
    /* 邊框 */
    --border-color: rgba(255, 255, 255, 0.04);
    --border-radius-sm: 8px;
    --border-radius-md: 10px;
    --border-radius-lg: 20px;
    --border-radius-xl: 20px;
    
    /* 陰影 */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(202, 138, 4, 0.05);
    
    /* 過渡 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* 字體 */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

/* 深色模式 */
[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #111;
    --bg-card: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    --bg-hover: rgba(255, 255, 255, 0.03);
}

/* 淺色模式 */
[data-theme="light"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #111;
    --bg-card: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    --bg-hover: rgba(255, 255, 255, 0.03);
    --text-primary: #d4d4d4;
    --text-secondary: #525252;
    --text-muted: #404040;
    --border-color: rgba(255, 255, 255, 0.04);
}

/* 重置樣式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: #0a0a0a;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* 標題 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* 段落 */
p {
    margin-bottom: 1em;
    color: var(--text-secondary);
}

/* 連結 */
a {
    color: #CA8A04;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: #EAB308;
}

/* 按鈕 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid #1a1a1a;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: inherit;
    background: transparent;
    color: var(--text-primary);
}

.btn-primary {
    border-color: rgba(202,138,4,0.3);
    color: #CA8A04;
    background: transparent;
}

.btn-primary:hover {
    background: rgba(202,138,4,0.08);
    box-shadow: 0 8px 40px rgba(202,138,4,0.05);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid #1a1a1a;
}

.btn-secondary:hover {
    border-color: rgba(202,138,4,0.3);
    color: #CA8A04;
}

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

.btn-lg {
    padding: 14px 28px;
    font-size: 1.125rem;
}

/* 卡片 */
.card {
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: rgba(202,138,4,0.15);
    box-shadow: 0 8px 40px rgba(202,138,4,0.05);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* 表單元素 */
input, textarea, select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #1a1a1a;
    border-radius: 10px;
    background: #111;
    color: #d4d4d4;
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: rgba(202,138,4,0.3);
    box-shadow: 0 0 0 3px rgba(202,138,4,0.08);
}

input::placeholder, textarea::placeholder {
    color: #404040;
}

/* 標籤 */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: rgba(202, 138, 4, 0.1);
    color: #CA8A04;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.tag-success {
    background: rgba(202, 138, 4, 0.1);
    color: #CA8A04;
}

.tag-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.tag-error {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

/* 進度條 */
.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #CA8A04, #EAB308);
    border-radius: 4px;
    transition: width var(--transition-slow);
}

/* 網格系統 */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Flex 工具類 */
.flex { display: flex; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }

/* 文字工具類 */
.text-center { text-align: center; }
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.font-bold { font-weight: 700; }

/* 邊距工具類 */
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }
.p-sm { padding: 8px; }
.p-md { padding: 16px; }
.p-lg { padding: 24px; }

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

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

.animate-fadeIn { animation: fadeIn var(--transition-normal) ease-out; }
.animate-slideIn { animation: slideIn var(--transition-normal) ease-out; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-spin { animation: spin 1s linear infinite; }

/* 滾動條 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(202,138,4,0.2);
}

/* 響應式設計 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    body {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.35rem; }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}
