/* Modern Design Tokens */
:root {
  --bg-color: #080a10;
  --panel-bg: rgba(15, 18, 30, 0.75);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(168, 85, 247, 0.4);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  /* Component Specific */
  --input-bg: rgba(0, 0, 0, 0.25);
  --input-bg-focus: rgba(0, 0, 0, 0.35);
  --card-bg: rgba(255, 255, 255, 0.02);
  --card-bg-hover: rgba(255, 255, 255, 0.05);
  --button-bg: rgba(255, 255, 255, 0.04);
  --button-bg-hover: rgba(255, 255, 255, 0.08);
  --glow-opacity: 0.15;
  
  /* Cyber Gradients */
  --grad-primary: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
  --grad-primary-hover: linear-gradient(135deg, #c084fc 0%, #60a5fa 100%);
  --grad-neon-purple: #c084fc;
  --grad-neon-blue: #60a5fa;
  
  --accent-purple: #a855f7;
  --accent-blue: #3b82f6;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
}

body.light-mode {
  --bg-color: #f8fafc;
  --panel-bg: rgba(255, 255, 255, 0.75);
  --border-color: rgba(15, 23, 42, 0.08);
  --border-hover: rgba(168, 85, 247, 0.5);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --input-bg: rgba(255, 255, 255, 0.85);
  --input-bg-focus: rgba(255, 255, 255, 0.95);
  --card-bg: rgba(15, 23, 42, 0.03);
  --card-bg-hover: rgba(15, 23, 42, 0.06);
  --button-bg: rgba(15, 23, 42, 0.04);
  --button-bg-hover: rgba(15, 23, 42, 0.08);
  --glow-opacity: 0.07;
}

/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Futuristic Background Glows */
.glow-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.glow-bg::before,
.glow-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  opacity: var(--glow-opacity);
}

.glow-bg::before {
  width: 40vw;
  height: 40vw;
  top: -10vw;
  right: -5vw;
  background: var(--accent-purple);
}

.glow-bg::after {
  width: 45vw;
  height: 45vw;
  bottom: -15vw;
  left: -10vw;
  background: var(--accent-blue);
}

/* Main Container */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Header Styles */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.logo-text h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.accent-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  margin-top: 1px;
}

/* API Status Indicator */
.api-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px var(--success);
}

.api-status.disconnected .status-dot {
  background-color: var(--error);
  box-shadow: 0 0 10px var(--error);
}

.api-status.connecting .status-dot {
  background-color: var(--warning);
  box-shadow: 0 0 10px var(--warning);
  animation: pulse-yellow 1.5s infinite;
}

/* Layout Grid */
.workspace-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  flex: 1;
}

@media (max-width: 1024px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
}

/* Glassmorphism Card Style */
.glass-card {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 2rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Control Panel Section Header */
.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.section-title:not(:first-child) {
  margin-top: 2rem;
}

.step-num {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 2px 8px;
  background: rgba(168, 85, 247, 0.15);
  color: var(--grad-neon-purple);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 6px;
}

.section-title h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.2px;
}

/* Input Fields */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.textarea-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.textarea-header label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.prompt-tools {
  display: flex;
  gap: 0.5rem;
}

.tool-btn {
  background: var(--button-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.tool-btn:hover {
  background: var(--button-bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.textarea-wrapper {
  position: relative;
  width: 100%;
}

textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  line-height: 1.6;
  outline: none;
  transition: all 0.3s ease;
}

textarea:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
  background: var(--input-bg-focus);
}

.char-counter {
  position: absolute;
  bottom: 10px;
  right: 15px;
  font-size: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
}

/* Interactive Aspect Ratio Grid */
.aspect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.aspect-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.aspect-card:hover {
  background: var(--card-bg-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.aspect-card.active {
  background: rgba(168, 85, 247, 0.08);
  border-color: var(--accent-purple);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.15);
}

/* Simulated box ratios */
.ratio-preview {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  margin-bottom: 0.75rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aspect-card:hover .ratio-preview {
  border-color: var(--grad-neon-purple);
  background: rgba(255, 255, 255, 0.12);
}

.aspect-card.active .ratio-preview {
  border-color: var(--grad-neon-purple);
  background: rgba(168, 85, 247, 0.2);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
}

/* Precision dimensions of ratio previews */
.box-16-9 { width: 44px; height: 25px; }
.box-1-1  { width: 30px; height: 30px; }
.box-9-16 { width: 25px; height: 44px; }
.box-4-3  { width: 40px; height: 30px; }
.box-3-4  { width: 30px; height: 40px; }
.box-3-2  { width: 42px; height: 28px; }
.box-2-3  { width: 28px; height: 42px; }
.box-21-9 { width: 48px; height: 21px; }
.box-9-21 { width: 21px; height: 48px; }
.box-5-4  { width: 38px; height: 30px; }
.box-4-5  { width: 30px; height: 38px; }

.ratio-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.ratio-resolution {
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 1px;
}

.ratio-desc {
  font-size: 0.55rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Masterpiece Generation Button */
.generate-btn {
  width: 100%;
  margin-top: 1.5rem;
  padding: 1.1rem;
  border-radius: 12px;
  border: none;
  background: var(--grad-primary);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

.generate-btn:hover {
  background: var(--grad-primary-hover);
  box-shadow: 0 6px 22px rgba(168, 85, 247, 0.45);
  transform: translateY(-1px);
}

.generate-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.3);
}

.btn-glow {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transition: none;
}

.generate-btn:hover .btn-glow {
  animation: shine 1.5s infinite;
}

.btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

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

/* Display Panel Styles */
.display-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 500px;
  position: relative;
  overflow: hidden;
}

/* Panel States styling */
.panel-state {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.4s ease;
}

.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

/* State 1: Idle Dashboard design */
.placeholder-art {
  position: relative;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.art-circle-outer {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: spin 30s linear infinite;
}

.art-circle-inner {
  position: absolute;
  width: 80%;
  height: 80%;
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 50%;
  box-shadow: inset 0 0 20px rgba(168, 85, 247, 0.05);
  animation: spin-reverse 15s linear infinite;
}

.placeholder-icon {
  z-index: 2;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.3));
}

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

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

.state-idle h3,
.state-generating h3,
.state-error h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
}

.state-idle p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-align: center;
  max-width: 320px;
  line-height: 1.6;
}

/* State 2: Generating - Cyber Scanner Loader */
.generating-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.ratio-simulator-outer {
  width: 100%;
  max-width: 380px;
  background: rgba(0, 0, 0, 0.3);
  border: 1.5px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 12px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
}

.ratio-simulator-inner {
  width: 100%;
  height: 200px; /* Overwritten dynamically by JS ratio styles */
  background: #030407;
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.1);
  transition: aspect-ratio 0.4s ease, height 0.4s ease;
}

.sim-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 20px 20px;
  background-image: 
    linear-gradient(to right, rgba(168, 85, 247, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(168, 85, 247, 0.05) 1px, transparent 1px);
  z-index: 1;
}

.sim-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-family: monospace;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 3;
}

/* Sweeping scanner laser */
.scanner-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, 
    rgba(124, 58, 237, 0) 0%, 
    rgba(168, 85, 247, 1) 15%, 
    rgba(59, 130, 246, 1) 50%, 
    rgba(168, 85, 247, 1) 85%, 
    rgba(124, 58, 237, 0) 100%
  );
  box-shadow: 
    0 0 8px rgba(168, 85, 247, 0.8),
    0 0 16px rgba(59, 130, 246, 0.5);
  z-index: 2;
  animation: scan 3s ease-in-out infinite;
}

@keyframes scan {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

/* Progress bar styles */
.progress-details {
  width: 100%;
  max-width: 380px;
}

.progress-status-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.status-main {
  color: var(--text-secondary);
}

.status-percent {
  color: var(--grad-neon-purple);
  font-family: monospace;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--button-bg);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: var(--grad-primary);
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
  transition: width 0.3s ease;
}

/* Log box mimicking terminal inputs */
.terminal-logs {
  width: 100%;
  max-width: 380px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  height: 95px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scroll-behavior: smooth;
}

.terminal-logs::-webkit-scrollbar {
  width: 4px;
}

.terminal-logs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.log-line {
  color: var(--text-secondary);
  line-height: 1.4;
  white-space: pre-wrap;
}

.log-line.text-purple {
  color: var(--grad-neon-purple);
}

.log-line.text-green {
  color: var(--success);
}

/* State 3: Success Preview and Frames */
.preview-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.preview-frame {
  position: relative;
  max-width: 100%;
  max-height: 480px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: #030407;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.preview-frame img {
  display: block;
  max-width: 100%;
  max-height: 440px;
  object-fit: contain;
  transition: transform 0.5s cubic-bezier(0.15, 1, 0.3, 1);
}

.preview-frame:hover img {
  transform: scale(1.02);
}

.preview-overlay {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 3;
  pointer-events: none;
}

.resolution-badge {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Action button bar */
.action-bar {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  max-width: 480px;
  justify-content: center;
  flex-wrap: wrap;
}

.action-btn {
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.download-btn {
  background: var(--grad-primary);
  color: white;
  flex: 1.3;
  min-width: 160px;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.2);
}

.download-btn:hover {
  background: var(--grad-primary-hover);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.35);
  transform: translateY(-1px);
}

.secondary-btn {
  background: var(--button-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  flex: 1;
  min-width: 110px;
}

.secondary-btn:hover {
  background: var(--button-bg-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

/* State 4: Error designs */
.error-icon-wrapper {
  width: 80px;
  height: 80px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
}

.error-msg {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-align: center;
  max-width: 340px;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Footer Section */
.app-footer-bar {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.app-footer-bar p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Toast Messages */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(15, 18, 30, 0.9);
  border: 1px solid var(--accent-purple);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(168, 85, 247, 0.2);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 9999;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* Pulse animation helper for statuses */
@keyframes pulse-yellow {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Quantity Selector styling */
.quantity-section {
  margin-bottom: 1.5rem;
  width: 100%;
}

.quantity-selector {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.qty-btn {
  flex: 1;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.7rem 0.25rem;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.qty-btn:hover {
  background: var(--card-bg-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.qty-btn.active {
  background: rgba(168, 85, 247, 0.08);
  border-color: var(--accent-purple);
  color: var(--text-primary);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.15);
}

/* Batch Header Info styling */
.batch-header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 1.25rem;
}

.batch-count-badge {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--grad-neon-blue);
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

/* Batch Grid Layout */
.batch-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
  width: 100%;
  margin-bottom: 1.5rem;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 6px;
}

/* Dynamic column counts depending on how many images */
.batch-preview-grid.grid-1 {
  grid-template-columns: 1fr;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.batch-preview-grid.grid-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 580px;
}

.batch-preview-grid.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.batch-preview-grid.grid-4 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 580px;
}

.batch-preview-grid.grid-5,
.batch-preview-grid.grid-6 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 600px) {
  .batch-preview-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Individual Batch Item Tile */
.batch-item {
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: #030407;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.batch-item:hover {
  border-color: var(--accent-purple);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(168, 85, 247, 0.2);
}

.batch-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.batch-item:hover img {
  transform: scale(1.04);
}

.batch-item-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 10, 16, 0.7);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 2;
}

.batch-item:hover .batch-item-hover {
  opacity: 1;
}

.batch-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.batch-btn:hover {
  background: var(--grad-primary);
  border-color: transparent;
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

/* Lightbox Modal styling */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 6, 10, 0.95);
  backdrop-filter: blur(10px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.lightbox-close:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--error);
  color: white;
  transform: scale(1.05);
}

.lightbox-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  user-select: none;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-hover);
  color: white;
  transform: scale(1.05);
}

.nav-prev { left: 40px; }
.nav-next { right: 40px; }

@media (max-width: 768px) {
  .lightbox-nav {
    width: 44px;
    height: 44px;
    bottom: 24px;
    top: auto;
  }
  .nav-prev { left: calc(50% - 60px); }
  .nav-next { right: calc(50% - 60px); }
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 85%;
  max-height: 80%;
  gap: 1.25rem;
}

.lightbox-image {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox.open .lightbox-image {
  transform: scale(1);
}

.lightbox-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  color: var(--text-secondary);
  font-size: 0.875rem;
  gap: 20px;
}

.lightbox-counter {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

.lightbox-action-btn {
  background: var(--grad-primary);
  border: none;
  color: white;
  padding: 6px 14px;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.25);
}

.lightbox-action-btn:hover {
  background: var(--grad-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(168, 85, 247, 0.4);
}

/* Header Actions Layout */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Theme Toggle Button Styles (Adapted from ThemeButton.vue) */
.theme-toggle-wrapper {
  position: relative;
  width: 72px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  view-transition-name: theme-toggle;
}

::view-transition-group(theme-toggle) {
  animation: none;
  z-index: 1000;
}

::view-transition-old(theme-toggle) {
  display: none;
}

::view-transition-new(theme-toggle) {
  animation: none;
  opacity: 1;
  mix-blend-mode: normal;
}

.tb-container {
  position: absolute;
  width: 180em;
  height: 70em;
  font-size: 1px;
  transform: scale(0.4);
  transform-origin: center;
  display: inline-block;
  vertical-align: bottom;
  cursor: pointer;
}

.tb-components {
  position: absolute;
  top: 0;
  left: 0;
  width: 180em;
  height: 70em;
  border-radius: 100em;
  box-shadow: inset 0 0 5em 3em rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transition: 0.7s cubic-bezier(0, 0.5, 1, 1);
  background-color: rgba(70, 133, 192, 1); /* Daytime light mode bg */
  will-change: background-color, box-shadow;
  transform: translateZ(0); /* Hardware acceleration */
}

/* Dark mode components background */
body:not(.light-mode) .tb-components {
  background-color: rgba(25, 30, 50, 1); /* Night dark mode bg */
}

.tb-main-button {
  position: absolute;
  z-index: 10;
  margin: 7.5em 0 0 7.5em;
  width: 55em;
  height: 55em;
  border-radius: 50%;
  transition: 1.0s cubic-bezier(0.56, 1.35, 0.52, 1.00);
  background-color: rgba(255, 195, 35, 1); /* Sun */
  box-shadow: 3em 3em 5em rgba(0, 0, 0, 0.3), inset -3em -5em 3em -3em rgba(0, 0, 0, 0.3), inset 4em 5em 2em -2em rgba(255, 230, 80, 1);
  will-change: transform, background-color, box-shadow;
}

/* Sun moves to Moon in Dark Mode */
body:not(.light-mode) .tb-main-button {
  transform: translateX(110em);
  background-color: rgba(195, 200, 210, 1); /* Moon */
  box-shadow: 3em 3em 5em rgba(0, 0, 0, 0.5), inset -3em -5em 3em -3em rgba(0, 0, 0, 0.5), inset 4em 5em 2em -2em rgba(255, 255, 210, 1);
}

.tb-moon {
  position: absolute;
  background-color: rgba(150, 160, 180, 1);
  box-shadow: inset 0em 0em 1em 1em rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  transition: 0.5s ease;
  opacity: 0;
}

body:not(.light-mode) .tb-moon {
  opacity: 1;
}

.tb-moon:nth-child(1) {
  top: 7.5em;
  left: 25em;
  width: 12.5em;
  height: 12.5em;
}

.tb-moon:nth-child(2) {
  top: 20em;
  left: 7.5em;
  width: 20em;
  height: 20em;
}

.tb-moon:nth-child(3) {
  top: 32.5em;
  left: 32.5em;
  width: 12.5em;
  height: 12.5em;
}

.tb-daytime-background {
  position: absolute;
  border-radius: 50%;
  transition: 1.0s cubic-bezier(0.56, 1.35, 0.52, 1.00);
  will-change: transform;
}

/* Light mode ring glow */
.tb-daytime-background:nth-child(2) {
  top: -20em;
  left: -20em;
  width: 110em;
  height: 110em;
  background-color: rgba(255, 255, 255, 0.2);
  z-index: 1;
}

.tb-daytime-background:nth-child(3) {
  top: -32.5em;
  left: -17.5em;
  width: 135em;
  height: 135em;
  background-color: rgba(255, 255, 255, 0.1);
  z-index: 0;
}

.tb-daytime-background:nth-child(4) {
  top: -45em;
  left: -15em;
  width: 160em;
  height: 160em;
  background-color: rgba(255, 255, 255, 0.05);
  z-index: -1;
}

/* Light Mode Ring positions (when body is light-mode) */
body.light-mode .tb-daytime-background:nth-child(2) { transform: translateX(0); }
body.light-mode .tb-daytime-background:nth-child(3) { transform: translateX(0); }
body.light-mode .tb-daytime-background:nth-child(4) { transform: translateX(0); }

/* Dark Mode Ring positions (displaced out of view) */
body:not(.light-mode) .tb-daytime-background:nth-child(2) { transform: translateX(110em); }
body:not(.light-mode) .tb-daytime-background:nth-child(3) { transform: translateX(80em); }
body:not(.light-mode) .tb-daytime-background:nth-child(4) { transform: translateX(50em); }

/* Cloud shapes and animations */
.tb-cloud,
.tb-cloud-light {
  position: absolute;
  transition: 1.0s cubic-bezier(0.56, 1.35, 0.52, 1.00);
  will-change: transform;
}

.tb-cloud {
  z-index: 5;
}

.tb-cloud-light {
  right: 0em;
  bottom: 25em;
  opacity: 0.5;
  z-index: 4;
}

/* Cloud moves up in light mode, down in dark mode */
body.light-mode .tb-cloud,
body.light-mode .tb-cloud-light {
  transform: translateY(10em);
}

body:not(.light-mode) .tb-cloud,
body:not(.light-mode) .tb-cloud-light {
  transform: translateY(80em);
}

.tb-cloud-son {
  position: absolute;
  background-color: #fff;
  border-radius: 50%;
}

.tb-cloud-son:nth-child(6n+1) { right: -20em; bottom: 10em; width: 50em; height: 50em; }
.tb-cloud-son:nth-child(6n+2) { right: -10em; bottom: -25em; width: 60em; height: 60em; }
.tb-cloud-son:nth-child(6n+3) { right: 20em; bottom: -40em; width: 60em; height: 60em; }
.tb-cloud-son:nth-child(6n+4) { right: 50em; bottom: -35em; width: 60em; height: 60em; }
.tb-cloud-son:nth-child(6n+5) { right: 75em; bottom: -60em; width: 75em; height: 75em; }
.tb-cloud-son:nth-child(6n+6) { right: 110em; bottom: -50em; width: 60em; height: 60em; }

/* Subtle Cloud Wiggles (Replaces setInterval JS logic) */
@keyframes tb-cloud-wiggle-odd {
  0% { transform: translate(0, 0); }
  50% { transform: translate(2em, -2em); }
  100% { transform: translate(0, 0); }
}

@keyframes tb-cloud-wiggle-even {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-2em, 2em); }
  100% { transform: translate(0, 0); }
}

.tb-cloud-son:nth-child(odd) {
  animation: tb-cloud-wiggle-odd 5s infinite ease-in-out;
}

.tb-cloud-son:nth-child(even) {
  animation: tb-cloud-wiggle-even 6s infinite ease-in-out;
}

/* Stars styling */
.tb-stars {
  position: absolute;
  z-index: 3;
  transition: 1.0s cubic-bezier(0.56, 1.35, 0.52, 1.00);
}

body.light-mode .tb-stars {
  transform: translateY(-125em);
  opacity: 0;
}

body:not(.light-mode) .tb-stars {
  transform: translateY(-62.5em);
  opacity: 1;
}

.tb-big { --size: 7.5em; }
.tb-medium { --size: 5em; }
.tb-small { --size: 3em; }

.tb-star {
  position: absolute;
  width: calc(2 * var(--size));
  height: calc(2 * var(--size));
  transform: scale(1);
  transition: 1s cubic-bezier(0.56, 1.35, 0.52, 1.00);
}

.tb-star:nth-child(1) { top: 11em; left: 39em; animation: tb-star-anim 3.5s infinite alternate linear; }
.tb-star:nth-child(2) { top: 39em; left: 91em; animation: tb-star-anim 4.1s infinite alternate linear; }
.tb-star:nth-child(3) { top: 26em; left: 19em; animation: tb-star-anim 4.9s infinite alternate linear; }
.tb-star:nth-child(4) { top: 37em; left: 66em; animation: tb-star-anim 5.3s infinite alternate linear; }
.tb-star:nth-child(5) { top: 21em; left: 75em; animation: tb-star-anim 3s infinite alternate linear; }
.tb-star:nth-child(6) { top: 51em; left: 38em; animation: tb-star-anim 2.2s infinite alternate linear; }

@keyframes tb-star-anim {
  0%, 20% { transform: scale(0); }
  20%, 100% { transform: scale(1); }
}

.tb-star-son {
  float: left;
  width: var(--size);
  height: var(--size);
}

.tb-star-son:nth-child(1) { background-image: radial-gradient(circle var(--size) at left 0, transparent var(--size), #fff); }
.tb-star-son:nth-child(2) { background-image: radial-gradient(circle var(--size) at right 0, transparent var(--size), #fff); }
.tb-star-son:nth-child(3) { background-image: radial-gradient(circle var(--size) at 0 bottom, transparent var(--size), #fff); }
.tb-star-son:nth-child(4) { background-image: radial-gradient(circle var(--size) at right bottom, transparent var(--size), #fff); }

/* Theme Button Hover Transitions (CSS-only hover effects) */
/* Hover effect when light mode */
body.light-mode .tb-container:hover .tb-main-button { transform: translateX(10em); }
body.light-mode .tb-container:hover .tb-daytime-background:nth-child(2) { transform: translateX(10em); }
body.light-mode .tb-container:hover .tb-daytime-background:nth-child(3) { transform: translateX(7em); }
body.light-mode .tb-container:hover .tb-daytime-background:nth-child(4) { transform: translateX(4em); }

/* Hover effect when dark mode */
body:not(.light-mode) .tb-container:hover .tb-main-button { transform: translateX(100em); }
body:not(.light-mode) .tb-container:hover .tb-daytime-background:nth-child(2) { transform: translateX(100em); }
body:not(.light-mode) .tb-container:hover .tb-daytime-background:nth-child(3) { transform: translateX(73em); }
body:not(.light-mode) .tb-container:hover .tb-daytime-background:nth-child(4) { transform: translateX(46em); }

/* Circular Theme Reveal View Transition Support */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-old(root) {
  opacity: 1;
}
::view-transition-new(root) {
  opacity: 1;
}

/* Settings Button */
.settings-btn {
  padding: 6px;
  border-radius: 8px;
  background: var(--button-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.settings-btn:hover {
  background: var(--button-bg-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: rotate(30deg);
}

/* API Modal Backdrop */
.api-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 10, 16, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.api-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* API Modal Content */
.api-modal-content {
  width: 90%;
  max-width: 440px;
  padding: 1.75rem;
  border-radius: 16px;
  animation: modalSlideIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes modalSlideIn {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.api-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}
.api-modal-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 4px;
  border-radius: 50%;
}
.modal-close-btn:hover {
  background: var(--button-bg-hover);
  color: var(--text-primary);
}

.api-modal-body {
  margin-bottom: 1.75rem;
}
.api-modal-tip {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.api-key-input-wrapper {
  position: relative;
  width: 100%;
}
.api-key-input-wrapper input {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 0.75rem;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: monospace;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.25s ease;
}
.api-key-input-wrapper input:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.15);
  background: var(--input-bg-focus);
}

.toggle-password-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}
.toggle-password-btn:hover {
  color: var(--text-primary);
}

.api-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}
.modal-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.modal-btn.primary-btn {
  background: var(--grad-primary);
  border: none;
  color: white;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
}
.modal-btn.primary-btn:hover {
  background: var(--grad-primary-hover);
  box-shadow: 0 6px 16px rgba(168, 85, 247, 0.3);
  transform: translateY(-1px);
}
.modal-btn.secondary-btn {
  background: var(--button-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}
.modal-btn.secondary-btn:hover {
  background: var(--button-bg-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* Shake Animation for Input validation errors */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}
.error-shake {
  animation: shake 0.5s ease-in-out;
  border-color: var(--error) !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2) !important;
}

/* Repository Link Button */
.repo-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Responsive Design System */
@media (max-width: 768px) {
  /* Main Container & Layout */
  .app-container {
    padding: 1rem;
  }
  
  .app-header {
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }
  
  .logo-area {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .header-actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  
  .api-status {
    width: 100%;
    justify-content: center;
    order: 5; /* Place status indicator at the end on mobile */
  }

  .workspace-grid {
    gap: 1.25rem;
  }

  .glass-card {
    padding: 1.5rem;
    border-radius: 16px;
  }

  /* Control Panel Tweaks */
  .section-title:not(:first-child) {
    margin-top: 1.5rem;
  }
  
  .aspect-grid {
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 0.5rem;
  }
  
  .aspect-card {
    padding: 0.6rem 0.25rem;
  }
  
  .aspect-card .ratio-desc {
    font-size: 0.6rem;
  }

  .qty-btn {
    padding: 0.6rem 0.25rem;
    font-size: 0.75rem;
  }

  .generate-btn {
    padding: 0.85rem 1.5rem;
    font-size: 0.9rem;
  }

  /* Batch Preview & Dynamic Grid */
  .batch-header-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .batch-header-info .batch-actions {
    width: 100%;
    display: flex;
    gap: 0.5rem;
  }
  
  .batch-header-info .batch-actions button {
    flex: 1;
    justify-content: center;
  }

  .batch-preview-grid.grid-3,
  .batch-preview-grid.grid-4,
  .batch-preview-grid.grid-5,
  .batch-preview-grid.grid-6 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }

  /* Mobile overlay solution: always show action buttons with gradient bottom */
  .batch-item-hover {
    opacity: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
    backdrop-filter: none;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 8px;
    gap: 6px;
  }
  
  .batch-btn {
    width: 32px;
    height: 32px;
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(255, 255, 255, 0.15);
  }
  
  /* Lightbox Navigation for Mobile */
  .lightbox-content {
    max-width: 92%;
    max-height: 85%;
    gap: 1rem;
  }
  
  .lightbox-image {
    max-height: 55vh;
  }
  
  .lightbox-counter {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .app-container {
    padding: 0.75rem;
  }
  
  .glass-card {
    padding: 1.25rem;
    border-radius: 12px;
  }

  .logo-text h1 {
    font-size: 1.25rem;
  }
  
  .aspect-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Footer details */
  .app-footer-bar {
    padding: 1.5rem 0.5rem;
    text-align: center;
  }
  
  .app-footer-bar p {
    font-size: 0.65rem;
    line-height: 1.4;
  }
  
  /* API Configuration Modal Mobile Optimization */
  .api-modal-content {
    padding: 1.25rem;
    width: 95%;
  }
  
  .api-modal-footer {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }
  
  .api-modal-footer button {
    width: 100%;
    justify-content: center;
  }
}

/* Spinner Utilities */
.spin-icon {
  animation: spin 1s linear infinite !important;
}



