/* CSS Reset & Variables */
:root {
  /* Default: Dark Theme */
  --bg-color: #0b0f19;
  --panel-bg: rgba(21, 30, 51, 0.6);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-primary: #6366f1; /* Indigo */
  --accent-secondary: #a855f7; /* Purple */
  --accent-gradient: linear-gradient(135deg, #6366f1, #a855f7);
  --accent-glow: rgba(99, 102, 241, 0.15);
  
  --input-bg: rgba(15, 23, 42, 0.6);
  --input-border: rgba(255, 255, 255, 0.1);
  --input-focus-border: #6366f1;
  --input-focus-glow: rgba(99, 102, 241, 0.25);
  
  --btn-primary-bg: var(--accent-gradient);
  --btn-primary-text: #ffffff;
  --btn-secondary-bg: rgba(255, 255, 255, 0.05);
  --btn-secondary-text: #f8fafc;
  --btn-secondary-border: rgba(255, 255, 255, 0.1);
  
  --danger-color: #ef4444;
  --success-color: #10b981;
  
  --glow-1-color: rgba(99, 102, 241, 0.25);
  --glow-2-color: rgba(168, 85, 247, 0.2);
  --glow-3-color: rgba(16, 185, 129, 0.15);
  
  --shadow-main: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  --border-radius-lg: 20px;
  --border-radius-md: 12px;
  --border-radius-sm: 8px;
}

[data-theme="light"] {
  --bg-color: #f8fafc;
  --panel-bg: rgba(255, 255, 255, 0.7);
  --panel-border: rgba(0, 0, 0, 0.06);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --accent-primary: #4f46e5;
  --accent-secondary: #9333ea;
  --accent-gradient: linear-gradient(135deg, #4f46e5, #9333ea);
  --accent-glow: rgba(79, 70, 229, 0.1);
  
  --input-bg: rgba(255, 255, 255, 0.9);
  --input-border: rgba(0, 0, 0, 0.1);
  --input-focus-border: #4f46e5;
  --input-focus-glow: rgba(79, 70, 229, 0.15);
  
  --btn-primary-bg: var(--accent-gradient);
  --btn-primary-text: #ffffff;
  --btn-secondary-bg: rgba(0, 0, 0, 0.02);
  --btn-secondary-text: #0f172a;
  --btn-secondary-border: rgba(0, 0, 0, 0.08);
  
  --glow-1-color: rgba(79, 70, 229, 0.1);
  --glow-2-color: rgba(147, 51, 234, 0.08);
  --glow-3-color: rgba(16, 185, 129, 0.05);
  
  --shadow-main: 0 20px 40px -15px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
  line-height: 1.5;
}

/* Ambient Glow Backgrounds */
.glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.8;
  transition: all 0.5s ease;
}

.glow-1 {
  top: -100px;
  left: -100px;
  background-color: var(--glow-1-color);
}

.glow-2 {
  bottom: -150px;
  right: -50px;
  background-color: var(--glow-2-color);
}

.glow-3 {
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--glow-3-color);
  width: 600px;
  height: 600px;
  opacity: 0.5;
}

/* Glassmorphic Panel Base */
.glass-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-main);
  transition: background 0.4s ease, border-color 0.4s ease;
}

/* Layout */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-height: 100vh;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo-container {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-md);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 3px;
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--panel-border);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text p {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Theme Toggle Button */
.theme-btn {
  background: var(--btn-secondary-bg);
  border: 1px solid var(--btn-secondary-border);
  width: 44px;
  height: 44px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-btn:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-primary);
}

.theme-btn i {
  width: 20px;
  height: 20px;
}

/* Display sun/moon based on theme */
.light-icon { display: none; }
[data-theme="light"] .dark-icon { display: none; }
[data-theme="light"] .light-icon { display: block; }

/* Main Columns */
.app-main {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .app-main {
    grid-template-columns: 1fr;
  }
}

/* Card Header Shared */
.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--panel-border);
}

.card-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.header-icon {
  width: 20px;
  height: 20px;
  color: var(--accent-primary);
}

/* Form Styling */
.controls-card {
  display: flex;
  flex-direction: column;
}

/* Mode Selection Tabs */
.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius-md);
  padding: 4px;
  margin: 1.5rem 1.5rem 0 1.5rem;
  gap: 4px;
}

.mode-tab {
  border: none;
  outline: none;
  background: transparent;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-radius: calc(var(--border-radius-md) - 2px);
  color: var(--text-muted);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mode-tab:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.02);
}

.mode-tab.active {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.mode-tab i {
  width: 16px;
  height: 16px;
}

.input-group {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}

.required {
  color: var(--danger-color);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius-md);
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.input-wrapper input:focus {
  border-color: var(--input-focus-border);
  box-shadow: 0 0 0 4px var(--input-focus-glow);
}

.input-icon {
  position: absolute;
  left: 1rem;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

/* Accordion Options */
.accordion {
  border-top: 1px solid var(--panel-border);
}

.accordion-item {
  border-bottom: 1px solid var(--panel-border);
}

.accordion-item:last-child {
  border-bottom: none;
  border-bottom-left-radius: var(--border-radius-lg);
  border-bottom-right-radius: var(--border-radius-lg);
}

.accordion-trigger {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-main);
  transition: background-color 0.2s ease;
  outline: none;
}

.accordion-trigger:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.trigger-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
}

.trigger-title i {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.chevron {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item.active .chevron {
  transform: rotate(180deg);
  color: var(--accent-primary);
}

.accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.accordion-item.active .accordion-content {
  grid-template-rows: 1fr;
}

.accordion-inner {
  min-height: 0;
  padding: 0 1.5rem 1.5rem 1.5rem;
}

/* Align actual accordion padding */
.accordion-content .color-pickers-grid,
.accordion-content .toggle-group,
.accordion-content .advanced-grid {
  padding: 0.5rem 1.5rem 1.5rem 1.5rem;
}

/* Colors Panel styling */
.color-pickers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 480px) {
  .color-pickers-grid {
    grid-template-columns: 1fr;
  }
}

.color-picker-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.color-picker-group label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.color-input-wrapper {
  display: flex;
  gap: 0.5rem;
}

.color-input-wrapper input[type="color"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 46px;
  height: 42px;
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius-md);
  background: transparent;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch {
  border: none;
}

.color-input-wrapper input[type="color"]::-moz-color-swatch {
  border: none;
}

.color-input-wrapper input[type="text"] {
  flex-grow: 1;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius-md);
  color: var(--text-main);
  font-size: 0.9375rem;
  padding: 0 0.75rem;
  outline: none;
  font-family: monospace;
  text-transform: uppercase;
  transition: border-color 0.3s ease;
}

.color-input-wrapper input[type="text"]:focus {
  border-color: var(--input-focus-border);
}

/* Switch (Toggle button) */
.toggle-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.toggle-group label {
  font-size: 0.9375rem;
  font-weight: 600;
}

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--btn-secondary-bg);
  border: 1px solid var(--input-border);
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
}

.switch input:checked + .slider {
  background: var(--accent-gradient);
  border-color: transparent;
}

.switch input:checked + .slider:before {
  transform: translateX(22px);
  background-color: #ffffff;
}

.disabled-opacity {
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#logoUploadSection:not(.disabled-opacity) {
  opacity: 1;
  pointer-events: auto;
}

/* Logo drag & drop zone */
.drag-drop-zone {
  border: 2px dashed var(--input-border);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: var(--input-bg);
  position: relative;
  overflow: hidden;
}

.drag-drop-zone.dragover {
  border-color: var(--accent-primary);
  background-color: var(--accent-glow);
}

.upload-icon {
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.upload-text {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.upload-text span {
  color: var(--accent-primary);
  font-weight: 600;
}

.upload-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Logo Preview Row */
.logo-preview-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--btn-secondary-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius-md);
}

.logo-preview-wrapper {
  position: relative;
  width: 48px;
  height: 48px;
}

.logo-preview-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--border-radius-sm);
  background: #ffffff;
  padding: 2px;
  border: 1px solid var(--input-border);
}

.remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: var(--danger-color);
  color: white;
  border: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.remove-btn i {
  width: 12px;
  height: 12px;
}

.logo-name-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.file-name {
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Slider Controls */
.slider-group {
  margin-top: 1.25rem;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--input-border);
  outline: none;
  margin: 0.5rem 0;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  background: var(--accent-gradient);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
  transition: transform 0.1s ease;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.range-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: var(--accent-primary);
  background: var(--accent-gradient);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
  transition: transform 0.1s ease;
}

.range-slider::-moz-range-thumb:hover {
  transform: scale(1.15);
}

.range-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Select controls */
.custom-select {
  width: 100%;
  padding: 0.8125rem 1rem;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius-md);
  color: var(--text-main);
  font-size: 0.875rem;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px;
  padding-right: 2.5rem;
}

.custom-select:focus {
  border-color: var(--input-focus-border);
  box-shadow: 0 0 0 4px var(--input-focus-glow);
}

.advanced-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Right Column: Preview display */
.preview-card {
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

.preview-display {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 2rem;
  border-bottom: 1px solid var(--panel-border);
  flex-grow: 1;
  min-height: 320px;
}

.qr-box {
  width: 250px;
  height: 250px;
  background-color: #ffffff;
  border-radius: var(--border-radius-md);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  padding: 12px;
}

/* Glow when active and QR loaded */
.qr-box.active {
  transform: scale(1.02);
  box-shadow: 0 15px 40px var(--accent-glow);
}

.qr-box canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  display: block;
}

.qr-placeholder-content {
  text-align: center;
  color: #64748b;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Light mode specific adjustment for empty placeholder */
[data-theme="light"] .qr-placeholder-content {
  color: #64748b;
}
.qr-box:not(.has-qr) {
  background-color: var(--input-bg);
  border: 1px dashed var(--input-border);
  box-shadow: none;
}

.qr-icon-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--btn-secondary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.qr-icon-large i {
  width: 32px;
  height: 32px;
}

.qr-placeholder-content p {
  font-size: 0.8125rem;
  max-width: 180px;
  line-height: 1.4;
  font-weight: 500;
}

/* Action buttons */
.preview-actions {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.download-button-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  font-family: 'Outfit', sans-serif;
  height: 48px;
}

.btn i {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border: none;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  border: 1px solid var(--btn-secondary-border);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.btn-secondary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-icon {
  background: var(--btn-secondary-bg);
  color: var(--text-main);
  border: 1px solid var(--btn-secondary-border);
}

.btn-icon:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.btn-icon:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.btn-danger-text {
  color: var(--danger-color);
  background: transparent;
  border: none;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  height: auto;
  border-radius: var(--border-radius-sm);
}

.btn-danger-text:hover {
  background: rgba(239, 68, 68, 0.08);
}

/* History styling */
.history-panel {
  display: flex;
  flex-direction: column;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--panel-border);
}

.title-with-count {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.title-with-count h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
}

.badge {
  background-color: var(--accent-primary);
  background: var(--accent-gradient);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  padding: 1.5rem;
}

.history-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 2.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.history-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background-color: var(--btn-secondary-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius-md);
  transition: all 0.3s ease;
  align-items: center;
  cursor: pointer;
}

.history-item:hover {
  border-color: var(--accent-primary);
  background-color: rgba(99, 102, 241, 0.04);
  transform: translateY(-2px);
}

.history-img-wrapper {
  width: 60px;
  height: 60px;
  background: white;
  border-radius: var(--border-radius-sm);
  padding: 4px;
  flex-shrink: 0;
  border: 1px solid var(--input-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.history-details {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.history-text {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.history-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.history-actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.history-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.history-btn:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.08);
}

.history-btn.delete-btn:hover {
  color: var(--danger-color);
  background-color: rgba(239, 68, 68, 0.08);
}

.history-btn i {
  width: 14px;
  height: 14px;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background-color: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme="light"] .toast {
  background-color: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  color: #0f172a;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.toast.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(20px);
}

.toast-icon {
  width: 18px;
  height: 18px;
  color: var(--success-color);
}

.toast-message {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Footer styling */
.app-footer {
  text-align: center;
  padding: 1rem 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  border-top: 1px solid var(--panel-border);
  margin-top: auto;
}

/* Animations & Transitions */
.hidden {
  display: none !important;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.8; }
}

.glow-1 { animation: pulse 8s infinite alternate; }
.glow-2 { animation: pulse 12s infinite alternate-reverse; }
