/* =============================================
   闪影星云 - 全局设计系统
   ============================================= */

:root {
    /* 核心配色 - 暗色模式 (默认) */
    --bg-primary: rgba(0, 0, 0, 0.6);
    --bg-secondary: rgba(11, 14, 17, 0.8);
    --bg-elevated: rgba(22, 24, 28, 0.9);
    --bg-hover: rgba(255, 255, 255, 0.08);
    
    --text-primary: #e7e9ea;
    --text-secondary: #71767b;
    --text-muted: #536471;
    
    --accent: #1d9bf0;
    --accent-hover: #1a8cd8;
    --accent-alpha: rgba(29, 155, 240, 0.1);
    
    --accent-success: #00ba7c;
    --accent-warning: #ffd000;
    --accent-danger: #f4212e;
    
    --border-color: #2f3336;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.5);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.6);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 亮色模式定义 */
body.light-mode {
    --bg-primary: rgba(255, 255, 255, 0.7);
    --bg-secondary: rgba(247, 249, 249, 0.8);
    --bg-elevated: rgba(255, 255, 255, 0.95);
    --bg-hover: rgba(0, 0, 0, 0.04);
    
    --text-primary: #0f1419;
    --text-secondary: #536471;
    --text-muted: #8b98a5;
    
    --border-color: #eff3f4;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    transition: background-color var(--transition-base), color var(--transition-base);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    text-decoration: underline;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
    transition: all var(--transition-fast);
}

input, textarea {
    font-family: inherit;
    color: inherit;
}

ul {
    list-style: none;
}

/* 通用隐藏类 */
.hidden {
    display: none !important;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* 工具类 */
.animate-fadeIn {
    animation: fadeIn 0.4s ease forwards;
}

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

.glass {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.light-mode .glass {
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* 亮色模式强制覆盖 */
.light-mode .nebula-canvas {
    background: radial-gradient(circle at center, #f0f4ff, #ffffff);
}

.light-mode .monster-purple { background: linear-gradient(180deg,#818cf8,#6366f1); }
.light-mode .auth-inner {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: #000;
}
.light-mode .auth-header h1 { color: #000; }
.light-mode .input-wrap input { background: rgba(0,0,0,0.03); color: #000; border: 1px solid rgba(0,0,0,0.1); }
