/* Custom Glassmorphism & Premium UI Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', sans-serif;
}

body {
  font-family: var(--font-sans);
  background: radial-gradient(circle at top left, #0f172a, #020617);
  color: #f8fafc;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
}

/* Glassmorphism Styles */
.glass-panel {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-card {
  background: rgba(30, 41, 59, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.15);
  transform: translateY(-2px);
}

.glass-input {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  transition: all 0.2s ease-in-out;
}

.glass-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
  outline: none;
}

/* Quill Editor Dark Theme Overrides */
.ql-toolbar.ql-snow {
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-top-left-radius: 0.75rem !important;
  border-top-right-radius: 0.75rem !important;
  padding: 0.75rem !important;
}

.ql-container.ql-snow {
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-bottom-left-radius: 0.75rem !important;
  border-bottom-right-radius: 0.75rem !important;
  background: rgba(15, 23, 42, 0.45) !important;
  font-family: var(--font-sans) !important;
  font-size: 1rem !important;
  color: #f1f5f9 !important;
  min-height: 250px;
}

.ql-editor {
  min-height: 250px;
}

.ql-editor.ql-blank::before {
  color: #64748b !important;
  font-style: normal !important;
}

.ql-snow .ql-stroke {
  stroke: #94a3b8 !important;
}

.ql-snow .ql-fill {
  fill: #94a3b8 !important;
}

.ql-snow .ql-picker {
  color: #94a3b8 !important;
}

.ql-snow .ql-picker-options {
  background-color: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.ql-snow.ql-toolbar button:hover,
.ql-snow .ql-toolbar button:hover,
.ql-snow.ql-toolbar button:focus,
.ql-snow .ql-toolbar button:focus,
.ql-snow.ql-toolbar button.ql-active,
.ql-snow .ql-toolbar button.ql-active,
.ql-snow.ql-toolbar .ql-picker-label:hover,
.ql-snow .ql-toolbar .ql-picker-label:hover,
.ql-snow.ql-toolbar .ql-picker-label.ql-active,
.ql-snow .ql-toolbar .ql-picker-label.ql-active,
.ql-snow.ql-toolbar .ql-picker-item:hover,
.ql-snow .ql-toolbar .ql-picker-item:hover,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected {
  color: #818cf8 !important;
}

.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow .ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button.ql-active .ql-stroke,
.ql-snow .ql-toolbar button.ql-active .ql-stroke {
  stroke: #818cf8 !important;
}

.ql-snow.ql-toolbar button:hover .ql-fill,
.ql-snow .ql-toolbar button:hover .ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-fill,
.ql-snow .ql-toolbar button.ql-active .ql-fill {
  fill: #818cf8 !important;
}

/* Animations */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
  }
  50% {
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.7);
  }
}

.glow-active {
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes progressShrink {
  from { width: 100%; }
  to { width: 0%; }
}

.countdown-bar-fill {
  transition: width 1s linear;
}

/* Fade in elements */
.fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* ==========================================================================
   Light Mode Theme Overrides
   ========================================================================== */

/* Light mode base body styles */
html.light body {
  background: radial-gradient(circle at top left, #f8fafc, #e2e8f0);
  color: #0f172a;
}

/* Light mode panels & cards */
html.light .glass-panel {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.08);
}

html.light .glass-card {
  background: rgba(241, 245, 249, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

html.light .glass-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.1);
}

/* Light mode inputs & textareas */
html.light .glass-input {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: #0f172a;
}

html.light .glass-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

html.light .glass-input::placeholder {
  color: #94a3b8;
}

/* Light mode Quill text editor */
html.light .ql-toolbar.ql-snow {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
}

html.light .ql-container.ql-snow {
  background: rgba(255, 255, 255, 0.6) !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  color: #0f172a !important;
}

html.light .ql-snow .ql-stroke {
  stroke: #475569 !important;
}

html.light .ql-snow .ql-fill {
  fill: #475569 !important;
}

html.light .ql-snow .ql-picker {
  color: #475569 !important;
}

html.light .ql-snow .ql-picker-options {
  background-color: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* Light mode Tailwind text & bg overrides */
html.light .text-slate-100,
html.light .text-slate-200,
html.light .text-slate-300,
html.light .text-slate-400 {
  color: #1e293b !important; /* slate-800 */
}

html.light .text-slate-500 {
  color: #64748b !important; /* slate-500 */
}

html.light .bg-slate-950\/40,
html.light .bg-slate-900\/60,
html.light .bg-slate-900 {
  background-color: rgba(241, 245, 249, 0.9) !important;
  color: #0f172a !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

html.light .border-white\/5 {
  border-color: rgba(0, 0, 0, 0.08) !important;
}

html.light .text-indigo-400,
html.light .text-amber-400 {
  color: #4f46e5 !important; /* indigo-600 */
}

html.light #expiry-countdown {
  color: #4f46e5 !important;
}

html.light #save-status {
  background-color: rgba(241, 245, 249, 0.9) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #475569 !important;
}

