/* ========================================
   OIer 工具箱 — Premium Dark Theme
   Glassmorphism · Animated Gradients · Micro-interactions
   ======================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --- CSS 变量（主题系统） --- */
:root {
  --bg-primary: #06060e;
  --bg-secondary: #0d0d1a;
  --bg-card: rgba(16, 18, 36, 0.7);
  --bg-input: rgba(20, 22, 40, 0.8);
  --bg-hover: rgba(30, 34, 60, 0.8);
  --text-primary: #f0f0f8;
  --text-secondary: #a8a8c8;
  --text-muted: #6a6a88;
  --accent: #7c6cf0;
  --accent-hover: #9d8fff;
  --accent-glow: rgba(124, 108, 240, 0.35);
  --accent-2: #00d2ff;
  --accent-3: #f857a6;
  --success: #00c9a7;
  --success-bg: rgba(0, 201, 167, 0.12);
  --danger: #ff6b6b;
  --danger-hover: #ee5253;
  --warning: #feca57;
  --warning-bg: rgba(254, 202, 87, 0.12);
  --border: rgba(255, 255, 255, 0.06);
  --border-focus: var(--accent);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(124, 108, 240, 0.15);
  --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-fast: 0.15s ease;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  --max-width: 1100px;
  --glass-bg: rgba(12, 12, 28, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
}

/* --- 基础重置 --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* 动态渐变背景 */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 60% 50% at 15% 10%, rgba(124, 108, 240, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 20%, rgba(0, 210, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 50% 90%, rgba(248, 87, 166, 0.06) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
  animation: bgShift 20s ease-in-out infinite alternate;
}

@keyframes bgShift {
  0% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0.8; transform: scale(1); }
}

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

/* --- 布局 --- */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* 顶部导航 */
.app-header {
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.app-header .logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
}
.app-header .logo .icon {
  font-size: 1.5rem;
}

.app-header .nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info {
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 6px 14px;
  background: rgba(124, 108, 240, 0.08);
  border: 1px solid rgba(124, 108, 240, 0.15);
  border-radius: 20px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

/* --- 工具栏导航 --- */
.toolbar {
  display: flex;
  gap: 2px;
  padding: 6px 16px 0;
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: sticky;
  top: 64px;
  z-index: 99;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  scrollbar-width: none;
}
.toolbar::-webkit-scrollbar { display: none; }

.toolbar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
  font-family: var(--font-sans);
  border-radius: 8px 8px 0 0;
}

.toolbar-btn:hover {
  color: var(--text-primary);
  background: rgba(124, 108, 240, 0.06);
}
.toolbar-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
  background: rgba(124, 108, 240, 0.08);
}

.app-main {
  flex: 1;
  padding: 28px 20px;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
}

/* --- 页面切换动画 --- */
.page {
  display: none;
  animation: pageEnter 0.4s ease;
}
.page.active {
  display: block;
}

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

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

/* --- 按钮 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  min-height: 42px;
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #6056e0 100%);
  color: white;
  box-shadow: 0 2px 12px rgba(124, 108, 240, 0.25);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  box-shadow: 0 4px 20px rgba(124, 108, 240, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--accent);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger) 0%, var(--danger-hover) 100%);
  color: white;
}
.btn-danger:hover:not(:disabled) {
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px;
  min-height: auto;
  border: none;
}
.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(124, 108, 240, 0.1);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
  min-height: 32px;
}

/* 标签页按钮 */
.tab-btn.active {
  background: var(--accent) !important;
  color: white !important;
  border-color: var(--accent) !important;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
}

/* --- 表单 --- */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  padding: 11px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.92rem;
  transition: all var(--transition);
  outline: none;
  min-height: 44px;
  font-family: var(--font-sans);
  backdrop-filter: blur(4px);
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow), var(--shadow-glow);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input.mono {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.form-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}
.form-input.error {
  border-color: var(--danger);
}
.form-input.error + .form-error {
  display: block;
}

/* --- 卡片 --- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  padding: 22px;
  margin-bottom: 16px;
  transition: all var(--transition);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
}

/* --- 认证页面 --- */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 24px 16px;
}

.auth-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: conic-gradient(from 180deg, transparent, rgba(124,108,240,0.05), transparent 30%);
  animation: authGlow 8s linear infinite;
  z-index: -1;
}

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

.auth-card .logo-section {
  text-align: center;
  margin-bottom: 32px;
}

.auth-card .logo-section .icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
}

.auth-card .logo-section h1 {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-card .logo-section p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

.auth-card .auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* --- TOTP 令牌卡片 --- */
.totp-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  user-select: none;
  backdrop-filter: blur(8px);
}

.totp-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(124,108,240,0.04), transparent);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.totp-card:hover {
  background: var(--bg-hover);
  border-color: rgba(124, 108, 240, 0.3);
}

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

.totp-card:active {
  transform: scale(0.995);
}

.totp-card .issuer-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124,108,240,0.1), rgba(0,210,255,0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  border: 1px solid var(--glass-border);
}

.totp-card .token-info {
  flex: 1;
  min-width: 0;
}

.totp-card .token-info .issuer {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1px;
}

.totp-card .token-info .account {
  color: var(--text-secondary);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.totp-card .code-section {
  text-align: right;
  flex-shrink: 0;
}

.totp-card .code-section .code {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.totp-card .code-section .code.copied {
  color: var(--success);
}

.totp-card .code-section .timer-bar-wrapper {
  width: 100px;
  height: 4px;
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
  margin-top: 6px;
  margin-left: auto;
  overflow: hidden;
}

.totp-card .code-section .timer-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 1s linear;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.totp-card .code-section .timer-bar.urgent {
  background: linear-gradient(90deg, var(--warning), #f39c12);
}
.totp-card .code-section .timer-bar.critical {
  background: linear-gradient(90deg, var(--danger), #ee5253);
  animation: pulse 0.5s ease-in-out infinite;
}

.totp-card .code-section .remaining-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 3px;
  font-family: var(--font-mono);
}

.totp-card .card-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition);
  position: relative;
  z-index: 2;
}

.totp-card:hover .card-actions {
  opacity: 1;
}

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

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 16px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state h3 {
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-size: 1.1rem;
}

/* --- Toast 通知 --- */
.toast-container {
  position: fixed;
  top: 80px;
  right: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  min-width: 260px;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
  font-size: 0.88rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--accent); }

.toast-removing {
  animation: slideOut 0.25s ease forwards;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* --- 模态框 --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.2s ease;
  padding: 16px;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

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

/* --- 加载占位 --- */
.loading-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(124,108,240,0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

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

.loading-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 16px;
  gap: 16px;
  color: var(--text-secondary);
}

/* ============================================
   控制台 · 仪表盘 — 英雄区 + 分类卡片
   ============================================ */

/* 英雄区 */
.dashboard-hero {
  text-align: center;
  padding: 32px 20px 24px;
  margin-bottom: 28px;
  position: relative;
}

.dashboard-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary), var(--accent), var(--accent-2));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientText 6s ease infinite;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}

@keyframes gradientText {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.dashboard-hero p {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 500px;
  margin: 0 auto;
}

/* 分类标题 */
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 32px 0 16px;
  padding-left: 4px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}

/* 核心功能卡片（大卡片） */
.dashboard-grid-hero {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}

.dashboard-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px 20px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(124,108,240,0.08), rgba(0,210,255,0.04));
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition);
}

.dashboard-card:hover {
  border-color: rgba(124, 108, 240, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(124, 108, 240, 0.12);
}

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

.dashboard-card:active {
  transform: translateY(-2px) scale(0.98);
}

.dashboard-card .card-icon {
  font-size: 2.5rem;
  margin-bottom: 14px;
  display: inline-block;
  transition: transform var(--transition);
}

.dashboard-card:hover .card-icon {
  transform: scale(1.12);
}

.dashboard-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.dashboard-card p {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.dashboard-card .card-stats {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
}

/* 英雄卡片特殊样式 */
.dashboard-card.hero-card {
  padding: 28px 24px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 20px;
}

.dashboard-card.hero-card .card-icon {
  font-size: 3rem;
  margin-bottom: 0;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(124,108,240,0.1);
  border: 1px solid rgba(124,108,240,0.15);
}

.dashboard-card.hero-card:hover .card-icon {
  transform: scale(1.05);
}

.dashboard-card.hero-card .hero-info {
  flex: 1;
  min-width: 0;
}

.dashboard-card.hero-card h3 {
  font-size: 1.15rem;
}

.dashboard-card.hero-card p {
  font-size: 0.85rem;
  margin-top: 2px;
}

.dashboard-card.hero-card .card-stats {
  margin-top: 8px;
}

/* 卡片装饰色条 */
.dashboard-card.accent-purple::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity var(--transition);
}
.dashboard-card.accent-purple:hover::after { opacity: 1; }

.dashboard-card.accent-cyan::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-2), var(--success));
  opacity: 0;
  transition: opacity var(--transition);
}
.dashboard-card.accent-cyan:hover::after { opacity: 1; }

.dashboard-card.accent-pink::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-3), var(--accent));
  opacity: 0;
  transition: opacity var(--transition);
}
.dashboard-card.accent-pink:hover::after { opacity: 1; }

/* --- 云盘 --- */
.drive-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.drive-stats {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  backdrop-filter: blur(4px);
}

.file-item:hover {
  background: var(--bg-hover);
  border-color: rgba(124, 108, 240, 0.25);
}

.file-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-info .file-name {
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-info .file-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.file-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition);
}

.file-item:hover .file-actions {
  opacity: 1;
}

.file-size-bar {
  height: 4px;
  background: rgba(255,255,255,0.03);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.file-size-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* --- 响应式 --- */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
  }

  .dashboard-grid-hero {
    grid-template-columns: 1fr;
  }

  .dashboard-hero h1 {
    font-size: 1.5rem;
  }

  .dashboard-card {
    padding: 18px 14px;
  }

  .dashboard-card .card-icon {
    font-size: 2rem;
    margin-bottom: 10px;
  }

  .dashboard-card h3 {
    font-size: 0.9rem;
  }

  .dashboard-card p {
    font-size: 0.75rem;
  }
}

@media (max-width: 600px) {
  .app-header {
    padding: 0 14px;
  }

  .app-main {
    padding: 16px 10px;
  }

  .auth-card {
    padding: 28px 22px;
  }

  .totp-card {
    padding: 12px 14px;
    gap: 10px;
  }

  .totp-card .issuer-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    border-radius: 10px;
  }

  .totp-card .code-section .code {
    font-size: 1.2rem;
    letter-spacing: 2px;
  }

  .totp-card .code-section .timer-bar-wrapper {
    width: 60px;
  }

  .totp-card .card-actions {
    opacity: 1;
  }

  .user-info {
    display: none;
  }

  .modal {
    padding: 22px;
    border-radius: var(--radius);
  }
}

@media (max-width: 400px) {
  .totp-card .code-section .code {
    font-size: 1rem;
    letter-spacing: 1px;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .dashboard-card {
    padding: 14px 10px;
  }

  .dashboard-card .card-icon {
    font-size: 1.6rem;
    margin-bottom: 8px;
  }
}

/* --- 工具类 --- */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/*添加到页头按钮组*/
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.copied-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 10px 24px;
  font-size: 0.85rem;
  z-index: 300;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: fadeIn 0.2s ease;
  color: var(--success);
  font-weight: 600;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.2);
}
