/* ============================================
   球拍定制设计器 — Design System
   Dark theme + Glassmorphism
   ============================================ */

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

/* --- CSS Variables --- */
:root {
  color-scheme: dark;

  /* Brand Colors */
  --brand-primary: #6C5CE7;
  --brand-primary-light: #A29BFE;
  --brand-primary-dark: #4834D4;
  --brand-accent: #00D2D3;
  --brand-accent-light: #48DBFB;
  --brand-warning: #FECA57;
  --brand-danger: #FF6B6B;
  --brand-success: #1DD1A1;

  /* Surface Colors */
  --surface-base: #0D0D12;
  --surface-1: #14141B;
  --surface-2: #1A1A24;
  --surface-3: #22222E;
  --surface-4: #2A2A38;
  --surface-elevated: rgba(30, 30, 42, 0.85);

  /* Glass */
  --glass-bg: rgba(22, 22, 32, 0.72);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-blur: 20px;

  /* Text */
  --text-primary: #F0F0F5;
  --text-secondary: #9B9BB0;
  --text-tertiary: #5C5C72;
  --text-inverse: #0D0D12;

  /* Borders */
  --border-default: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.14);
  --border-active: var(--brand-primary);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 20px rgba(108, 92, 231, 0.25);

  /* Layout */
  --panel-left-width: 240px;
  --panel-right-width: 280px;
  --toolbar-height: 48px;
  --statusbar-height: 28px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Transitions */
  --transition-fast: 120ms ease;
  --transition-normal: 200ms ease;
  --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--surface-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

/* --- App Layout --- */
.app-container {
  display: grid;
  grid-template-rows: var(--toolbar-height) 1fr var(--statusbar-height);
  grid-template-columns: var(--panel-left-width) 1fr var(--panel-right-width);
  grid-template-areas:
    "toolbar toolbar toolbar"
    "left-panel canvas right-panel"
    "statusbar statusbar statusbar";
  height: 100vh;
  width: 100vw;
}

/* --- Toolbar --- */
.toolbar {
  grid-area: toolbar;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 12px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border-default);
  z-index: 100;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px;
}

.toolbar-group + .toolbar-group {
  border-left: 1px solid var(--border-default);
  margin-left: 4px;
  padding-left: 10px;
}

.toolbar-spacer {
  flex: 1;
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 16px;
  position: relative;
}

.toolbar-btn:hover {
  background: var(--surface-3);
  color: var(--text-primary);
}

.toolbar-btn.active {
  background: var(--brand-primary);
  color: white;
  box-shadow: var(--shadow-glow);
}

.toolbar-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 8px;
  background: var(--surface-4);
  color: var(--text-primary);
  font-size: 11px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
  z-index: 200;
}

.toolbar-btn[data-tooltip]:hover::after {
  opacity: 1;
}

.toolbar-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  margin-right: 8px;
}

.toolbar-logo {
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand-primary-light), var(--brand-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-right: 16px;
  letter-spacing: -0.5px;
}

/* --- Panels (Left & Right) --- */
.panel {
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-color: var(--glass-border);
  overflow: hidden;
}

.panel-left {
  grid-area: left-panel;
  border-right: 1px solid var(--border-default);
}

.panel-right {
  grid-area: right-panel;
  border-left: 1px solid var(--border-default);
}

.panel-section {
  padding: 12px;
  border-bottom: 1px solid var(--border-default);
  /* Added to allow nested flex scrolling */
  min-height: 0;
}

.panel-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-tertiary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-section-title .collapse-btn {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 12px;
  transition: transform var(--transition-fast);
}

.panel-section-title .collapse-btn.collapsed {
  transform: rotate(-90deg);
}

.panel-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-4) transparent;
  min-height: 0;
}

.panel-scroll::-webkit-scrollbar {
  width: 5px;
}

.panel-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.panel-scroll::-webkit-scrollbar-thumb {
  background: var(--surface-4);
  border-radius: 4px;
}

/* --- Canvas Area --- */
.canvas-area {
  grid-area: canvas;
  position: relative;
  background: var(--surface-base);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.canvas-area .canvas-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(45deg, var(--surface-2) 25%, transparent 25%),
    linear-gradient(-45deg, var(--surface-2) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--surface-2) 75%),
    linear-gradient(-45deg, transparent 75%, var(--surface-2) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  opacity: 0.3;
}

.canvas-wrapper {
  position: relative;
  z-index: 1;
}

/* --- Status Bar --- */
.statusbar {
  grid-area: statusbar;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: var(--surface-1);
  border-top: 1px solid var(--border-default);
  font-size: 11px;
  color: var(--text-tertiary);
}

.statusbar-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.statusbar-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --- Zoom Control --- */
.zoom-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.zoom-control input[type="range"] {
  width: 80px;
  height: 3px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--surface-4);
  border-radius: 2px;
  outline: none;
}

.zoom-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand-primary);
  cursor: pointer;
  border: 2px solid var(--surface-1);
}

.zoom-value {
  min-width: 36px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* --- Asset / Template Cards --- */
.template-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.template-card {
  position: relative;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-default);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-normal);
  aspect-ratio: 3/4;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.template-card:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.template-card.active {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-glow);
}

.template-card img,
.template-card svg {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.template-card .template-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  font-size: 11px;
  font-weight: 500;
  color: var(--text-primary);
}

/* --- Upload Area --- */
.upload-area {
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  color: var(--text-tertiary);
}

.upload-area:hover {
  border-color: var(--brand-primary);
  background: rgba(108, 92, 231, 0.06);
  color: var(--text-secondary);
}

.upload-area .upload-icon {
  font-size: 28px;
  margin-bottom: 6px;
  display: block;
}

.upload-area .upload-text {
  font-size: 12px;
}

.upload-area .upload-hint {
  font-size: 10px;
  margin-top: 4px;
  opacity: 0.6;
}

/* --- Color Picker Panel --- */
.color-section {
  padding: 12px;
}

.color-preview-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.color-preview {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-default);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.color-preview .checkerboard {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(45deg, #666 25%, transparent 25%),
    linear-gradient(-45deg, #666 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #666 75%),
    linear-gradient(-45deg, transparent 75%, #666 75%);
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
}

.color-preview .color-fill {
  position: absolute;
  inset: 0;
}

.color-hex-input {
  flex: 1;
  background: var(--surface-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 6px 10px;
  font-family: 'Inter', monospace;
  font-size: 12px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.color-hex-input:focus {
  border-color: var(--brand-primary);
}

/* Color Wheel Canvas */
.color-wheel-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.color-wheel-container canvas {
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

/* Hue Strip */
.hue-strip-container {
  width: 100%;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
  cursor: pointer;
}

.hue-strip-container canvas {
  width: 100%;
  height: 100%;
}

.hue-strip-thumb {
  position: absolute;
  top: 50%;
  width: 6px;
  height: 18px;
  background: white;
  border-radius: 3px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 4px rgba(0,0,0,0.5);
  pointer-events: none;
}

/* Opacity Slider */
.opacity-slider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.opacity-slider label {
  font-size: 11px;
  color: var(--text-tertiary);
  min-width: 20px;
}

.opacity-slider input[type="range"] {
  flex: 1;
  height: 3px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, transparent, var(--brand-primary));
  border-radius: 2px;
  outline: none;
}

.opacity-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  border: 2px solid var(--brand-primary);
  box-shadow: var(--shadow-sm);
}

/* Preset Color Swatches */
.color-swatches {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}

.color-swatch {
  aspect-ratio: 1;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.color-swatch:hover {
  transform: scale(1.15);
  border-color: white;
}

.color-swatch.active {
  border-color: white;
  box-shadow: 0 0 6px rgba(255,255,255,0.3);
}

/* Gradient Editor */
.gradient-toggle {
  display: flex;
  background: var(--surface-3);
  border-radius: var(--radius-sm);
  padding: 2px;
  margin-bottom: 12px;
}

.gradient-toggle button {
  flex: 1;
  padding: 5px 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.gradient-toggle button.active {
  background: var(--brand-primary);
  color: white;
}

.gradient-bar-container {
  position: relative;
  width: 100%;
  height: 24px;
  border-radius: 6px;
  overflow: visible;
  margin-bottom: 16px;
  cursor: pointer;
}

.gradient-bar {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  border: 1px solid var(--border-default);
}

.gradient-stop {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid white;
  transform: translate(-50%, -50%);
  cursor: grab;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition-fast);
}

.gradient-stop:hover,
.gradient-stop.active {
  box-shadow: 0 0 8px rgba(255,255,255,0.4);
}

.gradient-angle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gradient-angle label {
  font-size: 11px;
  color: var(--text-tertiary);
}

.gradient-angle input {
  width: 60px;
  background: var(--surface-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 4px 8px;
  font-size: 12px;
  text-align: center;
  outline: none;
}

.gradient-angle input:focus {
  border-color: var(--brand-primary);
}

/* --- Layer Panel --- */
.layer-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.layer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
  font-size: 12px;
}

.layer-item:hover {
  background: var(--surface-3);
}

.layer-item.selected {
  background: rgba(108, 92, 231, 0.15);
  outline: 1px solid rgba(108, 92, 231, 0.3);
}

.layer-item .layer-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--border-default);
  flex-shrink: 0;
}

.layer-item .layer-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.layer-item .layer-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

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

.layer-action-btn {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.layer-action-btn:hover {
  background: var(--surface-4);
  color: var(--text-primary);
}

.layer-action-btn.locked {
  color: var(--brand-warning);
}

/* --- Property Inputs --- */
.prop-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.prop-label {
  font-size: 11px;
  color: var(--text-tertiary);
  min-width: 24px;
  text-align: right;
}

.prop-input {
  flex: 1;
  background: var(--surface-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 5px 8px;
  font-size: 12px;
  font-family: 'Inter', monospace;
  outline: none;
  transition: border-color var(--transition-fast);
}

.prop-input:focus {
  border-color: var(--brand-primary);
}

.prop-input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-primary {
  background: var(--brand-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--brand-primary-dark);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: var(--surface-3);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

.btn-secondary:hover {
  background: var(--surface-4);
  border-color: var(--border-hover);
}

.btn-danger {
  background: rgba(255, 107, 107, 0.15);
  color: var(--brand-danger);
  border: 1px solid rgba(255, 107, 107, 0.2);
}

.btn-danger:hover {
  background: rgba(255, 107, 107, 0.25);
}

.btn-block {
  width: 100%;
}

.btn-group {
  display: flex;
  gap: 6px;
}

/* --- Export Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}

.modal-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--surface-2);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-width: 360px;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  transform: translateY(10px);
  transition: transform var(--transition-smooth);
}

.modal-overlay.visible .modal {
  transform: translateY(0);
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.modal-body {
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* --- Loading Overlay --- */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: var(--surface-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 50;
  transition: opacity var(--transition-smooth);
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--surface-4);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-text {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-secondary);
}

.loading-progress {
  width: 200px;
  height: 3px;
  background: var(--surface-4);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}

.loading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  border-radius: 2px;
  width: 0%;
  transition: width 300ms ease;
}

/* --- No Selection State --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: var(--text-tertiary);
}

.empty-state .empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
  opacity: 0.4;
}

.empty-state .empty-text {
  font-size: 12px;
}

/* --- Selection Highlight (for canvas objects) --- */
.canvas-container .upper-canvas {
  cursor: default !important;
}

/* --- Font Select --- */
.font-select {
  background: var(--surface-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 5px 8px;
  font-size: 12px;
  outline: none;
  width: 100%;
  cursor: pointer;
}

.font-select:focus {
  border-color: var(--brand-primary);
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.fade-in {
  animation: fadeIn 300ms ease forwards;
}

/* --- Responsive (collapse panels on small screens) --- */
@media (max-width: 1024px) {
  .app-container {
    grid-template-columns: 0 1fr 0;
  }
  .panel-left, .panel-right {
    display: none;
  }
}

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  bottom: 48px;
  right: 16px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 10px 16px;
  background: var(--surface-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 12px;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 200ms ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* --- Login Screen --- */
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 13, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 300ms ease, visibility 300ms ease;
}

.login-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-card {
  width: 380px;
  background: var(--surface-1);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: scaleIn 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.login-header {
  text-align: center;
}

.login-logo {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand-primary-light), var(--brand-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 13px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
}

.form-input {
  background: var(--surface-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  border-color: var(--brand-primary);
}

.error-message {
  color: var(--brand-danger);
  font-size: 12px;
  text-align: center;
  background: rgba(255, 107, 107, 0.1);
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 107, 107, 0.2);
}

.login-submit-btn {
  background: var(--brand-primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 8px;
  box-shadow: var(--shadow-glow);
}

.login-submit-btn:hover {
  background: var(--brand-primary-dark);
  transform: translateY(-1px);
}

.login-submit-btn:active {
  transform: translateY(0);
}

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