/* Premium studio layer - loaded after the base interface styles. */
:root {
  --bg-primary: #060807;
  --bg-secondary: #0c0f0d;
  --bg-card: #121613;
  --card-bg: #121613;
  --bg-hover: #1a211d;
  --border: #273029;
  --border-light: #3b4940;
  --accent: #68e8a8;
  --accent-hover: #8ff5c3;
  --accent-light: rgba(104, 232, 168, 0.12);
  --accent2: #8bd8ff;
  --accent2-light: rgba(139, 216, 255, 0.11);
  --success: #68e8a8;
  --warning: #e8bf67;
  --danger: #ff7c88;
  --info: #8bd8ff;
  --text-primary: #f5f8f6;
  --text-secondary: #bcc6c0;
  --text-muted: #748079;
  --shadow: 0 14px 38px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 28px 90px rgba(0, 0, 0, 0.44);
}

html { background: #060807; }
body { background: #060807; font-family: "Segoe UI Variable", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
::selection { color: #052a1c; background: #82efbb; }

.app-layout { position: relative; isolation: isolate; }
.app-layout::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(142, 164, 150, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(142, 164, 150, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, black 0, transparent 78%);
}

/* Floating studio dock */
.sidebar {
  width: 218px;
  top: 12px;
  left: 12px;
  bottom: 12px;
  background: rgba(11, 14, 12, 0.92);
  border: 1px solid rgba(135, 161, 145, 0.2);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(24px) saturate(125%);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0 18px auto;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(139, 216, 255, 0.7), rgba(104, 232, 168, 0.76), transparent);
  opacity: 0.75;
}

.sidebar-logo {
  min-height: 76px;
  padding: 18px;
  border-bottom-color: rgba(135, 161, 145, 0.15);
}

.sidebar-logo .logo-icon,
.mobile-header-logo .logo-icon,
.mobile-header .logo-icon,
.auth-logo .logo-icon,
.landing-brand-mark {
  position: relative;
  overflow: hidden;
  background: #74ebb0 !important;
  color: #042619 !important;
  box-shadow: 0 0 0 1px rgba(157, 255, 207, 0.45), 0 0 26px rgba(104, 232, 168, 0.16);
}

.sidebar-logo .logo-icon::after,
.auth-logo .logo-icon::after,
.landing-brand-mark::after {
  content: "";
  position: absolute;
  inset: -60% -120%;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.72) 50%, transparent 58%);
  transform: translateX(-35%);
  animation: premium-logo-sheen 6s ease-in-out infinite;
}

.sidebar-logo .logo-text { font-size: 15px; font-weight: 760; }
.sidebar-logo .logo-text span { color: #7df0b7; }
.sidebar-nav { padding: 16px 9px; }
.nav-section-title { color: #59655e; font-size: 9px; text-transform: none; }

.nav-item {
  position: relative;
  min-height: 42px;
  margin: 2px 0;
  padding: 10px 11px;
  overflow: hidden;
  color: #95a199;
  border: 1px solid transparent;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.nav-item::after {
  content: "";
  position: absolute;
  inset: auto 12px 5px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(104, 232, 168, 0.75), transparent);
  opacity: 0;
  transform: scaleX(0.3);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-item:hover {
  color: #e9efeb;
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(139, 216, 255, 0.1);
  transform: translateX(2px);
}

.nav-item.active {
  color: #8df2c0;
  background: linear-gradient(100deg, rgba(104, 232, 168, 0.15), rgba(139, 216, 255, 0.035));
  border-color: rgba(104, 232, 168, 0.22);
  box-shadow: inset 3px 0 0 #68e8a8, 0 0 24px rgba(104, 232, 168, 0.055);
}
.nav-item.active::after { opacity: 1; transform: scaleX(1); }
.sidebar-footer { border-top-color: rgba(135, 161, 145, 0.15); }
.user-info { border: 1px solid transparent; }
.user-info:hover { border-color: rgba(104, 232, 168, 0.14); }
.user-avatar { background: #17231d; border-color: #32473b; box-shadow: inset 0 0 14px rgba(104, 232, 168, 0.08); }

.main-content { position: relative; margin-left: 242px; overflow: hidden; }
.main-content::after {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  left: 242px;
  width: 1px;
  z-index: 45;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(139, 216, 255, 0.28), transparent);
}

.page-header {
  position: sticky;
  top: 0;
  z-index: 42;
  min-height: 88px;
  padding: 21px 30px 13px;
  background: rgba(6, 8, 7, 0.74);
  border-bottom: 1px solid rgba(135, 161, 145, 0.13);
  backdrop-filter: blur(22px) saturate(125%);
}
.page-header::after {
  content: "";
  position: absolute;
  right: 30px;
  bottom: -1px;
  left: 30px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(104, 232, 168, 0.56), rgba(139, 216, 255, 0.18) 32%, transparent 78%);
}
.page-title { color: #f7faf8; font-size: 23px; font-weight: 760; text-shadow: 0 0 28px rgba(139, 216, 255, 0.08); }
.page-title i[data-lucide] { color: #8eeec0; filter: drop-shadow(0 0 8px rgba(104, 232, 168, 0.28)); }
.page-subtitle { color: #7f8b84; font-size: 12px; }
.page-body { position: relative; padding: 24px 30px 44px; }
.page-body > * { animation: premium-surface-in 0.48s both; }
.page-body > *:nth-child(2) { animation-delay: 0.05s; }
.page-body > *:nth-child(3) { animation-delay: 0.1s; }
.page-body > *:nth-child(4) { animation-delay: 0.15s; }

/* High-depth surfaces */
.card,
.stat-card,
.task-card,
.pricing-card,
.chart-container,
.table-container {
  background: linear-gradient(145deg, rgba(20, 25, 21, 0.96), rgba(10, 13, 11, 0.98));
  border-color: rgba(132, 157, 141, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 18px 48px rgba(0, 0, 0, 0.19);
}

.card,
.stat-card,
.task-card,
.history-card,
.pricing-card {
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}
.card:hover { border-color: rgba(139, 216, 255, 0.24); }
.card-title { color: #eef4f0; font-weight: 700; }

/* Luminous commands */
.btn {
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  font-weight: 700;
  transform: translateZ(0);
}

.btn-primary {
  color: #05271a;
  background: linear-gradient(110deg, #55d99a 0%, #55d99a 38%, #a1f8cf 50%, #55d99a 62%, #55d99a 100%);
  background-size: 260% 100%;
  border-color: rgba(177, 255, 216, 0.62);
  box-shadow: 0 0 0 1px rgba(104, 232, 168, 0.12), 0 8px 26px rgba(40, 204, 129, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 10%, #d8fff0 28%, #8bd8ff 48%, #68e8a8 68%, transparent 90%);
  background-size: 240% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: premium-outline-flow 3.2s linear infinite;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: -80%;
  bottom: -80%;
  left: -36%;
  width: 18%;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.34);
  filter: blur(8px);
  transform: translateX(-220%) rotate(16deg);
  transition: transform 0.55s ease;
}

.btn-primary:hover {
  color: #031f14;
  background-position: 100% 0;
  border-color: rgba(205, 255, 230, 0.9);
  box-shadow: 0 0 0 1px rgba(104, 232, 168, 0.42), 0 0 30px rgba(104, 232, 168, 0.27), 0 14px 34px rgba(0, 0, 0, 0.34);
  transform: translateY(-2px);
}
.btn-primary:hover::after { transform: translateX(820%) rotate(16deg); }
.btn-primary:focus-visible {
  outline: 2px solid #b8f7da;
  outline-offset: 3px;
}

.btn-secondary,
.tool-btn,
.icon-btn {
  color: #c6d0ca;
  background: linear-gradient(145deg, rgba(29, 35, 31, 0.96), rgba(15, 19, 16, 0.98));
  border-color: rgba(140, 165, 150, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.btn-secondary:hover,
.tool-btn:hover,
.icon-btn:hover {
  color: #f5f8f6;
  background: #1d241f;
  border-color: rgba(139, 216, 255, 0.48);
  box-shadow: 0 0 0 1px rgba(139, 216, 255, 0.12), 0 0 24px rgba(139, 216, 255, 0.11);
}

#genBtn,
.dashboard-header .btn-primary,
.landing-hero .btn-primary {
  animation: premium-command-breathe 3.4s ease-in-out infinite;
}

.form-control,
.form-control-static {
  background-color: rgba(7, 10, 8, 0.86);
  border-color: rgba(129, 154, 138, 0.26);
  box-shadow: inset 0 1px 12px rgba(0, 0, 0, 0.22), 0 1px 0 rgba(255, 255, 255, 0.025);
}
.form-control:hover { border-color: rgba(139, 216, 255, 0.28); }
.form-control:focus {
  border-color: rgba(104, 232, 168, 0.78);
  box-shadow: inset 0 1px 12px rgba(0, 0, 0, 0.22), 0 0 0 3px rgba(104, 232, 168, 0.09), 0 0 24px rgba(104, 232, 168, 0.08);
}

/* Dashboard */
.dashboard-stats { gap: 14px; }
.stat-card,
.stat-card[style] {
  position: relative;
  min-height: 112px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(21, 27, 23, 0.98), rgba(9, 12, 10, 0.98)) !important;
  border-top-width: 1px !important;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  opacity: 0.74;
}
.stat-card:hover { transform: translateY(-3px); border-color: rgba(139, 216, 255, 0.25) !important; box-shadow: 0 22px 50px rgba(0, 0, 0, 0.32); }
.stat-card:nth-child(1) { color: #e8bf67; }
.stat-card:nth-child(2) { color: #8bd8ff; }
.stat-card:nth-child(3) { color: #68e8a8; }
.stat-card:nth-child(4) { color: #ff8993; }
.stat-card .stat-value { color: #f6faf7; font-size: 29px; }
.stat-icon,
.stat-icon[style] {
  background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.025);
}
.dashboard-grid { grid-template-columns: minmax(0, 1fr) 294px; gap: 34px; }
.dashboard-section-header { border-bottom-color: rgba(135, 161, 145, 0.15); }
.dashboard-gallery > .empty-state { background: rgba(10, 13, 11, 0.45); border-color: rgba(104, 232, 168, 0.2); }
.quick-action { border: 1px solid transparent; }
.quick-action:hover { background: rgba(104, 232, 168, 0.055); border-color: rgba(104, 232, 168, 0.13); transform: translateX(3px); }
.dashboard-tip { background: rgba(232, 191, 103, 0.055); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025); }

.task-card { overflow: hidden; }
.task-card:hover {
  transform: translateY(-5px);
  border-color: rgba(104, 232, 168, 0.34);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.38), 0 0 24px rgba(104, 232, 168, 0.065);
}
.task-card-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(5, 8, 6, 0.38), transparent 48%);
}

/* Image studio */
.gen-layout { grid-template-columns: minmax(324px, 356px) minmax(0, 1fr) !important; gap: 22px; }
.gen-panel > .card { border-color: rgba(104, 232, 168, 0.22); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25), 0 0 34px rgba(104, 232, 168, 0.035); }
.gen-result > .card:first-child {
  position: relative;
  min-height: 520px !important;
  overflow: hidden;
  border-color: rgba(139, 216, 255, 0.2);
}
.gen-result > .card:first-child::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid transparent;
  border-radius: inherit;
  box-shadow: inset 0 0 50px rgba(139, 216, 255, 0.025);
  animation: premium-canvas-pulse 4.5s ease-in-out infinite;
}
.upload-zone { background: rgba(6, 9, 7, 0.7); border-color: rgba(104, 232, 168, 0.24); }
.upload-zone:hover, .upload-zone.drag-over { border-color: rgba(104, 232, 168, 0.76); box-shadow: inset 0 0 30px rgba(104, 232, 168, 0.055), 0 0 24px rgba(104, 232, 168, 0.07); }
.expiry-notice { background: rgba(232, 191, 103, 0.055); border-color: rgba(232, 191, 103, 0.2); }
.gen-action-bar { background: rgba(18, 22, 19, 0.94); backdrop-filter: blur(16px); }
.history-card { background: linear-gradient(145deg, rgba(18, 23, 19, 0.98), rgba(8, 11, 9, 0.98)) !important; border-color: rgba(132, 157, 141, 0.2) !important; }
.history-card:hover { transform: translateY(-4px); border-color: rgba(139, 216, 255, 0.32) !important; box-shadow: 0 20px 48px rgba(0, 0, 0, 0.34); }
.progress-bar { background: linear-gradient(90deg, #68e8a8, #8bd8ff); box-shadow: 0 0 16px rgba(104, 232, 168, 0.28); }

/* Tables, pricing, payment and account */
.tab-bar { border-bottom-color: rgba(135, 161, 145, 0.17); }
.tab-btn { color: #7f8b84; }
.tab-btn.active { color: #82edb8; border-color: #68e8a8; text-shadow: 0 0 18px rgba(104, 232, 168, 0.16); }
table thead { background: rgba(255, 255, 255, 0.018); }
table th { color: #748079; }
table td { border-color: rgba(132, 157, 141, 0.1); }
table tbody tr { transition: background 0.16s ease; }
table tbody tr:hover { background: rgba(139, 216, 255, 0.035); }

.pricing-container { max-width: 1040px; }
.pricing-card { overflow: hidden; border-color: rgba(132, 157, 141, 0.2); }
.pricing-card:hover { border-color: rgba(139, 216, 255, 0.28); box-shadow: 0 26px 70px rgba(0, 0, 0, 0.3); }
.pricing-card-header { background: rgba(255, 255, 255, 0.018); border-color: rgba(132, 157, 141, 0.13); }
.pricing-table tr:hover td { background: rgba(104, 232, 168, 0.035); }
.pricing-note { border-color: rgba(232, 191, 103, 0.2); background: rgba(232, 191, 103, 0.04); }
.credit-package-grid .btn { min-height: 58px; }
.credit-package-grid .btn:hover { border-color: rgba(104, 232, 168, 0.45); box-shadow: 0 0 24px rgba(104, 232, 168, 0.09); }
#balanceDisplay {
  color: #7df0b7 !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: 0 0 28px rgba(104, 232, 168, 0.15);
}
.card[style*="rgba(124,58,237"] {
  background: linear-gradient(125deg, rgba(104, 232, 168, 0.12), rgba(139, 216, 255, 0.07), rgba(232, 191, 103, 0.05)) !important;
  border-color: rgba(104, 232, 168, 0.28) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 20px 54px rgba(0, 0, 0, 0.24) !important;
}

/* Authentication */
.auth-page {
  position: relative;
  overflow: hidden;
  background-color: #060807;
  background-image:
    linear-gradient(rgba(142, 164, 150, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(142, 164, 150, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
}
.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(104, 232, 168, 0.025) 50%, transparent 62%);
  animation: premium-auth-light 10s linear infinite;
}
.auth-card {
  position: relative;
  overflow: hidden;
  background: rgba(13, 17, 14, 0.91);
  border-color: rgba(139, 216, 255, 0.22);
  box-shadow: 0 38px 100px rgba(0, 0, 0, 0.56), 0 0 50px rgba(104, 232, 168, 0.045), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(24px);
  animation: premium-auth-in 0.62s ease-out both;
}
.auth-card::after {
  content: "";
  position: absolute;
  inset: 0 15% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, #8bd8ff, #68e8a8, transparent);
  opacity: 0.7;
}

/* Administration */
.admin-container { color: var(--text-primary); }
.admin-header { padding-bottom: 18px; border-bottom: 1px solid rgba(132, 157, 141, 0.15); }
.admin-stats { gap: 14px; }
.admin-tabs { background: rgba(10, 13, 11, 0.82); border: 1px solid rgba(132, 157, 141, 0.18); border-radius: 8px; }
.admin-tabs .tab-btn.active { background: rgba(104, 232, 168, 0.09); }
.chart-container, .table-container { border: 1px solid rgba(132, 157, 141, 0.2); border-radius: 8px; }
.modal-card,
.announcement-modal .announcement-content {
  background: rgba(14, 18, 15, 0.96) !important;
  border-color: rgba(139, 216, 255, 0.24) !important;
  border-radius: 8px !important;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.045) !important;
  backdrop-filter: blur(22px);
}
.refresh-btn, .action-btn { transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.refresh-btn:hover, .action-btn:hover { transform: translateY(-1px); box-shadow: 0 0 20px rgba(139, 216, 255, 0.1); }

/* Landing cinematic layer */
.landing-nav {
  height: 72px;
  background: rgba(5, 8, 6, 0.78);
  border-bottom-color: rgba(137, 171, 150, 0.18);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(24px) saturate(130%);
}
.landing-nav-links a { position: relative; color: #97a29b; }
.landing-nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 1px; background: #68e8a8; transform: scaleX(0); transition: transform 0.18s ease; }
.landing-nav-links a:hover::after { transform: scaleX(1); }
.landing-nav-actions .btn-primary { min-width: 90px; }

.landing-hero {
  min-height: 680px;
  max-height: 900px;
  border-bottom-color: rgba(104, 232, 168, 0.18);
  animation: premium-hero-drift 18s ease-in-out infinite alternate;
}
.landing-hero::before { background: rgba(3, 6, 4, 0.71); }
.landing-hero::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 34%;
  left: -42%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(139, 216, 255, 0.055), rgba(104, 232, 168, 0.04), transparent);
  transform: skewX(-12deg);
  animation: premium-hero-scan 9s ease-in-out infinite;
}
.landing-hero-inner { z-index: 2; }
.landing-hero-copy { position: relative; }
.landing-hero-copy::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: -28px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(104, 232, 168, 0.8) 22%, rgba(139, 216, 255, 0.3) 72%, transparent);
  box-shadow: 0 0 18px rgba(104, 232, 168, 0.18);
}
.landing-kicker { color: #c4cec8; }
.landing-kicker-dot { background: #72ecae; box-shadow: 0 0 0 5px rgba(104, 232, 168, 0.1), 0 0 24px rgba(104, 232, 168, 0.55); animation: premium-dot 2.2s ease-in-out infinite; }
.landing-hero h1 { font-size: 64px; text-shadow: 0 16px 50px rgba(0, 0, 0, 0.55); }
.landing-hero h1 span { color: #76edb2; text-shadow: 0 0 38px rgba(104, 232, 168, 0.2); }
.landing-hero-lead { color: #c4cdc7; }
.landing-proof { border-top-color: rgba(162, 188, 172, 0.2); }
.landing-proof-item strong { color: #f7faf8; }
.landing-proof-item span { color: #87938b; }

.landing-section { background: #eef2ef; }
.capability-card {
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(21, 37, 28, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.capability-card::after { content: ""; position: absolute; left: 24px; right: 24px; bottom: 0; height: 2px; background: #68e8a8; transform: scaleX(0); transition: transform 0.25s ease; }
.capability-card:nth-child(2)::after { background: #e8bf67; }
.capability-card:nth-child(3)::after { background: #70bfff; }
.capability-card:hover { transform: translateY(-8px); border-color: rgba(22, 136, 92, 0.25); box-shadow: 0 28px 64px rgba(21, 37, 28, 0.13); }
.capability-card:hover::after { transform: scaleX(1); }
.model-section { background: #090c0a; }
.model-row { transition: background 0.18s ease, padding 0.18s ease; }
.model-row:hover { padding-left: 10px; background: rgba(104, 232, 168, 0.035); }
.landing-cta { background: #edf2ee; }

@keyframes premium-logo-sheen {
  0%, 68% { transform: translateX(-45%); opacity: 0; }
  76% { opacity: 0.8; }
  92%, 100% { transform: translateX(55%); opacity: 0; }
}
@keyframes premium-surface-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes premium-command-breathe {
  0%, 100% { box-shadow: 0 0 0 1px rgba(104, 232, 168, 0.12), 0 8px 26px rgba(40, 204, 129, 0.12); }
  50% { box-shadow: 0 0 0 1px rgba(104, 232, 168, 0.34), 0 0 26px rgba(104, 232, 168, 0.2), 0 10px 30px rgba(0, 0, 0, 0.25); }
}
@keyframes premium-canvas-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes premium-auth-in { from { opacity: 0; transform: translateY(18px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes premium-auth-light { from { transform: translateX(-35%); } to { transform: translateX(35%); } }
@keyframes premium-hero-drift { from { background-position: 48% center; } to { background-position: 54% center; } }
@keyframes premium-hero-scan { 0%, 58% { left: -42%; opacity: 0; } 68% { opacity: 1; } 92%, 100% { left: 116%; opacity: 0; } }
@keyframes premium-dot { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.18); opacity: 1; } }
@keyframes premium-outline-flow { from { background-position: 120% 0; } to { background-position: -120% 0; } }

@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; }
}

@media (max-width: 900px) {
  .sidebar { width: 206px; }
  .main-content { margin-left: 230px; }
  .main-content::after { left: 230px; }
  .gen-layout { grid-template-columns: 318px minmax(0, 1fr) !important; }
}

@media (max-width: 768px) {
  .app-layout::before { background-size: 32px 32px; }
  .main-content { margin-left: 0; overflow: visible; }
  .main-content::after { display: none; }
  .page-header { top: 56px; min-height: 78px; padding: 17px 16px 12px; }
  .page-header::after { right: 16px; left: 16px; }
  .page-body { padding: 18px 16px 32px; }
  .page-body > * { animation-duration: 0.34s; }
  .dashboard-stats { gap: 10px; }
  .stat-card, .stat-card[style] { min-height: 104px; }
  .stat-card .stat-value { font-size: 24px; }
  .gen-layout { grid-template-columns: minmax(0, 1fr) !important; }
  .gen-result > .card:first-child { min-height: 390px !important; }
  .gen-action-bar { bottom: 84px; background: rgba(13, 17, 14, 0.92); border-color: rgba(104, 232, 168, 0.3); }
  .mobile-header {
    background: rgba(7, 10, 8, 0.9);
    border-bottom-color: rgba(139, 216, 255, 0.18);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(20px) saturate(125%);
  }
  .bottom-nav {
    right: 10px;
    bottom: 10px;
    left: 10px;
    overflow: hidden;
    padding-bottom: 0;
    background: rgba(10, 13, 11, 0.93);
    border: 1px solid rgba(133, 159, 143, 0.24);
    border-radius: 8px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(22px) saturate(125%);
  }
  .bottom-nav-item { position: relative; }
  .bottom-nav-item.active {
    color: #8ff5c3;
    background: linear-gradient(to top, rgba(104, 232, 168, 0.1), transparent 74%);
  }
  .bottom-nav-item.active::after {
    content: "";
    position: absolute;
    inset: auto 22% 0;
    height: 1px;
    background: #68e8a8;
    box-shadow: 0 0 12px rgba(104, 232, 168, 0.72);
  }
  .landing-nav { height: 62px; }
  .landing-hero { min-height: 610px; }
  .landing-hero h1 { font-size: 40px; }
  .landing-hero::after { width: 60%; }
}

@media (max-width: 430px) {
  .landing-hero h1 { font-size: 36px; }
  .dashboard-tip { padding: 12px; }
  .stat-card, .stat-card[style] { min-height: 112px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
