:root {
  color-scheme: dark;
  --bg: #08101f;
  --panel: rgba(12, 18, 38, 0.72);
  --panel-strong: rgba(17, 25, 53, 0.9);
  --text: #f6f8ff;
  --muted: #aeb8d6;
  --accent: #75f7d1;
  --accent-2: #8d7cff;
  --danger: #ff6f91;
  --ok: #77e6a1;
  --line: rgba(255, 255, 255, 0.14);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(116, 212, 255, 0.24), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(181, 140, 255, 0.22), transparent 28%),
    linear-gradient(135deg, #070a16 0%, #111831 56%, #1c1b35 100%);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  transition: all var(--transition-normal);
}

button:active {
  transform: scale(0.96);
  transition: transform 0.1s ease;
}

.app-shell {
  position: relative;
  isolation: isolate;
}

.hidden {
  display: none !important;
  transition: opacity var(--transition-normal);
}

.fade-in {
  animation: fadeIn var(--transition-slow) forwards;
}

.slide-up {
  animation: slideUp var(--transition-slow) forwards;
}

.scale-in {
  animation: scaleIn var(--transition-normal) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes scaleIn {
  from { 
    opacity: 0;
    transform: scale(0.9);
  }
  to { 
    opacity: 1;
    transform: scale(1);
  }
}

.activation-screen,
.desktop {
  width: 100%;
  height: 100%;
}

.activation-screen {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(117, 247, 209, 0.18), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(141, 124, 255, 0.22), transparent 32%),
    linear-gradient(135deg, #070d1c, #0b1730 52%, #11112e);
}

.activation-screen::before,
.wallpaper-grid {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 52px 52px;
  opacity: 0.52;
  pointer-events: none;
}

.activation-screen::before {
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent);
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(8px);
  opacity: 0.84;
}

.orb-one {
  width: 180px;
  height: 180px;
  left: 12%;
  bottom: 18%;
  background: rgba(117, 247, 209, 0.28);
}

.orb-two {
  width: 240px;
  height: 240px;
  top: 12%;
  right: 10%;
  background: rgba(141, 124, 255, 0.24);
}

.activation-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(8, 16, 31, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-mark {
  display: inline-grid;
  width: 62px;
  height: 62px;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #07101f;
  font-size: 32px;
  font-weight: 900;
}

.activation-card h1,
.panel h2,
.window-title {
  margin: 0;
}

.activation-card h1 {
  font-size: clamp(34px, 6vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.version-tag {
  display: inline-block;
  margin: 8px 0 16px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.activation-card p {
  margin: 16px 0 28px;
  color: var(--muted);
  line-height: 1.7;
}

.activation-countdown {
  font-size: 14px;
  color: var(--primary) !important;
  margin: 8px 0 16px !important;
  animation: pulse 1s ease-in-out infinite;
}

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

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--text);
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), #7fb2ff);
  color: #07101f;
  font-weight: 800;
}

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.1);
}

.ghost-button {
  background: transparent;
  color: var(--muted);
}

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 111, 145, 0.42);
  border-radius: 999px;
  background: rgba(255, 111, 145, 0.14);
  color: #ffd9e2;
}

.activation-hint {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
}

.activation-hint span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 22px var(--accent);
}

.recovery-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  width: min(460px, 95vw);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(117, 247, 209, 0.28);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(117, 247, 209, 0.12), transparent 34%),
    rgba(8, 16, 31, 0.98);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(22px);
}

.recovery-card-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 99;
}

.remove-password-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.remove-password-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}

.remove-password-card {
  position: relative;
  z-index: 1;
  width: min(460px, 95vw);
  padding: 32px;
  border: 1px solid rgba(117, 247, 209, 0.28);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(117, 247, 209, 0.12), transparent 34%),
    rgba(8, 16, 31, 0.95);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
}

.remove-password-card h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.remove-password-card p {
  margin: 12px 0 24px;
  color: var(--muted);
  line-height: 1.6;
}

.recovery-card h2 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.05em;
}

.recovery-section {
  display: grid;
  gap: 14px;
}

.windows-settings {
  display: flex;
  height: 100%;
  overflow: hidden;
  background: var(--panel);
}

.settings-sidebar {
  width: 240px;
  border-right: 1px solid var(--line);
  padding: 8px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(18, 26, 45, 0.98), rgba(10, 16, 30, 0.95));
}

.settings-header-actions {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
}

.settings-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(117, 247, 209, 0.1);
  border: 1px solid rgba(117, 247, 209, 0.3);
  border-radius: 8px;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.settings-action-btn:hover {
  background: rgba(117, 247, 209, 0.2);
  border-color: var(--accent);
}

/* 反馈页面头部 */
.feedback-page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.feedback-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.feedback-back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.feedback-page-header h2 {
  flex: 1;
  margin: 0;
}

.feedback-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: var(--bg);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.feedback-add-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 16px rgba(117, 247, 209, 0.4);
}

.feedback-add-btn svg {
  stroke-width: 2.5;
}

.feedback-view {
  animation: fadeIn 0.2s ease-out;
}

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

.feedback-header-spacer {
  width: 60px;
}

.sidebar-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 2px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-normal);
  transform: translateX(0);
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.sidebar-item.active {
  background: rgba(117, 247, 209, 0.15);
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding-left: 11px;
}

.sidebar-submenu {
  margin-top: 8px;
}

.submenu-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 4px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.submenu-title:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.submenu-title svg:first-child {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.submenu-arrow {
  width: 16px;
  height: 16px;
  margin-left: auto;
  transition: transform var(--transition-normal);
}

.submenu-title.active .submenu-arrow {
  transform: rotate(180deg);
}

.submenu-items {
  margin-left: 20px;
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--transition-slow);
}

.submenu-items:not(.hidden) {
  max-height: 200px;
}

.submenu-items .sub-item {
  padding-left: 8px;
  font-size: 12px;
}

.sidebar-item svg {
  width: 18px;
  height: 18px;
}

.settings-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

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

.about-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 20px;
}

.settings-section-header {
  margin-bottom: 24px;
}

.settings-section-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
}

.settings-section-header p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

.about-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.brand-logo {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(117, 247, 209, 0.15);
  color: var(--accent);
}

.brand-logo svg {
  width: 32px;
  height: 32px;
}

.brand-info h1 {
  margin: 0;
  font-size: 20px;
  color: var(--text);
}

.brand-info p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.about-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.detail-item strong {
  font-size: 13px;
  color: var(--muted);
}

.detail-item span {
  font-size: 13px;
  color: var(--text);
}

.about-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.about-footer p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.password-section {
  margin-bottom: 16px;
}

.recovery-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.recovery-label {
  display: grid;
  gap: 8px;
  color: #d7e3f7;
  font-size: 13px;
  font-weight: 800;
}

.recovery-label input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.restore-strategy {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 201, 91, 0.36);
  border-radius: 18px;
  background: rgba(255, 201, 91, 0.08);
}

.runtime-message {
  color: var(--muted);
}

.runtime-message.error {
  color: #ff6b6b;
}

.desktop {
  position: relative;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 15%, rgba(117, 247, 209, 0.16), transparent 30%),
    radial-gradient(circle at 80% 15%, rgba(141, 124, 255, 0.2), transparent 28%),
    linear-gradient(140deg, #07111f, #10172d 52%, #171631);
}

.top-bar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(8, 15, 31, 0.58);
  backdrop-filter: blur(18px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.top-bar.hidden {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

.top-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
}

.logo-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
}

.window.fullscreen .logo-dot {
  display: none;
}

.status-cluster {
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.user-profile:hover {
  background: rgba(255, 255, 255, 0.08);
}

.user-name {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: rgba(117, 247, 209, 0.1);
  border: 1px solid rgba(117, 247, 209, 0.2);
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.desktop-grid {
  display: grid;
  grid-template-columns: repeat(6, 88px);
  gap: 18px 14px;
  width: max-content;
  margin-top: 28px;
}

.app-icon {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 94px;
  padding: 10px 8px;
  border-radius: 18px;
  background: transparent;
  color: var(--text);
  text-align: center;
}

.app-icon:hover,
.app-icon:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.1);
}

.app-icon-emoji {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
  font-size: 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.app-icon-name {
  max-width: 82px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-icon.trial-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.app-icon.trial-disabled:hover {
  background: transparent;
}

.app-icon.trial-disabled .app-icon-emoji {
  filter: grayscale(100%);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.app-icon.trial-disabled .app-icon-name {
  color: rgba(255, 255, 255, 0.4);
}

.debug-watermark {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
}

.debug-watermark-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  font-size: 48px;
  font-weight: 900;
  font-family: 'Courier New', monospace;
  color: rgba(255, 152, 0, 0.08);
  white-space: nowrap;
  letter-spacing: 8px;
  text-transform: uppercase;
}

.debug-watermark-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  width: 100%;
  height: 100%;
}

.debug-watermark-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: rgba(255, 152, 0, 0.05);
  transform: rotate(-15deg);
}

.debug-watermark-label {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 152, 0, 0.6);
  padding: 6px 12px;
  background: rgba(255, 152, 0, 0.1);
  border: 1px solid rgba(255, 152, 0, 0.2);
  border-radius: 4px;
}

.debug-watermark-code {
  font-size: 16px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: rgba(255, 255, 255, 0.6);
}

.dock {
  position: absolute;
  right: 50%;
  bottom: 18px;
  z-index: 50;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.86), rgba(4, 8, 16, 0.72));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transform: translateX(50%);
  backdrop-filter: blur(22px) saturate(150%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.dock.hidden {
  opacity: 0;
  transform: translateX(50%) translateY(100%);
  pointer-events: none;
}

.dock-button {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-size: 27px;
  transition: transform 160ms ease, background 160ms ease;
}

.dock-button:hover,
.dock-button:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-9px) scale(1.16);
}

.window {
  position: absolute;
  z-index: 20;
  display: flex;
  flex-direction: column;
  min-width: 320px;
  min-height: 240px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  transform-origin: 50% 100%;
  animation: windowOpen var(--transition-normal) cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes windowOpen {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes windowClose {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
}

@keyframes minimizeToDock {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0) translateX(0);
    filter: blur(0);
  }
  50% {
    opacity: 0.8;
    transform: scale(0.5) translateY(100px) translateX(0);
    filter: blur(2px);
  }
  100% {
    opacity: 0;
    transform: scale(0.2) translateY(calc(100vh - 120px)) translateX(0);
    filter: blur(4px);
  }
}

.window.minimizing {
  animation: minimizeToDock 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}

.window.maximized {
  inset: 66px 14px 92px !important;
  width: auto !important;
  height: auto !important;
}

.window.fullscreen {
  inset: 0 !important;
  z-index: 100;
  width: auto !important;
  height: auto !important;
  border-radius: 0;
}

.window.minimized {
  display: none;
}

.window-header {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 52px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  cursor: grab;
  user-select: none;
}

.window.fullscreen .window-header,
.window.maximized .window-header {
  cursor: default;
}

.window-title {
  display: flex;
  gap: 9px;
  align-items: center;
  flex: 1;
  font-size: 14px;
  font-weight: 800;
}

.window-actions {
  display: flex;
  gap: 8px;
}

.window-action {
  display: grid;
  width: 12px;
  height: 12px;
  padding: 0;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: var(--text);
}

.window-action.close {
  background: var(--danger);
}

.window-action.minimize {
  background: #ffc95b;
}

.window-action.zoom {
  background: #65df88;
}

.window-action.maximize {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 12px;
}

.window-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  width: 24px;
  height: 24px;
  cursor: nwse-resize;
  touch-action: none;
}

.resize-handle::before {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 10px;
  height: 10px;
  content: "";
  border-right: 2px solid rgba(255, 255, 255, 0.42);
  border-bottom: 2px solid rgba(255, 255, 255, 0.42);
}

.window.maximized .resize-handle,
.window.fullscreen .resize-handle,
.window.minimized .resize-handle {
  display: none;
}

.panel {
  height: 100%;
  padding: 22px;
  overflow-y: auto;
}

.store-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.store-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.store-tabs {
  display: flex;
  gap: 12px;
}

.store-tab {
  padding: 10px 20px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.store-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.store-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #07101f;
}

.store-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.store-content.hidden {
  display: none;
}

.store-hero {
  background: linear-gradient(135deg, rgba(117, 247, 209, 0.15), rgba(141, 124, 255, 0.15));
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  text-align: center;
}

.store-hero h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
}

.store-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.store-section {
  margin-bottom: 28px;
}

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

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px;
}

.section-header .section-title {
  margin-bottom: 0;
}

.section-count {
  color: var(--muted);
  font-size: 13px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.featured-card {
  background: var(--panel);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--line);
}

.featured-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: rgba(117, 247, 209, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.featured-info h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.featured-category {
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
}

.featured-meta {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.featured-install {
  margin-top: auto;
  padding: 10px 20px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #7fb2ff);
  color: #07101f;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.featured-install:hover {
  opacity: 0.9;
}

.installed-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.store-app-card {
  background: var(--panel);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
}

.store-app-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(141, 124, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.store-app-info {
  flex: 1;
}

.store-app-name {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 500;
}

.store-app-category {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 2px;
}

.store-app-version {
  color: var(--accent);
  font-size: 11px;
  margin: 0;
}

.store-app-actions {
  display: flex;
  gap: 8px;
}

.store-button {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.store-button.primary {
  background: linear-gradient(135deg, var(--accent), #7fb2ff);
  color: #07101f;
}

.store-button.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.store-button.show {
  background: rgba(105, 219, 124, 0.15);
  color: var(--success);
  border: 1px solid rgba(105, 219, 124, 0.3);
}

.store-button.danger {
  background: rgba(255, 111, 145, 0.15);
  color: var(--danger);
  border: 1px solid rgba(255, 111, 145, 0.3);
}

.store-button:hover {
  opacity: 0.85;
}

.hidden-app {
  opacity: 0.7;
  background: rgba(255, 255, 255, 0.02);
}

.hidden-app .opacity {
  opacity: 0.6;
}

.hidden-apps-list {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 12px;
}

.available-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(117, 247, 209, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.update-available {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(117, 247, 209, 0.1);
  border-radius: 12px;
  margin: 16px 0;
}

.available-content {
  flex: 1;
}

.available-content h4 {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--accent);
}

.available-content p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.available-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.available-date {
  font-size: 11px;
  color: var(--muted);
}

.changelog-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}

.history-empty {
  text-align: center;
  padding: 40px;
  color: var(--muted);
}

.history-item .history-type {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(117, 247, 209, 0.15);
  color: var(--accent);
  margin-left: 8px;
}

.settings-section {
  background: var(--panel);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.settings-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px;
}

.upload-area {
  margin-bottom: 16px;
}

.upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.upload-label:hover {
  border-color: var(--accent);
}

.upload-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.upload-label strong {
  font-size: 14px;
  margin-bottom: 6px;
}

.upload-label span {
  color: var(--muted);
  font-size: 12px;
}

.settings-toolbar {
  display: flex;
  gap: 12px;
}

.settings-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.settings-list li {
  padding: 8px 0;
  color: var(--muted);
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}

.settings-list li:last-child {
  border-bottom: none;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px;
}

.update-card {
  background: var(--panel);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--line);
}

.update-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.update-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(117, 247, 209, 0.15), rgba(141, 124, 255, 0.15));
  border-radius: 14px;
  color: var(--accent);
  animation: pulse-glow 2s ease-in-out infinite;
}

.update-card-icon svg {
  color: var(--accent);
}

.update-card-title {
  margin: 0 0 4px;
  font-size: 18px;
  color: var(--text);
}

.update-card-description {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.update-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.update-icon {
  position: relative;
}

.update-ring {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(117, 247, 209, 0.15), rgba(141, 124, 255, 0.15));
  border-radius: 14px;
  color: var(--accent);
  font-size: 24px;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(117, 247, 209, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 50px rgba(117, 247, 209, 0.6);
    transform: scale(1.02);
  }
}

.update-info h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.update-version {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.update-version span {
  color: var(--accent);
  font-weight: 600;
}

.update-status {
  padding: 32px;
  text-align: center;
}

.status-checking {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.progress-ring {
  width: 80px;
  height: 80px;
}

.progress-ring .ring {
  width: 100%;
  height: 100%;
  animation: spin 2s linear infinite;
}

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

.ring-progress {
  animation: progress 1.5s ease-in-out infinite;
}

@keyframes progress {
  0% {
    stroke-dashoffset: 283;
  }
  50% {
    stroke-dashoffset: 70;
  }
  100% {
    stroke-dashoffset: 283;
  }
}

.checking-text {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.checking-dots {
  display: flex;
  gap: 6px;
}

.checking-dots .dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: dot-pulse 1.4s ease-in-out infinite both;
}

.checking-dots .dot:nth-child(1) { animation-delay: 0s; }
.checking-dots .dot:nth-child(2) { animation-delay: 0.2s; }
.checking-dots .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-pulse {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.update-latest {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(105, 219, 124, 0.1);
  border-radius: 12px;
  margin: 20px 0;
}

.latest-icon {
  width: 40px;
  height: 40px;
  background: rgba(105, 219, 124, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
  font-size: 20px;
  font-weight: bold;
}

.latest-content h4 {
  margin: 0 0 4px;
  color: var(--success);
}

.latest-content p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.update-changelog {
  margin-top: 24px;
}

.update-changelog h4 {
  margin: 0 0 16px;
  font-size: 15px;
  color: var(--text);
}

.changelog-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.changelog-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
}

.changelog-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.changelog-icon.new {
  background: rgba(117, 247, 209, 0.15);
  color: var(--accent);
}

.changelog-icon.improved {
  background: rgba(141, 124, 255, 0.15);
  color: #8d7cff;
}

.changelog-icon.fixed {
  background: rgba(255, 111, 145, 0.15);
  color: var(--danger);
}

.changelog-content h5 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text);
}

.changelog-content ul {
  margin: 0;
  padding-left: 20px;
}

.changelog-content li {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 4px;
}

.changelog-content li:last-child {
  margin-bottom: 0;
}

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

.history-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.history-button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent);
}

.history-button svg {
  width: 16px;
  height: 16px;
}

.update-progress {
  padding: 24px;
}

.progress-container {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 20px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.progress-title {
  font-size: 14px;
  font-weight: 500;
}

.progress-text {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
}

.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #8d7cff);
  border-radius: 4px;
  transition: width var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

.progress-time {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.progress-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.progress-step .step-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--muted);
  transition: all 0.3s ease;
}

.progress-step .step-text {
  font-size: 13px;
  color: var(--muted);
  transition: all 0.3s ease;
}

.progress-step.active {
  background: rgba(117, 247, 209, 0.08);
  border-color: rgba(117, 247, 209, 0.2);
}

.progress-step.active .step-icon {
  color: var(--primary);
  animation: spin 1s linear infinite;
}

.progress-step.active .step-text {
  color: var(--primary);
}

.progress-step.completed {
  background: rgba(117, 247, 209, 0.08);
}

.progress-step.completed .step-icon {
  color: var(--primary);
}

.progress-step.completed .step-text {
  color: var(--primary);
}

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

.update-verify {
  padding: 24px;
}

.verify-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.verify-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(117, 247, 209, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.verify-icon svg {
  width: 32px;
  height: 32px;
  animation: pulse 1.5s ease-in-out infinite;
}

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

.verify-content {
  width: 100%;
}

.verify-content h4 {
  margin: 0 0 16px;
  text-align: center;
  font-size: 15px;
}

.verify-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.verify-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  font-size: 13px;
}

.verify-item .verify-status {
  font-size: 16px;
  animation: spin 1s linear infinite;
}

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

/* 设备信息卡片样式 */
.device-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  animation: slideUp var(--transition-slow) forwards;
}

.device-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.device-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(117, 247, 209, 0.15), rgba(141, 124, 255, 0.15));
  border-radius: 16px;
  color: var(--accent);
}

.device-icon svg {
  width: 32px;
  height: 32px;
}

.device-info h3 {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 600;
}

.device-info p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.device-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  transition: all var(--transition-normal);
}

.detail-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(4px);
}

.detail-icon {
  font-size: 20px;
  width: 32px;
  text-align: center;
}

.detail-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-label {
  font-size: 12px;
  color: var(--muted);
}

.detail-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.device-actions {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* HopoOS 关于页面样式 */
.hopo-about-container {
  padding: 16px;
  max-width: 480px;
  margin: 0 auto;
}

.hopo-os-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 600;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 16px 0 8px;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.hopo-os-title:hover {
  transform: scale(1.02);
  opacity: 0.85;
}

.hopo-os-next {
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hopo-os-beta-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  background: linear-gradient(135deg, #ff6b6b, #ffa500);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
  letter-spacing: 0.5px;
  -webkit-text-fill-color: #fff;
  vertical-align: super;
  position: relative;
  top: -8px;
  margin-left: 2px;
  animation: hopo-beta-pulse 2.4s ease-in-out infinite;
}

@keyframes hopo-beta-pulse {
  0%, 100% { box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4); transform: scale(1); }
  50% { box-shadow: 0 2px 12px rgba(255, 165, 0, 0.7); transform: scale(1.05); }
}

.hopo-os-hint {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 24px;
}

.hopo-os-version {
  text-align: center;
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 24px;
  font-weight: 400;
}

.hopo-info-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  animation: slideUp var(--transition-slow) forwards;
}

.hopo-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.hopo-info-row:last-child {
  border-bottom: none;
}

.hopo-info-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

.hopo-info-value {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 400;
}

.hopo-device-card {
  background: rgba(117, 247, 209, 0.06);
  border: 1px solid rgba(117, 247, 209, 0.15);
  border-radius: 16px;
}

.hopo-device-card h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--accent);
}

.hopo-device-spec {
  margin: 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hopo-device-spec .hopo-spec-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

.hopo-device-spec .hopo-spec-label {
  font-size: 0.8rem;
  color: var(--muted);
}

/* 数据管理卡片 */
.hopo-data-card {
  background: rgba(141, 124, 255, 0.06);
  border: 1px solid rgba(141, 124, 255, 0.15);
  border-radius: 16px;
}

.hopo-data-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.hopo-data-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(141, 124, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.hopo-data-card h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text);
}

.hopo-data-card p {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.hopo-data-card-actions {
  display: flex;
  justify-content: flex-end;
}

.hopo-data-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(141, 124, 255, 0.15);
  border: 1px solid rgba(141, 124, 255, 0.3);
  border-radius: 10px;
  color: #8d7cff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hopo-data-action-btn:hover {
  background: rgba(141, 124, 255, 0.25);
  border-color: #8d7cff;
}

/* Google 风格认证页面样式 */
.google-auth-container {
  max-width: 400px;
  margin: 0 auto;
  padding: 24px;
}

.google-auth-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.google-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  display: block;
}

.google-logo svg {
  width: 100%;
  height: 100%;
}

.auth-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 0 8px;
  color: var(--text);
}

.auth-subtitle {
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 24px;
}

.auth-input-group {
  margin-bottom: 16px;
}

.auth-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.auth-input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.auth-input:focus {
  outline: none;
  border-color: #4285F4;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

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

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 24px;
}

.auth-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #4285F4;
}

.auth-checkbox label {
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
}

.auth-button {
  width: 100%;
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 8px;
}

.auth-button:hover {
  transform: translateY(-1px);
}

.auth-button:active {
  transform: translateY(0);
}

.auth-primary {
  background: linear-gradient(135deg, #4285F4, #34A853);
  color: white;
}

.auth-primary:hover {
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.4);
}

.auth-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--line);
}

.auth-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.auth-danger {
  background: rgba(234, 67, 53, 0.1);
  color: #EA4335;
  border: 1px solid rgba(234, 67, 53, 0.3);
}

.auth-danger:hover {
  background: rgba(234, 67, 53, 0.2);
}

/* 登录后个人资料样式 */
.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285F4, #34A853);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.profile-avatar svg {
  width: 28px;
  height: 28px;
}

.profile-info h3 {
  margin: 0 0 4px;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
}

.profile-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.profile-stats {
  display: flex;
  justify-content: space-around;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

.profile-actions {
  display: flex;
  gap: 12px;
}

.profile-actions .auth-button {
  flex: 1;
}

.verify-item.checked .verify-status {
  color: var(--success);
  animation: none;
}

.update-complete {
  padding: 32px;
  text-align: center;
}

.complete-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.complete-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(105, 219, 124, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--success);
  animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.complete-container h4 {
  margin: 0;
  font-size: 18px;
  color: var(--success);
}

.complete-container p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.update-history {
  padding: 16px 0;
}

.history-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.back-button {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.back-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.back-button svg {
  width: 14px;
  height: 14px;
}

.history-header h3 {
  margin: 0;
  font-size: 16px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
}

.history-item {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 16px;
  border-left: 3px solid var(--accent);
}

.history-item.feature {
  border-left-color: #8d7cff;
}

.history-item.security {
  border-left-color: var(--warning);
}

.history-item.major {
  border-left-color: var(--danger);
}

.history-version {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.history-date {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}

.history-changelog {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.update-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.last-check {
  color: var(--muted);
  font-size: 12px;
}

.panel h2 {
  font-size: 26px;
  letter-spacing: -0.04em;
}

.panel p,
.small-muted {
  color: var(--muted);
  line-height: 1.6;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.compact-toolbar {
  margin: 0;
}

.compact-toolbar .secondary-button,
.compact-toolbar .danger-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.info-card,
.app-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
}

.app-card {
  display: grid;
  gap: 12px;
}

.app-card-title {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
}

.hpk-drop {
  display: grid;
  place-items: center;
  min-height: 132px;
  margin: 18px 0;
  padding: 20px;
  border: 1px dashed rgba(117, 247, 209, 0.6);
  border-radius: 20px;
  background: rgba(117, 247, 209, 0.08);
  text-align: center;
  cursor: pointer;
}

.hpk-drop span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.hpk-runtime-shell {
  width: 100%;
  height: 100%;
}

.hopoide-start {
  display: grid;
  height: 100%;
  place-items: center;
  background: radial-gradient(circle at 20% 10%, rgba(47, 111, 235, 0.22), transparent 34%), #1e1e1e;
}

.hopoide-start-card {
  width: min(760px, calc(100% - 32px));
  padding: 32px;
  border: 1px solid #3c3c3c;
  border-radius: 18px;
  background: #252526;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.52);
}

.hopoide-start-card h1 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 46px;
  letter-spacing: -0.06em;
}

.hopoide-shell {
  display: grid;
  grid-template-rows: 30px minmax(0, 1fr) 24px;
  height: 100%;
  overflow: hidden;
  background: #1e1e1e;
  color: #cccccc;
}

.hopoide-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  background: #3c3c3c;
  color: #cccccc;
  font-size: 12px;
  user-select: none;
}

.hopoide-titlebar nav {
  display: flex;
  height: 100%;
}

.hopoide-titlebar button {
  padding: 0 12px;
  background: transparent;
  color: #cccccc;
}

.hopoide-titlebar button:first-child {
  color: #ffffff;
  font-weight: 800;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-content {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  min-width: 320px;
  max-width: 90vw;
}

.modal-content h3 {
  margin: 0 0 8px;
  color: var(--text);
}

.modal-desc {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 16px;
}

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

.modal-cancel {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.folder-picker-list {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.folder-picker-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.folder-picker-section strong {
  padding: 6px 8px;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.folder-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.folder-picker-item:hover {
  background: rgba(117, 247, 209, 0.1);
}

.folder-picker-item small {
  color: var(--muted);
  font-size: 11px;
}

.hopoide-titlebar button:hover {
  background: #505050;
}

.hopoide-titlebar span {
  padding-right: 10px;
  color: #aaaaaa;
}

.hopoide-workbench {
  display: grid;
  grid-template-columns: 48px 250px minmax(0, 1fr) 300px;
  grid-template-rows: minmax(0, 1fr) 170px;
  min-height: 0;
}

.hopoide-workbench.sidebar-collapsed {
  grid-template-columns: 48px minmax(0, 1fr) 300px;
}

.hopoide-workbench.sidebar-collapsed .hopoide-sidebar {
  display: none;
}

.hopoide-activity {
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  padding-top: 12px;
  border-right: 1px solid #252526;
  background: #333333;
}

.hopoide-activity button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: transparent;
  color: #c5c5c5;
  font-size: 18px;
}

.hopoide-activity button:hover {
  background: #444444;
}

.hopoide-sidebar {
  min-width: 0;
  border-right: 1px solid #1b1b1b;
  background: #252526;
}

.hopoide-side-title {
  min-height: 35px;
  padding: 10px 14px;
  color: #bbbbbb;
  font-size: 11px;
  text-transform: uppercase;
}

.hopoide-side-title small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #858585;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.hopoide-tree {
  display: grid;
  gap: 2px;
  padding: 4px 8px;
}

.hopoide-tree button {
  display: flex;
  align-items: center;
  height: 28px;
  padding: 0 8px;
  border-radius: 5px;
  background: transparent;
  color: #cccccc;
  font-size: 13px;
  text-align: left;
}

.hopoide-tree button:hover,
.hopoide-tree button.active {
  background: #37373d;
}

.hopoide-dev-folders {
  padding: 8px 0;
  border-bottom: 1px solid #333333;
  margin-bottom: 8px;
}

.hopoide-folder-section {
  padding: 4px 8px;
  font-size: 11px;
  color: #858585;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hopoide-folder-item {
  padding-left: 20px !important;
  color: #a0a0a0 !important;
}

.hopoide-folder-group {
  margin: 4px 0;
}

.hopoide-folder-header {
  padding-left: 20px !important;
  color: #d0d0d0 !important;
}

.hopoide-folder-content {
  display: none;
  padding-left: 16px;
}

.hopoide-folder-content.expanded {
  display: block;
}

.hopoide-folder-content button {
  padding-left: 24px !important;
}

.hopoide-main {
  display: grid;
  grid-template-rows: 35px minmax(0, 1fr);
  min-width: 0;
  background: #1e1e1e;
}

.hopoide-tabs {
  display: flex;
  overflow: auto;
  border-bottom: 1px solid #1b1b1b;
  background: #252526;
}

.hopoide-tab {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 130px;
  max-width: 220px;
  height: 35px;
  padding: 0 10px;
  border-right: 1px solid #1b1b1b;
  border-radius: 0;
  background: #2d2d2d;
  color: #969696;
  font-size: 13px;
}

.hopoide-tab.active {
  background: #1e1e1e;
  color: #ffffff;
}

.hopoide-tab strong {
  margin-left: auto;
  padding: 0 5px;
  border-radius: 4px;
}

.hopoide-tab strong:hover {
  background: #444444;
}

.hopoide-editor {
  width: 100%;
  height: 100%;
  padding: 14px;
  border: 0;
  outline: 0;
  resize: none;
  background: #1e1e1e;
  color: #d4d4d4;
  font: 14px/1.6 Consolas, "SFMono-Regular", monospace;
}

.hopoide-ai {
  display: grid;
  grid-template-rows: 35px minmax(0, 1fr) 82px 42px;
  min-width: 0;
  border-left: 1px solid #1b1b1b;
  background: #252526;
}

.hopoide-ai-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid #333333;
}

.hopoide-ai-header h3 {
  margin: 0;
  color: #cccccc;
  font-size: 12px;
  text-transform: uppercase;
}

.hopoide-ai-actions {
  display: flex;
  gap: 4px;
}

.hopoide-chat-btn {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 4px;
  background: #3c3c3c;
  color: #cccccc;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hopoide-chat-btn:hover {
  background: #4c4c4c;
}

.hopoide-chat {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding: 10px;
}

.hopoide-message {
  padding: 10px;
  border-radius: 10px;
  background: #2d2d30;
  color: #d4d4d4;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.hopoide-message.user {
  background: #094771;
}

.hopoide-ai textarea {
  margin: 10px;
  border: 1px solid #3c3c3c;
  border-radius: 8px;
  background: #1e1e1e;
  color: #dddddd;
  resize: none;
}

.hopoide-ai .primary-button {
  margin: 0 10px 10px;
}

.hopoide-terminal {
  grid-column: 2 / 5;
  display: grid;
  grid-template-rows: 28px minmax(0, 1fr) 30px;
  border-top: 1px solid #303030;
  background: #181818;
}

.hopoide-workbench.sidebar-collapsed .hopoide-terminal {
  grid-column: 2 / 4;
}

.hopoide-workbench.terminal-collapsed {
  grid-template-rows: minmax(0, 1fr) 28px;
}

.hopoide-term-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: #1f1f1f;
  color: #cccccc;
  font-size: 12px;
}

.hopoide-term-head .secondary-button {
  min-height: 22px;
  padding: 0 10px;
}

.hopoide-terminal pre {
  margin: 0;
  overflow: auto;
  padding: 8px 10px;
  color: #d7f7d0;
  font: 13px/1.5 Consolas, monospace;
  white-space: pre-wrap;
}

.hopoide-terminal form {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 10px;
  color: #d7f7d0;
  font: 13px Consolas, monospace;
}

.hopoide-terminal input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #d7f7d0;
  font: inherit;
}

.hopoide-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: #007acc;
  color: #ffffff;
  font-size: 12px;
}

.hopoide-classic {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  height: 100%;
  background: #1e1e1e;
  color: #cccccc;
}

.hopoide-classic aside {
  padding: 18px;
  border-right: 1px solid #333333;
  background: #252526;
}

.hopoide-classic main {
  overflow: auto;
  padding: 18px;
}

.studio-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  height: 100%;
}

.studio-sidebar {
  align-self: start;
}

.studio-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.form-grid,
.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid label,
.permission-grid label {
  display: grid;
  gap: 7px;
  color: #d7e3f7;
  font-size: 13px;
  font-weight: 800;
}

.form-grid input,
.form-grid select,
.browser-card input,
.system-files-actions input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.permission-grid label {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
}

.editor-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.editor-title h3,
.studio-sidebar h2,
.app-management h3 {
  margin: 0;
}

.editor-title span {
  color: var(--muted);
  font-size: 12px;
}

.code-editor {
  min-height: 320px;
}

.raw-hpk-details summary {
  cursor: pointer;
  font-weight: 800;
}

.ai-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 14px;
}

.ai-inputs,
.ai-config {
  display: grid;
  gap: 12px;
}

.ai-inputs label,
.ai-config label {
  display: grid;
  gap: 7px;
  color: #d7e3f7;
  font-size: 13px;
  font-weight: 800;
}

.prompt-area,
.mini-editor,
.ai-config input,
.ai-config select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.prompt-area {
  min-height: 120px;
  padding: 12px;
  resize: vertical;
}

.mini-editor {
  min-height: 180px;
}

.ai-config input,
.ai-config select {
  padding: 12px;
}

.system-files-app {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

.system-files-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.system-files-sidebar button {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.system-files-sidebar button.active,
.system-files-sidebar button:hover {
  background: rgba(117, 247, 209, 0.14);
}

.system-sidebar-divider {
  height: 1px;
  background: var(--line);
  margin: 8px 0;
}

.system-sidebar-section {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  padding: 8px 12px 4px;
  letter-spacing: 0.05em;
}

.system-files-main {
  min-width: 0;
  padding: 18px;
  overflow: auto;
}

.system-files-toolbar,
.system-files-actions,
.system-crumbs {
  display: flex;
  gap: 10px;
  align-items: center;
}

.system-files-toolbar {
  justify-content: space-between;
  flex-wrap: wrap;
}

.system-files-toolbar p,
.system-files-toolbar h1 {
  margin: 0;
}

.system-files-toolbar p,
.system-crumbs {
  color: var(--muted);
  font-size: 13px;
}

.system-files-toolbar h1 {
  font-size: 28px;
  letter-spacing: -0.04em;
}

.system-files-actions {
  flex-wrap: wrap;
}

.system-files-actions input {
  width: 180px;
  padding: 10px 12px;
}

.system-files-actions button,
.system-preview button,
.system-crumbs button {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.system-crumbs {
  margin: 14px 0;
}

.system-files-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
}

.system-file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.system-file-list {
  display: grid;
  gap: 8px;
}

.system-file {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.system-file:hover,
.system-file.selected {
  border-color: rgba(117, 247, 209, 0.7);
  background: rgba(117, 247, 209, 0.12);
}

.system-file span,
.system-preview-icon {
  font-size: 30px;
}

.system-file small,
.system-preview p,
.system-preview dd {
  color: var(--muted);
}

.system-file-list .system-file {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
}

.system-preview {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
}

.system-preview dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  font-size: 13px;
}

.system-preview dt {
  color: #d7e3f7;
  font-weight: 800;
}

.file-text-view {
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  white-space: pre-wrap;
}

.file-open-view img {
  display: block;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 18px;
}

.browser-card {
  display: flex;
  gap: 10px;
  margin: 14px 0;
}

.browser-frame {
  width: 100%;
  height: calc(100% - 80px);
  min-height: 300px;
  border: none;
  border-radius: 0;
  background: white;
}

.docs-hero {
  margin-bottom: 18px;
}

.docs-hero h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.docs-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
}

.docs-nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.docs-nav button {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  text-align: left;
}

.docs-nav button.active,
.docs-nav button:hover {
  border-color: rgba(117, 247, 209, 0.68);
  background: rgba(117, 247, 209, 0.12);
}

.docs-nav span,
.docs-article h3 {
  color: var(--muted);
  font-size: 12px;
}

.docs-article {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
}

.docs-article h2 {
  margin: 0 0 6px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.docs-article h3 {
  margin: 0 0 18px;
  font-size: 15px;
}

.docs-article h4 {
  margin: 22px 0 8px;
}

.docs-article p {
  color: var(--muted);
  line-height: 1.85;
}

.docs-view pre,
.ua-card pre {
  overflow: auto;
  padding: 16px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
}

.monitor-view h3 {
  margin: 22px 0 12px;
}

.monitor-grid .info-card p {
  word-break: break-word;
}

.ua-card {
  margin-top: 14px;
}

.ua-card summary {
  cursor: pointer;
  font-weight: 800;
}

.settings-app-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.settings-app-item p {
  margin: 6px 0 10px;
}

.app-management {
  margin-top: 14px;
}

.permission-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.permission-badge {
  display: inline-flex;
  padding: 4px 8px;
  border: 1px solid rgba(117, 247, 209, 0.32);
  border-radius: 999px;
  background: rgba(117, 247, 209, 0.1);
  color: #d9fff4;
  font-size: 12px;
}

.permission-badge.muted {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.terminal {
  height: 100%;
  padding: 18px;
  background: #05070c;
  color: #c8facc;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
}

.terminal-output {
  min-height: calc(100% - 44px);
  white-space: pre-wrap;
}

.terminal-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.terminal input,
textarea.code-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  outline: none;
}

.terminal input {
  flex: 1;
  padding: 9px 10px;
  border: 0;
  background: transparent;
  font-family: inherit;
}

.announcements-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.announcements-header {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.announcements-header h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
}

.announcements-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
}

.announcements-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.announcement-item {
  padding: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.announcement-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.announcement-header h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.announcement-date {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.announcement-content {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
}

.announcement-image {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  margin-bottom: 12px;
  object-fit: contain;
}

.announcement-attachments {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.announcement-attachment {
  padding: 6px 12px;
  background: rgba(117, 247, 209, 0.1);
  border: 1px solid rgba(117, 247, 209, 0.2);
  border-radius: 6px;
  font-size: 12px;
  color: rgba(117, 247, 209, 0.8);
}

.announcements-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.announcements-empty p {
  margin: 8px 0;
  color: var(--muted);
  font-size: 14px;
}

.empty-hint {
  font-size: 12px !important;
  opacity: 0.6;
}

.admin-announcements-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-announcement-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}

.admin-announcement-header {
  margin-bottom: 12px;
}

.admin-announcement-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.admin-announcement-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
}

.admin-announcement-author {
  color: rgba(117, 247, 209, 0.8);
}

.admin-announcement-content {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
}

.admin-announcement-image {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  margin-bottom: 12px;
  object-fit: contain;
}

.admin-announcement-text {
  white-space: pre-wrap;
}

.admin-announcement-attachments {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-announcement-attachment {
  padding: 6px 12px;
  background: rgba(117, 247, 209, 0.1);
  border: 1px solid rgba(117, 247, 209, 0.2);
  border-radius: 6px;
  font-size: 12px;
  color: rgba(117, 247, 209, 0.8);
}

.admin-announcement-actions {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.admin-textarea-large {
  width: 100%;
  min-height: 150px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 14px;
  resize: vertical;
}

.admin-textarea-large:focus {
  outline: none;
  border-color: var(--accent);
}

.admin-image-upload,
.admin-file-upload {
  margin-top: 8px;
}

.admin-image-preview {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-image-preview img {
  max-width: 150px;
  max-height: 100px;
  border-radius: 8px;
  object-fit: contain;
}

.admin-image-remove {
  padding: 6px 12px;
  background: rgba(255, 111, 145, 0.1);
  border: 1px solid rgba(255, 111, 145, 0.3);
  border-radius: 6px;
  color: var(--danger);
  font-size: 12px;
  cursor: pointer;
}

.admin-image-remove:hover {
  background: rgba(255, 111, 145, 0.2);
}

textarea.code-input {
  min-height: 220px;
  padding: 12px;
  resize: vertical;
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, monospace;
}

.hpk-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: white;
}

.context-menu {
  position: fixed;
  z-index: 200;
  min-width: 178px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(11, 16, 34, 0.96);
  box-shadow: var(--shadow);
}

.ctx-title {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.context-menu button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.context-menu button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.toast {
  position: absolute;
  top: 84px;
  right: 24px;
  z-index: 250;
  max-width: min(360px, calc(100vw - 48px));
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(11, 16, 34, 0.92);
  color: var(--text);
  box-shadow: var(--shadow);
}

@media (max-width: 760px) {
  .activation-screen {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .recovery-options {
    grid-template-columns: 1fr;
  }

  .desktop {
    padding: 12px;
  }

  .status-cluster span:not(:last-child) {
    display: none;
  }

  .desktop-grid {
    grid-template-columns: repeat(3, 88px);
  }

  .window,
  .window.maximized {
    inset: 64px 8px 92px !important;
    width: auto !important;
    height: auto !important;
    min-width: 0;
  }

  .dock {
    max-width: calc(100vw - 24px);
    overflow-x: auto;
  }

  .studio-layout,
  .ai-layout,
  .docs-layout,
  .system-files-app,
  .system-files-content {
    grid-template-columns: 1fr;
  }

  .system-files-sidebar {
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .form-grid,
  .permission-grid {
    grid-template-columns: 1fr;
  }
}

/* 光波散开动画 */
.lightwave-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(102, 126, 234, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightwave-overlay.active {
  opacity: 1;
}

.lightwave-ring {
  position: absolute;
  width: 100px;
  height: 100px;
  border: 3px solid #667eea;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0);
}

.lightwave-overlay.active .lightwave-ring {
  animation: lightwave-expand 1.2s ease-out forwards;
}

.lightwave-ring.delay-1 {
  animation-delay: 0.2s;
  border-color: #764ba2;
}

.lightwave-ring.delay-2 {
  animation-delay: 0.4s;
  border-color: #f093fb;
}

.lightwave-icon {
  width: 64px;
  height: 64px;
  color: white;
  z-index: 10;
  opacity: 0;
  transform: scale(0);
}

.lightwave-overlay.active .lightwave-icon {
  animation: icon-appear 0.5s ease-out 0.3s forwards;
}

@keyframes lightwave-expand {
  0% {
    opacity: 1;
    transform: scale(0);
  }
  100% {
    opacity: 0;
    transform: scale(8);
  }
}

@keyframes icon-appear {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 流畅动画工具类 */
.bounce-in {
  animation: bounceIn var(--transition-bounce) forwards;
}

.rotate-in {
  animation: rotateIn var(--transition-slow) forwards;
}

.slide-in-right {
  animation: slideInRight var(--transition-slow) forwards;
}

.slide-in-left {
  animation: slideInLeft var(--transition-slow) forwards;
}

.zoom-in {
  animation: zoomIn var(--transition-normal) forwards;
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

.float {
  animation: float 3s ease-in-out infinite;
}

.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: shimmerMove 2s infinite;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-180deg);
  }
  to {
    opacity: 1;
    transform: rotate(0);
  }
}

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

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

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shimmerMove {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* 按钮涟漪效果 */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple:active::before {
  width: 300px;
  height: 300px;
}

/* 卡片悬停效果 */
.card-hover {
  transition: all var(--transition-normal);
  transform: translateY(0);
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* 输入框焦点效果 */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(117, 247, 209, 0.1);
  transition: all var(--transition-fast);
}

/* 加载旋转器 */
.spinner {
  animation: spin 1s linear infinite;
}

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

/* ===== 管理员后台样式 ===== */
.admin-app {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 10%, rgba(117, 247, 209, 0.18), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(141, 124, 255, 0.22), transparent 32%),
    linear-gradient(135deg, #070d1c, #0b1730 52%, #11112e);
}

.admin-login-screen {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.admin-login-card {
  width: min(420px, 100%);
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(8, 16, 31, 0.8);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.admin-login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.admin-login-logo svg {
  width: 64px;
  height: 64px;
}

.admin-login-card h1 {
  text-align: center;
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.admin-login-hint {
  text-align: center;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 14px;
}

.admin-login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-login-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.admin-login-form input {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 15px;
}

.admin-login-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(117, 247, 209, 0.15);
}

.admin-login-button {
  margin-top: 8px;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a1628;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.admin-login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(117, 247, 209, 0.3);
}

.admin-login-error {
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 111, 145, 0.15);
  color: var(--danger);
  font-size: 13px;
  text-align: center;
}

.admin-login-switch {
  margin: 16px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.admin-login-switch a {
  color: var(--primary);
  text-decoration: none;
}

.admin-login-switch a:hover {
  text-decoration: underline;
}

.admin-totp-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
}

.admin-totp-status-label {
  color: var(--muted);
  font-size: 14px;
}

.admin-totp-status-value {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.admin-totp-status-value.enabled {
  color: #4caf50;
  background: rgba(76, 175, 80, 0.15);
}

.admin-totp-status-value.disabled {
  color: #ff9800;
  background: rgba(255, 152, 0, 0.15);
}

.admin-totp-section {
  margin-top: 12px;
}

.admin-totp-hint {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.admin-totp-qr-section {
  text-align: center;
  margin-bottom: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
}

.admin-totp-qrcode {
  display: flex;
  justify-content: center;
  margin: 12px 0;
}

.admin-totp-qrcode img {
  width: 200px;
  height: 200px;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.admin-totp-secret {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  flex-wrap: wrap;
}

.admin-totp-secret code {
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 8px;
  border-radius: 6px;
  font-family: monospace;
  color: var(--text);
  font-size: 12px;
}

.admin-token-copy {
  background: rgba(117, 247, 209, 0.15);
  color: var(--primary);
  border: none;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.admin-token-copy:hover {
  background: rgba(117, 247, 209, 0.25);
}

.admin-totp-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.admin-totp-actions button {
  flex: 1;
}

.admin-main {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.admin-header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 18, 38, 0.8);
}

.admin-header-left {
  display: flex;
  align-items: center;
}

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-header-right span {
  color: var(--muted);
  font-size: 14px;
}

.admin-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-logo svg {
  width: 32px;
  height: 32px;
}

.admin-logo span {
  font-size: 18px;
  font-weight: 600;
}

.admin-logout-btn {
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.admin-logout-btn:hover {
  background: rgba(255, 111, 145, 0.15);
  color: var(--danger);
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px 16px;
  border-right: 1px solid var(--line);
  background: rgba(12, 18, 38, 0.6);
  overflow-y: auto;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
}

.admin-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.admin-nav-item.active {
  background: rgba(117, 247, 209, 0.15);
  color: var(--accent);
}

.admin-nav-item svg {
  width: 20px;
  height: 20px;
}

.admin-content {
  padding: 24px;
  overflow: auto;
}

.admin-section {
  margin-bottom: 32px;
}

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

.admin-section-header h2 {
  margin: 0;
  font-size: 22px;
}

.admin-section-header span {
  color: var(--muted);
  font-size: 14px;
}

.admin-add-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a1628;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.admin-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  border: 1px dashed var(--line);
  border-radius: 20px;
}

.admin-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.admin-empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.admin-users-grid,
.admin-apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.admin-user-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
}

.admin-user-avatar {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(117, 247, 209, 0.15);
  font-size: 28px;
  margin-bottom: 16px;
  overflow: hidden;
}

.admin-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-user-info {
  margin-bottom: 16px;
}

.admin-user-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.admin-user-password,
.admin-user-secondary-password {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
}

.admin-password-hidden {
  font-family: monospace;
  color: var(--muted);
}

.admin-show-password-btn,
.admin-show-secondary-btn {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
}

.admin-user-actions,
.admin-app-actions {
  display: flex;
  gap: 8px;
}

.admin-action-btn {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.admin-action-btn.backup {
  background: rgba(117, 247, 209, 0.15);
  color: var(--accent);
}

.admin-action-btn.backup:hover {
  background: rgba(117, 247, 209, 0.25);
}

.admin-action-btn.edit {
  background: rgba(141, 124, 255, 0.15);
  color: var(--accent-2);
}

.admin-action-btn.edit:hover {
  background: rgba(141, 124, 255, 0.25);
}

.admin-action-btn.delete {
  background: rgba(255, 111, 145, 0.15);
  color: var(--danger);
}

.admin-action-btn.delete:hover {
  background: rgba(255, 111, 145, 0.25);
}

.admin-apps-upload {
  margin-bottom: 24px;
}

.admin-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  border: 2px dashed var(--line);
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.admin-upload-label:hover {
  border-color: var(--accent);
  background: rgba(117, 247, 209, 0.08);
}

.admin-upload-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.admin-upload-label strong {
  margin-bottom: 8px;
  font-size: 15px;
}

.admin-upload-label span {
  color: var(--muted);
  font-size: 13px;
}

.admin-apps-manual {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 24px;
}

.admin-apps-manual h3 {
  margin: 0 0 20px;
  font-size: 16px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.admin-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.admin-form-grid input {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 14px;
}

.admin-html-editor {
  width: 100%;
  min-height: 200px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-family: monospace;
  font-size: 13px;
  resize: vertical;
  margin-bottom: 16px;
}

.admin-build-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a1628;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.admin-app-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.admin-app-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.admin-app-info {
  margin-bottom: 16px;
}

.admin-app-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.admin-app-package {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.admin-app-meta {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.admin-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  width: 100%;
}

.admin-settings-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
}

.admin-settings-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.admin-settings-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.admin-settings-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-settings-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.admin-settings-form input {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 14px;
}

.admin-settings-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a1628;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.admin-tokens-list {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.admin-tokens-list h4 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
}

.admin-token-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 8px;
}

.admin-token-value {
  font-family: monospace;
  font-size: 13px;
  color: var(--accent);
}

.admin-token-meta {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.admin-token-meta .used {
  color: var(--danger);
}

.admin-token-meta .unused {
  color: var(--ok);
}

.admin-token-delete {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 111, 145, 0.15);
  color: var(--danger);
  font-size: 12px;
  cursor: pointer;
}

.admin-settings-card.danger-card {
  border-color: rgba(255, 111, 145, 0.3);
  background: rgba(255, 111, 145, 0.05);
}

.admin-danger-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 111, 145, 0.2);
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.admin-token-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.admin-token-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.admin-token-modal-content {
  position: relative;
  width: min(500px, 100%);
  max-height: 80vh;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(12, 18, 38, 0.95);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.admin-token-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.admin-token-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.admin-token-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
}

.admin-token-modal-close:hover {
  background: rgba(255, 111, 145, 0.15);
  color: var(--danger);
}

.admin-token-modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(80vh - 80px);
}

.admin-token-new-token {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(117, 247, 209, 0.08);
  margin-bottom: 24px;
}

.admin-token-label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.admin-token-code {
  font-family: monospace;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  word-break: break-all;
  padding: 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  margin-bottom: 12px;
}

.admin-token-copy-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a1628;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.admin-token-history h4 {
  margin: 0 0 16px;
  font-size: 15px;
  color: var(--muted);
}

.admin-token-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 10px;
}

.admin-token-history-value {
  flex: 1;
  font-family: monospace;
  font-size: 13px;
  color: var(--text);
  word-break: break-all;
}

.admin-token-history-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.admin-token-history-copy {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
}

.admin-token-history-copy:hover {
  background: rgba(117, 247, 209, 0.15);
}

.admin-token-no-history {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 24px;
}

.portal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.portal-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.portal-tab:hover {
  color: var(--text);
}

.portal-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a1628;
}

.portal-token-hint {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.admin-search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.admin-search-bar input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 14px;
}

.admin-search-bar input:focus {
  outline: none;
  border-color: var(--accent);
}

.admin-search-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a1628;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.admin-search-clear {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}

.admin-search-clear:hover {
  color: var(--text);
}

.admin-user-id {
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-family: monospace;
}

.admin-token-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(117, 247, 209, 0.08);
}

.admin-token-user-avatar {
  font-size: 16px;
}

.admin-token-user-info {
  font-size: 13px;
  color: var(--accent);
}

.token-used {
  opacity: 0.7;
}

.admin-version-card {
  grid-column: 1 / -1;
}

.admin-version-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.admin-version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-version-row span {
  color: var(--muted);
  font-size: 13px;
}

.admin-version-row input,
.admin-version-row select {
  width: 80px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 14px;
}

.admin-version-row input:focus,
.admin-version-row select:focus {
  outline: none;
  border-color: var(--accent);
}

.admin-version-row-beta {
  grid-column: 1 / -1;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.08), rgba(255, 165, 0, 0.08));
  border: 1px solid rgba(255, 107, 107, 0.25);
  border-radius: 10px;
}

.admin-version-row-beta span:first-child {
  color: var(--text);
  font-weight: 600;
}

.admin-beta-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.admin-beta-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.admin-beta-slider {
  position: relative;
  width: 40px;
  height: 22px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  transition: background 0.2s ease;
}

.admin-beta-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.admin-beta-switch input:checked + .admin-beta-slider {
  background: linear-gradient(135deg, #ff6b6b, #ffa500);
}

.admin-beta-switch input:checked + .admin-beta-slider::before {
  transform: translateX(18px);
}

.admin-beta-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.admin-version-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.admin-publish-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff6f91, #ffd666);
  color: #0a1628;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.admin-publish-btn:hover {
  opacity: 0.9;
}

.admin-version-preview {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: rgba(117, 247, 209, 0.08);
}

.admin-version-preview.hidden {
  display: none;
}

.admin-version-preview-label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.admin-version-preview-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.admin-version-preview-full {
  color: var(--text);
  font-size: 14px;
}

.admin-version-history {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.admin-version-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.admin-version-history-version {
  font-weight: 600;
  color: var(--accent);
}

.admin-version-history-date {
  color: var(--muted);
  font-size: 13px;
}

.admin-version-history-type {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(117, 247, 209, 0.15);
  color: var(--accent);
  font-size: 12px;
}

.admin-empty-text {
  color: var(--muted);
  font-size: 14px;
  margin-top: 12px;
}

.admin-settings-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 14px;
  resize: vertical;
  min-height: 100px;
}

.admin-settings-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.admin-token-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.admin-history-btn {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-token-history {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.admin-token-history.hidden {
  display: none;
}

.admin-token-history h4 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
}

.admin-tokens-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.admin-token-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.admin-token-value {
  font-family: monospace;
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 8px;
  word-break: break-all;
}

.admin-token-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
}

.admin-token-used {
  color: #6fdb7c;
}

.admin-token-unused {
  color: var(--muted);
}

.admin-token-date {
  color: var(--muted);
}

.admin-user-status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  margin-left: 8px;
}

.admin-user-status.activated {
  background: rgba(105, 219, 124, 0.2);
  color: #6fdb7c;
}

.admin-user-status.inactive {
  background: rgba(255, 107, 145, 0.2);
  color: #ff6f91;
}

.portal-avatar-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.portal-avatar-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(117, 247, 209, 0.1);
  border: 2px solid rgba(117, 247, 209, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.portal-avatar-preview:hover {
  border-color: var(--accent);
}

.portal-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-avatar-btn {
  padding: 8px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.portal-avatar-btn:hover {
  background: rgba(117, 247, 209, 0.15);
  border-color: var(--accent);
}

.portal-avatar-hint {
  color: var(--muted);
  font-size: 11px;
}

.auth-input-group {
  position: relative;
}

.auth-input-group .auth-avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(117, 247, 209, 0.1);
  border: 2px solid rgba(117, 247, 209, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-input-group .auth-avatar-preview:hover {
  border-color: var(--accent);
}

.auth-input-group .auth-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-input-group .auth-avatar-btn {
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-input-group .auth-avatar-btn:hover {
  background: rgba(117, 247, 209, 0.15);
  border-color: var(--accent);
}

.auth-avatar-group {
  margin-bottom: 16px;
}

.auth-avatar-edit {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.auth-avatar-edit .auth-avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(117, 247, 209, 0.1);
  border: 2px solid rgba(117, 247, 209, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-avatar-edit .auth-avatar-preview:hover {
  border-color: var(--accent);
}

.auth-avatar-edit .auth-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-avatar-edit .auth-avatar-btn {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-avatar-edit .auth-avatar-btn:hover {
  background: rgba(117, 247, 209, 0.15);
  border-color: var(--accent);
}

/* ===== 门户页面样式 ===== */
.portal-app {
  width: 100%;
  height: 100%;
}

.portal-screen {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(117, 247, 209, 0.18), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(141, 124, 255, 0.22), transparent 32%),
    linear-gradient(135deg, #070d1c, #0b1730 52%, #11112e);
  background-size: cover;
  background-position: center;
  overflow-y: auto;
}

.portal-card {
  width: min(460px, 100%);
  max-height: calc(100vh - 48px);
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(8, 16, 31, 0.85);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  overflow-y: auto;
}

.portal-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.portal-logo svg {
  width: 56px;
  height: 56px;
}

.portal-card h1 {
  text-align: center;
  margin: 0 0 8px;
  font-size: 32px;
  letter-spacing: -0.04em;
}

.portal-subtitle {
  text-align: center;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 14px;
}

.portal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.portal-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.portal-form input {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 15px;
}

.portal-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(117, 247, 209, 0.15);
}

.portal-password-hint {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  color: var(--muted);
}

.portal-password-hint ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.portal-password-hint li {
  margin-bottom: 4px;
}

.portal-error {
  margin: 8px 0 0;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 111, 145, 0.15);
  color: var(--danger);
  font-size: 13px;
  text-align: center;
}

.portal-login-btn,
.portal-register-btn {
  margin-top: 8px;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a1628;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.portal-login-btn:hover,
.portal-register-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(117, 247, 209, 0.3);
}

.portal-divider {
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.portal-divider::before,
.portal-divider::after {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.portal-divider span {
  font-size: 13px;
  color: var(--muted);
}

.portal-trial-btn {
  margin-top: 8px;
  padding: 14px;
  border: 1px solid var(--accent);
  border-radius: 14px;
  background: rgba(117, 247, 209, 0.1);
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.portal-trial-btn:hover {
  background: rgba(117, 247, 209, 0.2);
  box-shadow: 0 0 20px rgba(117, 247, 209, 0.2);
}

.portal-links {
  margin-top: 20px;
  text-align: center;
}

.portal-links a {
  color: var(--accent);
  font-size: 14px;
  text-decoration: none;
}

.portal-links a:hover {
  text-decoration: underline;
}

.portal-trial-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.portal-trial-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 152, 0, 0.15);
  border: 2px solid rgba(255, 152, 0, 0.4);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-trial-btn:hover {
  background: rgba(255, 152, 0, 0.25);
  border-color: rgba(255, 152, 0, 0.6);
  transform: scale(1.05);
}

.portal-trial-btn:active {
  transform: scale(0.95);
}

.portal-trial-icon {
  font-size: 24px;
  font-weight: 700;
  color: rgba(255, 152, 0, 0.9);
}

.portal-trial-label {
  font-size: 12px;
  color: rgba(255, 152, 0, 0.8);
}

.portal-trial-input-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
}

.portal-trial-input-modal.hidden {
  display: none;
}

.portal-trial-modal-content {
  width: min(420px, 90vw);
  padding: 28px;
  background: var(--panel, #1a1a2e);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.portal-trial-modal-content h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text, #fff);
}

.portal-trial-modal-content p {
  margin: 0;
  font-size: 13px;
  color: var(--muted, rgba(255, 255, 255, 0.6));
}

.portal-trial-modal-content input {
  padding: 12px 14px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.1));
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text, #fff);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.portal-trial-modal-content input:focus {
  border-color: var(--accent, #75f7d1);
  box-shadow: 0 0 0 3px rgba(117, 247, 209, 0.15);
}

.portal-trial-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.portal-trial-cancel-btn,
.portal-trial-confirm-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.portal-trial-cancel-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text, #fff);
}

.portal-trial-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.portal-trial-confirm-btn {
  background: linear-gradient(135deg, var(--accent, #75f7d1), var(--accent-2, #5de5bb));
  color: #0a1628;
}

.portal-trial-confirm-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(117, 247, 209, 0.3);
}

.portal-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.portal-footer span {
  color: var(--muted);
  font-size: 12px;
}

.portal-success-card {
  width: min(420px, 100%);
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(8, 16, 31, 0.85);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  text-align: center;
}

.portal-success-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.portal-success-card h1 {
  margin: 0 0 12px;
  font-size: 28px;
}

.portal-success-card p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
}

.portal-countdown {
  padding: 16px;
  border-radius: 12px;
  background: rgba(117, 247, 209, 0.1);
  color: var(--accent);
  font-size: 14px;
}

/* ===== 管理员响应式布局 ===== */
@media (max-width: 1024px) {
  .admin-settings-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .admin-settings-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .admin-settings-card {
    padding: 20px;
  }

  .admin-version-card {
    grid-column: 1;
  }

  .admin-version-info {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-version-actions {
    flex-direction: column;
  }

  .admin-version-actions button {
    width: 100%;
  }

  .admin-token-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-history-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .admin-settings-grid {
    grid-template-columns: 1fr;
  }

  .admin-version-info {
    grid-template-columns: 1fr;
  }

  .admin-version-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .admin-version-row input,
  .admin-version-row select {
    width: 100%;
  }
}

/* 添加用户按钮 */
.admin-add-user-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: rgba(117, 247, 209, 0.15);
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.admin-add-user-btn:hover {
  background: rgba(117, 247, 209, 0.25);
}

/* 模态框通用样式 */
.admin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.admin-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.admin-modal {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  width: 90%;
  max-width: 480px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  transition: transform 0.3s;
}

.admin-modal-overlay.active .admin-modal {
  transform: scale(1);
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.admin-modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--primary);
}

.admin-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-modal-close:hover {
  background: rgba(255, 111, 145, 0.15);
  color: var(--danger);
}

.admin-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.admin-form-group {
  margin-bottom: 16px;
}

.admin-form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--muted);
}

.admin-form-group input,
.admin-form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s;
}

.admin-form-group input:focus,
.admin-form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

.admin-form-group select {
  cursor: pointer;
}

.admin-form-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 8px;
}

.admin-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
}

.admin-modal-cancel {
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.05);
}

.admin-modal-confirm {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-modal-confirm:hover {
  opacity: 0.9;
}

/* 激活/停用按钮 */
.admin-action-btn.activate {
  background: rgba(117, 247, 209, 0.15);
  color: var(--primary);
}

.admin-action-btn.activate:hover {
  background: rgba(117, 247, 209, 0.25);
}

.admin-action-btn.deactivate {
  background: rgba(255, 152, 0, 0.15);
  color: #ff9800;
}

.admin-action-btn.deactivate:hover {
  background: rgba(255, 152, 0, 0.25);
}

/* 宽模态框 */
.admin-modal-wide {
  max-width: 600px;
}

/* 用户详情弹窗样式 */
.user-detail-section {
  margin-bottom: 20px;
}

.user-detail-section:last-child {
  margin-bottom: 0;
}

.user-detail-section h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
}

.user-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.user-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-detail-item label {
  font-size: 12px;
  color: var(--muted);
}

.user-detail-item span {
  font-size: 13px;
  color: var(--text);
}

.user-detail-useragent {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 12px;
  overflow-x: auto;
}

.user-detail-useragent code {
  font-size: 11px;
  color: var(--muted);
  word-break: break-all;
  white-space: pre-wrap;
}

/* IP 链接样式 */
.admin-user-ip-link {
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
}

.admin-user-ip-link:hover {
  text-decoration: underline;
}

/* 用户卡片可点击样式 */
.admin-user-card {
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.admin-user-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.admin-user-card:active {
  transform: translateY(0);
}

/* Debug 用户卡片样式 */
.admin-user-card-debug {
  border: 2px solid #ffb400 !important;
  background: linear-gradient(135deg, rgba(255, 180, 0, 0.12), rgba(255, 100, 0, 0.08)) !important;
  box-shadow: 0 0 0 1px rgba(255, 180, 0, 0.2), 0 4px 16px rgba(255, 150, 0, 0.15) !important;
}

.admin-user-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-20deg);
  font-size: 56px;
  font-weight: 900;
  color: rgba(255, 140, 0, 0.25);
  letter-spacing: 0.1em;
  pointer-events: none;
  user-select: none;
  z-index: 10;
  white-space: nowrap;
  text-shadow: 0 0 20px rgba(255, 180, 0, 0.15);
}

.admin-user-debug-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ffb400, #ff6b00);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
  letter-spacing: 0.05em;
  vertical-align: middle;
  box-shadow: 0 2px 6px rgba(255, 150, 0, 0.4);
}

@media (max-width: 480px) {
  .user-detail-grid {
    grid-template-columns: 1fr;
  }

  .admin-modal-wide {
    max-width: 95%;
  }
}

/* Token类型选择弹窗样式 */
.admin-token-type-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-token-type-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.admin-token-type-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(117, 247, 209, 0.3);
}

.admin-token-type-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: rgba(117, 247, 209, 0.08);
  border-radius: 12px;
}

.admin-token-type-info h4 {
  margin: 0 0 4px 0;
  font-size: 15px;
  color: var(--text);
}

.admin-token-type-info p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.admin-token-type-trial .admin-token-type-icon {
  background: rgba(255, 152, 0, 0.15);
}

.admin-token-type-trial:hover {
  border-color: rgba(255, 152, 0, 0.3);
}

/* Token有效期样式 */
.admin-token-expires {
  font-size: 12px;
  color: #ff9800;
  margin: 8px 0 0 0;
}

.admin-token-history-type {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(117, 247, 209, 0.15);
  color: var(--primary);
}

.admin-token-history-type.trial {
  background: rgba(255, 152, 0, 0.15);
  color: #ff9800;
}

.admin-token-history-expires {
  font-size: 11px;
  color: #ff9800;
  margin-top: 4px;
}

/* Debug 用户详情样式 */
.debug-code-highlight {
  font-family: 'Courier New', monospace;
  font-size: 16px;
  font-weight: 700;
  color: #ff9800;
  text-shadow: 0 0 8px rgba(255, 152, 0, 0.5);
}

.user-type-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(117, 247, 209, 0.15);
  color: var(--primary);
  font-weight: 600;
}

.user-type-badge.debug {
  background: rgba(255, 152, 0, 0.15);
  color: #ff9800;
}

.admin-modal-debug-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 152, 0, 0.2);
  color: #ff9800;
  margin-left: 8px;
}

.user-detail-map-link {
  margin-top: 12px;
}

.user-detail-map-link a {
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
}

.user-detail-map-link a:hover {
  text-decoration: underline;
}

/* 表单提示样式 */
.admin-form-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0 0;
}

/* 管理员用户类型选择样式 */
.admin-user-type-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.admin-user-type-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.admin-user-type-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.admin-user-type-btn.selected {
  background: rgba(117, 247, 209, 0.1);
  border-color: rgba(117, 247, 209, 0.4);
}

.admin-user-type-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.admin-user-type-info h4 {
  margin: 0 0 2px 0;
  font-size: 13px;
  color: var(--text);
}

.admin-user-type-info p {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}

.admin-user-type-superadmin .admin-user-type-icon {
  background: rgba(255, 152, 0, 0.15);
}

.admin-user-type-superadmin.selected {
  background: rgba(255, 152, 0, 0.1);
  border-color: rgba(255, 152, 0, 0.4);
}

.admin-user-type-staff .admin-user-type-icon {
  background: rgba(59, 130, 246, 0.15);
}

.admin-user-type-staff.selected {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.4);
}

.admin-user-type-debug .admin-user-type-icon {
  background: rgba(139, 92, 246, 0.15);
}

.admin-user-type-debug.selected {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.4);
}

/* Token发放者样式 */
.admin-token-history-issuer {
  font-size: 11px;
  color: var(--muted);
  margin-left: 8px;
}

/* Hopo更新按钮 */
.hopo-update-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  margin-top: 16px;
}

.hopo-update-btn:hover {
  background: var(--accent-2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(117, 247, 209, 0.3);
}

/* 调色盘样式 */
.color-picker-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.color-picker-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.color-picker-group label {
  font-weight: 600;
  color: var(--text);
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.color-preview {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.color-preview:hover {
  transform: scale(1.1);
}

.color-picker-row input[type="color"] {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}

.color-picker-row input[type="text"] {
  flex: 1;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
}

.color-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.color-preset {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
}

.color-preset:hover {
  transform: scale(1.2);
  border-color: rgba(255, 255, 255, 0.5);
}

/* 主题预览卡片 */
.theme-preview-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}

.theme-preview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
}

.theme-preview-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.theme-preview-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.theme-preview-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
}

.theme-preview-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.theme-preview-button {
  padding: 10px 24px;
  border-radius: 8px;
  color: var(--bg);
  font-weight: 600;
  cursor: pointer;
  border: none;
}

/* 个性化壁纸 */
.wallpaper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.wallpaper-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.wallpaper-option:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}

.wallpaper-option.active {
  border-color: var(--accent);
  background: rgba(117, 247, 209, 0.08);
}

.wallpaper-preview {
  width: 100%;
  height: 80px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 24px;
}

.wallpaper-option span {
  font-size: 12px;
  color: var(--text);
}

.wallpaper-option.wallpaper-upload {
  border: 2px dashed var(--line);
  justify-content: center;
}

.wallpaper-option.wallpaper-upload:hover {
  border-color: var(--accent);
}

.wallpaper-upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.upload-icon-svg {
  width: 32px;
  height: 32px;
  color: var(--muted);
  transition: color var(--transition-fast);
}

.wallpaper-option.wallpaper-upload:hover .upload-icon-svg {
  color: var(--accent);
}

.wallpaper-upload-content span {
  font-size: 12px;
  color: var(--muted);
  transition: color var(--transition-fast);
}

.wallpaper-option.wallpaper-upload:hover .wallpaper-upload-content span {
  color: var(--accent);
}

.wallpaper-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* 问题反馈表单 */
.feedback-card {
  padding: 24px;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feedback-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feedback-form-group label {
  font-weight: 600;
}

.feedback-form-group input,
.feedback-form-group select,
.feedback-form-group textarea {
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
}

.feedback-form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.captcha-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.captcha-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.captcha-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  flex: 1;
  min-width: 0;
  max-width: 220px;
}

.captcha-refresh {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition-fast);
  flex-shrink: 0;
}

.captcha-refresh:hover {
  color: var(--accent);
}

.captcha-row input {
  flex: 1;
  min-width: 100px;
}

/* 响应式布局 */
@media (max-width: 480px) {
  .captcha-row {
    flex-direction: column;
    align-items: stretch;
  }
  .captcha-box {
    max-width: 100%;
  }
  .captcha-row input {
    width: 100%;
  }
}

.feedback-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px;
  background: rgba(119, 230, 161, 0.1);
  border: 1px solid rgba(119, 230, 161, 0.3);
  border-radius: 12px;
  margin-top: 16px;
}

.success-icon {
  width: 48px;
  height: 48px;
  background: var(--ok);
  color: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
}

/* 管理员反馈筛选 */
.admin-feedback-filters {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
}

.admin-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.admin-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.admin-search-box input {
  width: 100%;
  padding: 10px 12px 10px 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.admin-search-box input:focus {
  border-color: var(--accent);
}

.admin-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-filter-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.admin-filter-toggle-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

.admin-filter-clear-btn {
  padding: 10px 16px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.admin-filter-clear-btn:hover {
  background: var(--accent);
  color: var(--bg);
}

.admin-filter-panel {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.admin-filter-panel.open {
  display: grid;
}

.admin-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-filter-group label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.admin-filter-group select,
.admin-filter-group input[type="date"] {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.admin-filter-group select:focus,
.admin-filter-group input[type="date"]:focus {
  border-color: var(--accent);
}

/* 管理员反馈管理 */
.admin-feedbacks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.admin-feedback-card {
  background: var(--panel);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  transition: all var(--transition-normal);
}

.admin-feedback-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.admin-feedback-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.admin-feedback-type {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: white;
}

.admin-feedback-ticket {
  font-size: 12px;
  color: var(--muted);
  font-family: monospace;
}

.admin-feedback-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.admin-feedback-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.admin-feedback-preview {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
  line-height: 1.5;
}

.feedback-detail-section {
  margin-bottom: 20px;
}

.feedback-detail-section h4 {
  margin-bottom: 12px;
  color: var(--text);
}

.feedback-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.feedback-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feedback-detail-item label {
  font-size: 12px;
  color: var(--muted);
}

.feedback-detail-item span {
  font-size: 14px;
  color: var(--text);
}

.feedback-ticket {
  font-family: monospace;
  color: var(--accent);
}

.feedback-detail-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.feedback-detail-description {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.04);
  padding: 16px;
  border-radius: 8px;
}

/* 管理员恢复进度 */
.admin-restore-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-restore-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.admin-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width var(--transition-fast);
}

.admin-restore-progress span {
  font-size: 12px;
  color: var(--muted);
}

/* 反馈进度条 */
.feedback-progress {
  margin: 12px 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.feedback-progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.feedback-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 3px;
  transition: width var(--transition-normal);
}

.feedback-progress-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-top: 4px;
}

.feedback-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.feedback-step .step-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all var(--transition-normal);
}

.feedback-step .step-label {
  font-size: 12px;
  color: var(--muted);
}

.feedback-step .step-time {
  font-size: 10px;
  color: var(--muted);
  opacity: 0.6;
}

.feedback-step.active .step-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(117, 247, 209, 0.4);
}

.feedback-step.active .step-label {
  color: var(--text);
  font-weight: 600;
}

.feedback-step.done .step-dot {
  background: var(--accent);
  border-color: var(--accent);
}

.feedback-step.done .step-dot::after {
  content: "✓";
  display: block;
  text-align: center;
  font-size: 10px;
  color: var(--bg);
  font-weight: bold;
  line-height: 10px;
  margin-top: 1px;
}

.feedback-status-label {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

.feedback-status-label strong {
  color: var(--accent);
}

/* 大型进度条（详情页） */
.feedback-progress-large {
  margin: 16px 0 24px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
}

.feedback-progress-large .feedback-progress-steps {
  margin-top: 12px;
}

/* 反馈卡片未读状态 */
.admin-feedback-card.unread {
  border-left: 3px solid var(--accent);
  background: linear-gradient(90deg, rgba(117, 247, 209, 0.06), var(--panel) 30%);
}

.admin-feedback-unread-dot {
  width: 10px;
  height: 10px;
  background: var(--danger);
  border-radius: 50%;
  display: inline-block;
  margin-left: 8px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* 反馈沟通记录 */
.feedback-replies-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}

.feedback-reply {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.feedback-reply-admin {
  background: rgba(117, 247, 209, 0.08);
  border-left: 3px solid var(--accent);
}

.feedback-reply-user {
  background: rgba(141, 124, 255, 0.08);
  border-left: 3px solid var(--accent-2);
}

.reply-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.reply-content {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.feedback-empty-reply {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 20px;
}

/* 管理员弹窗底部多按钮 */
.admin-modal-footer-multi {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-modal-footer-status {
  display: flex;
  gap: 8px;
}

.admin-modal-footer-actions {
  display: flex;
  gap: 8px;
}

.admin-action-btn.status-btn {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all var(--transition-fast);
}

.admin-action-btn.status-btn:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.25);
}

.admin-action-btn.status-btn.status-completed {
  background: rgba(119, 230, 161, 0.15);
  color: var(--ok);
  border-color: rgba(119, 230, 161, 0.3);
}

.admin-action-btn.status-btn.status-completed:hover:not(:disabled) {
  background: rgba(119, 230, 161, 0.25);
}

.admin-action-btn.status-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.admin-action-btn.reply-btn {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.admin-action-btn.read-btn {
  background: rgba(141, 124, 255, 0.15);
  color: var(--accent-2);
  border: 1px solid rgba(141, 124, 255, 0.3);
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.admin-action-btn.read-btn:hover {
  background: rgba(141, 124, 255, 0.25);
}

/* 用户端反馈历史 */
.feedback-history-card {
  margin-top: 16px;
}

.feedback-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.feedback-history-header h3 {
  margin: 0;
}

.feedback-history-refresh {
  padding: 6px 12px;
  font-size: 12px;
}

.user-feedback-history {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-feedback-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
}

.user-feedback-empty-icon {
  font-size: 36px;
  margin-bottom: 8px;
  opacity: 0.5;
}

.user-feedback-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  transition: all var(--transition-fast);
}

.user-feedback-item.has-new-reply {
  border-left: 3px solid var(--accent);
  background: linear-gradient(90deg, rgba(117, 247, 209, 0.06), var(--panel) 30%);
}

.user-feedback-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-feedback-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  color: white;
  font-size: 11px;
  font-weight: 600;
}

.user-feedback-ticket {
  font-size: 11px;
  color: var(--muted);
  font-family: monospace;
}

.user-feedback-new-dot {
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.5s infinite;
}

.user-feedback-toggle {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-feedback-toggle:hover {
  background: rgba(117, 247, 209, 0.1);
  color: var(--accent);
}

.user-feedback-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 8px 0 4px;
}

.user-feedback-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.user-feedback-detail {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.user-feedback-description {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 12px;
  white-space: pre-wrap;
}

.user-feedback-replies h5 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text);
}

.user-feedback-replies-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.user-feedback-reply {
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.user-feedback-reply-admin {
  background: rgba(117, 247, 209, 0.08);
  border-left: 3px solid var(--accent);
}

.user-feedback-reply-user {
  background: rgba(141, 124, 255, 0.08);
  border-left: 3px solid var(--accent-2);
}

/* 关于界面点击提示 */
.hopo-os-hint-clickable {
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 8px 12px;
  border-radius: 6px;
  display: block;
  margin: 0 auto 24px;
  max-width: fit-content;
  text-align: center;
}

.hopo-os-hint-clickable:hover {
  background: rgba(117, 247, 209, 0.1);
  color: var(--accent);
}

/* 关于页面链接按钮 */
.hopo-update-history-link {
  text-align: center;
  margin-bottom: 16px;
}

.hopo-link-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.hopo-link-button:hover {
  background: rgba(117, 247, 209, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

/* 响应式布局 - 修复小屏幕 UI 超出问题 */
@media (max-width: 768px) {
  .settings-content {
    padding: 20px 16px;
  }

  .hopo-about-container {
    padding: 8px;
  }

  .hopo-os-title {
    font-size: 1.6rem;
  }

  .hopo-os-version {
    font-size: 0.9rem;
  }

  /* 反馈表单响应式 */
  .feedback-form {
    width: 100%;
  }

  .feedback-form-group {
    width: 100%;
  }

  .feedback-form-group input,
  .feedback-form-group select,
  .feedback-form-group textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* 信息卡片响应式 */
  .info-card {
    padding: 16px;
    margin: 0 0 16px;
    width: 100%;
    box-sizing: border-box;
  }

  /* 更新区域响应式 */
  .update-inline-area {
    padding: 16px !important;
    margin: 12px 0 !important;
  }

  /* 进度条响应式 */
  .feedback-progress-steps {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .feedback-step {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
  }

  .feedback-step .step-time {
    margin-left: auto;
  }
}

@media (max-width: 480px) {
  .settings-content {
    padding: 12px 8px;
  }

  .hopo-os-title {
    font-size: 1.4rem;
  }

  /* 表单元素全宽 */
  .feedback-form-group input,
  .feedback-form-group select,
  .feedback-form-group textarea,
  .captcha-group input {
    width: 100% !important;
    min-width: unset !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* 工具栏按钮 */
  .toolbar {
    flex-direction: column;
    gap: 8px;
  }

  .toolbar button {
    width: 100%;
  }
}

.ai-submenu {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.ai-submenu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ai-submenu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.ai-submenu-item.active {
  background: rgba(117, 247, 209, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.ai-submenu-item svg {
  width: 18px;
  height: 18px;
}

.ai-subcontent {
  padding-top: 8px;
}

.ai-subsection {
  display: none;
}

.ai-subsection.active {
  display: block;
}

.systemai-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
}

.toggle-label {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #374151;
  transition: 0.3s;
  border-radius: 28px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.systemai-preview {
  margin-top: 20px;
  padding: 16px;
  background: rgba(117, 247, 209, 0.08);
  border: 1px solid rgba(117, 247, 209, 0.2);
  border-radius: 12px;
}

.systemai-preview-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.systemai-preview-header span {
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
}

.systemai-preview p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.logo-dot.systemai-active {
  box-shadow: 0 0 8px var(--accent), 0 0 16px var(--accent), 0 0 24px var(--accent);
  animation: systemai-pulse 2s ease-in-out infinite;
}

.logo-dot.systemai-active + span {
  cursor: pointer;
}

#logoBrand {
  cursor: pointer;
}

#logoBrand:hover .logo-dot {
  transform: scale(1.1);
}

#logoBrand:hover .logo-dot.systemai-active {
  box-shadow: 0 0 12px var(--accent), 0 0 24px var(--accent), 0 0 36px var(--accent);
}

@keyframes systemai-pulse {
  0%, 100% {
    box-shadow: 0 0 8px var(--accent), 0 0 16px var(--accent), 0 0 24px var(--accent);
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 16px var(--accent), 0 0 32px var(--accent), 0 0 48px var(--accent);
    opacity: 0.8;
  }
}

.systemai-dialog {
  position: fixed;
  top: 60px;
  left: 20px;
  width: 380px;
  max-height: 60vh;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
  transition: all var(--transition-normal);
  z-index: 1000;
}

.systemai-dialog.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.systemai-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.systemai-dialog-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.systemai-close-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.systemai-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.systemai-dialog-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  max-height: 400px;
}

.systemai-message {
  margin-bottom: 12px;
}

.systemai-message-ai .systemai-message-content {
  background: rgba(117, 247, 209, 0.1);
  border: 1px solid rgba(117, 247, 209, 0.2);
  color: var(--text);
}

.systemai-message-user .systemai-message-content {
  background: rgba(141, 124, 255, 0.15);
  border: 1px solid rgba(141, 124, 255, 0.3);
  color: var(--text);
}

.systemai-message-content {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
}

.systemai-dialog-footer {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.systemai-input {
  flex: 1;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: all var(--transition-fast);
}

.systemai-input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

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

.systemai-send-btn {
  background: var(--accent);
  border: none;
  color: #08101f;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.systemai-send-btn:hover {
  background: #5ff0c8;
  transform: translateY(-1px);
}

.systemai-send-btn:active {
  transform: translateY(0);
}

.hpk-runtime-shell {
  position: relative;
}

.hpk-runtime-shell.iframe-error .hpk-frame {
  display: none;
}

.iframe-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--window-bg);
  color: var(--text);
  gap: 16px;
}

.iframe-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.iframe-loading p {
  color: var(--muted);
  font-size: 14px;
}

.iframe-error-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--window-bg);
  color: var(--text);
  gap: 16px;
}

.iframe-error-overlay.hidden {
  display: none;
}

.iframe-error-overlay p {
  color: var(--muted);
  font-size: 14px;
}

.iframe-error-actions {
  display: flex;
  gap: 12px;
}

.iframe-retry {
  background: var(--border);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.iframe-retry:hover {
  background: var(--hover);
}

.iframe-open-external {
  background: var(--accent);
  color: #08101f;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.iframe-open-external:hover {
  background: #5ff0c8;
  transform: translateY(-1px);
}
