/* ==========================================================
   dark.css — iOS Dark Mode 主题
   设计语言：Apple Human Interface Guidelines (Dark)
   基底纯黑 + 分组灰 + 系统蓝 + 毛玻璃 + 大圆角
   ========================================================== */

[data-theme="dark"],
html:not([data-theme]) body:not([data-theme="light"]) {
    --bg-color: #000000;
    --bg-secondary: #1C1C1E;
    --bg-gradient: #000000;

    --text-color: #FFFFFF;
    --text-secondary: rgba(235, 235, 245, 0.62);
    --text-muted: rgba(235, 235, 245, 0.34);

    --card-bg: #1C1C1E;
    --card-border: rgba(84, 84, 88, 0.48);
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    --card-hover-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);

    --primary-color: #0A84FF;
    --primary-hover: #409CFF;
    --primary-light: rgba(10, 132, 255, 0.15);
    --primary-glow: rgba(10, 132, 255, 0.35);

    --success-color: #30D158;
    --danger-color: #FF453A;
    --warning-color: #FFD60A;
    --info-color: #64D2FF;

    --input-bg: #1C1C1E;
    --input-border: rgba(84, 84, 88, 0.48);
    --input-focus: #0A84FF;
    --nav-bg: rgba(28, 28, 30, 0.82);
    --sidebar-bg: #1C1C1E;

    --ios-radius-card: 20px;
    --ios-radius-input: 12px;
    --ios-radius-btn: 14px;
    --ios-separator: rgba(84, 84, 88, 0.48);
}

/* ================= 底色 ================= */
html[data-theme="dark"],
html[data-theme="dark"] body {
    background: #000000 !important;
    color: #FFFFFF !important;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
                 "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif !important;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

/* 去掉所有动态光球，iOS 走纯净路线 */
html[data-theme="dark"] .bg-orb,
html[data-theme="dark"] .bg-orb-1,
html[data-theme="dark"] .bg-orb-2,
html[data-theme="dark"] .bg-orb-3,
html[data-theme="dark"] .bg-orb-4 {
    display: none !important;
}

/* ================= 卡片 / 分组 ================= */
html[data-theme="dark"] .card,
html[data-theme="dark"] .card-static,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .quick-item,
html[data-theme="dark"] .mat-card,
html[data-theme="dark"] .announcement-card,
html[data-theme="dark"] .auth-card {
    background: #1C1C1E !important;
    border: 0.5px solid rgba(84, 84, 88, 0.34) !important;
    border-radius: 20px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: transform .2s cubic-bezier(.32,.72,0,1),
                background .2s ease, box-shadow .2s ease !important;
}

html[data-theme="dark"] .card:hover,
html[data-theme="dark"] .stat-card:hover,
html[data-theme="dark"] .quick-item:hover,
html[data-theme="dark"] .mat-card:hover {
    background: #2C2C2E !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55) !important;
    transform: none !important;
}

/* 卡片内部分隔线 */
html[data-theme="dark"] .divider,
html[data-theme="dark"] hr {
    background: rgba(84, 84, 88, 0.34) !important;
    border: none !important;
    height: 0.5px !important;
}

/* ================= 导航栏：iOS 毛玻璃 ================= */
html[data-theme="dark"] .navbar {
    background: rgba(28, 28, 30, 0.78) !important;
    backdrop-filter: saturate(180%) blur(24px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(24px) !important;
    border-bottom: 0.5px solid rgba(84, 84, 88, 0.34) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .mobile-tab {
    background: rgba(28, 28, 30, 0.82) !important;
    backdrop-filter: saturate(180%) blur(24px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(24px) !important;
    border-top: 0.5px solid rgba(84, 84, 88, 0.34) !important;
}

html[data-theme="dark"] .navbar a,
html[data-theme="dark"] .nav-link,
html[data-theme="dark"] .mobile-tab a {
    color: rgba(235, 235, 245, 0.62) !important;
    text-shadow: none !important;
}

html[data-theme="dark"] .navbar a:hover,
html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .navbar a.active,
html[data-theme="dark"] .nav-link.active,
html[data-theme="dark"] .mobile-tab a.active {
    color: #0A84FF !important;
    text-shadow: none !important;
}

/* ================= Hero 区 ================= */
html[data-theme="dark"] .hero-section {
    background: #1C1C1E !important;
    border: 0.5px solid rgba(84, 84, 88, 0.34) !important;
    border-radius: 20px !important;
    box-shadow: none !important;
    overflow: hidden;
}

html[data-theme="dark"] .hero-section::after {
    display: none !important;
}

/* ================= 标题 ================= */
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] .hero-section h1,
html[data-theme="dark"] .auth-title {
    background: none !important;
    -webkit-text-fill-color: #FFFFFF !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    letter-spacing: -0.022em !important;
    text-shadow: none !important;
}

html[data-theme="dark"] h2,
html[data-theme="dark"] h3 {
    font-weight: 600 !important;
}

html[data-theme="dark"] p,
html[data-theme="dark"] .hero-section p {
    color: rgba(235, 235, 245, 0.62);
}

/* ================= 按钮 ================= */
html[data-theme="dark"] .btn-primary {
    background: #0A84FF !important;
    background-image: none !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 14px !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em;
    box-shadow: none !important;
    transition: background .15s ease, transform .1s ease !important;
}

html[data-theme="dark"] .btn-primary:hover {
    background: #409CFF !important;
    transform: none !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .btn-primary:active {
    background: #0071E3 !important;
    transform: scale(0.98) !important;
}

html[data-theme="dark"] .btn-outline,
html body:not([data-theme="light"]) .btn-outline {
    background: rgba(120, 120, 128, 0.16) !important;
    background-image: none !important;
    border: none !important;
    border-radius: 14px !important;
    color: #0A84FF !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

html[data-theme="dark"] .btn-outline:hover {
    background: rgba(120, 120, 128, 0.24) !important;
    border: none !important;
    color: #409CFF !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .btn-danger  { background: #FF453A !important; border: none !important; border-radius: 14px !important; color: #fff !important; }
html[data-theme="dark"] .btn-success { background: #30D158 !important; border: none !important; border-radius: 14px !important; color: #fff !important; }
html[data-theme="dark"] .btn-warning { background: #FFD60A !important; border: none !important; border-radius: 14px !important; color: #000 !important; }

/* ================= 输入框 ================= */
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="url"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .form-input {
    background: #1C1C1E !important;
    border: 0.5px solid rgba(84, 84, 88, 0.48) !important;
    border-radius: 12px !important;
    color: #FFFFFF !important;
    box-shadow: none !important;
    transition: border-color .15s ease, background .15s ease !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: rgba(235, 235, 245, 0.3) !important;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] .form-input:focus {
    background: #1C1C1E !important;
    border-color: #0A84FF !important;
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25) !important;
    outline: none !important;
}

/* 输入框图标颜色 */
html[data-theme="dark"] .input-icon-wrap i {
    color: rgba(235, 235, 245, 0.34) !important;
}

/* ================= 登录 / 注册 ================= */
html[data-theme="dark"] .auth-container,
html[data-theme="dark"] .auth-wrapper,
html[data-theme="dark"] .auth-card {
    background: #1C1C1E !important;
    border: 0.5px solid rgba(84, 84, 88, 0.34) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6) !important;
}

html[data-theme="dark"] .auth-tabs {
    background: rgba(118, 118, 128, 0.14) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 3px !important;
}

html[data-theme="dark"] .auth-tab {
    background: transparent !important;
    border: none !important;
    border-radius: 10px !important;
    color: rgba(235, 235, 245, 0.62) !important;
    box-shadow: none !important;
    font-weight: 500 !important;
}

html[data-theme="dark"] .auth-tab.active {
    background: #636366 !important;
    color: #FFFFFF !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .auth-brand-icon {
    background: #0A84FF !important;
    border-radius: 20px !important;
    box-shadow: none !important;
}

/* ================= 徽章 / 分组列表 ================= */
html[data-theme="dark"] .badge-success { background: rgba(48, 209, 88, 0.16) !important; color: #30D158 !important; border: none !important; border-radius: 8px !important; }
html[data-theme="dark"] .badge-danger  { background: rgba(255, 69, 58, 0.16) !important; color: #FF453A !important; border: none !important; border-radius: 8px !important; }
html[data-theme="dark"] .badge-warning { background: rgba(255, 214, 10, 0.16) !important; color: #FFD60A !important; border: none !important; border-radius: 8px !important; }
html[data-theme="dark"] .badge-info    { background: rgba(10, 132, 255, 0.16) !important; color: #0A84FF !important; border: none !important; border-radius: 8px !important; }

html[data-theme="dark"] .stats-pill {
    background: rgba(118, 118, 128, 0.16) !important;
    border: none !important;
    border-radius: 999px !important;
    color: rgba(235, 235, 245, 0.62) !important;
    box-shadow: none !important;
}

/* ================= 毛玻璃辅助类 ================= */
html[data-theme="dark"] .glass,
html[data-theme="dark"] .glass-dark {
    background: rgba(28, 28, 30, 0.7) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    border: 0.5px solid rgba(84, 84, 88, 0.34) !important;
    border-radius: 20px !important;
}

/* ================= 主题切换按钮 ================= */
html[data-theme="dark"] .theme-toggle {
    background: rgba(118, 118, 128, 0.16) !important;
    border: none !important;
    border-radius: 50% !important;
    color: #FFD60A !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .theme-toggle:hover {
    background: rgba(118, 118, 128, 0.26) !important;
    box-shadow: none !important;
}

/* ================= 空状态 / 提示 ================= */
html[data-theme="dark"] .empty-state {
    color: rgba(235, 235, 245, 0.34) !important;
}

html[data-theme="dark"] .empty-state i {
    color: rgba(235, 235, 245, 0.2) !important;
}

/* ================= 滚动条（iOS 极细） ================= */
html[data-theme="dark"] ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
html[data-theme="dark"] ::-webkit-scrollbar-track {
    background: transparent;
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(118, 118, 128, 0.5);
    border-radius: 3px;
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(118, 118, 128, 0.75);
}

/* ================= 选中文字 ================= */
html[data-theme="dark"] ::selection {
    background: rgba(10, 132, 255, 0.4);
    color: #FFFFFF;
}

/* ================= 动效：iOS 缓动 ================= */
html[data-theme="dark"] .card,
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .btn-outline,
html[data-theme="dark"] .form-input {
    transition-timing-function: cubic-bezier(.32, .72, 0, 1) !important;
}
