/* OmniDeck Convert - Modern SaaS Design System */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition-smooth: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-surface-subtle: #f1f5f9;
  --bg-input: #f8fafc;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #6366f1;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --accent-subtle: rgba(99, 102, 241, 0.08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
  --card-glass: rgba(255, 255, 255, 0.85);
  --card-glass-border: rgba(226, 232, 240, 0.8);
}

/* Dark Theme Variables (Default) */
[data-theme="dark"] {
  --bg-app: #090d16;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #1e293b;
  --bg-surface-subtle: #141e33;
  --bg-input: #0b1120;
  --border-subtle: #1e293b;
  --border-strong: #334155;
  --border-focus: #818cf8;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-primary: #6366f1;
  --accent-primary-hover: #818cf8;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --accent-subtle: rgba(99, 102, 241, 0.15);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.25);
  --card-glass: rgba(15, 23, 42, 0.75);
  --card-glass-border: rgba(255, 255, 255, 0.08);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Number font */
.font-mono-nums {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum' 1, 'zero' 1;
}

/* Glassmorphism Card */
.glass-panel {
  background: var(--card-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-glass-border);
  box-shadow: var(--shadow-md);
}

.glass-panel-glow {
  position: relative;
}
.glass-panel-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: var(--accent-gradient);
  border-radius: inherit;
  z-index: -1;
  opacity: 0.15;
  filter: blur(10px);
  transition: opacity 0.3s ease;
}
.glass-panel-glow:hover::before {
  opacity: 0.3;
}

/* Input Fields */
.modern-input {
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-mono);
  transition: var(--transition-smooth);
}
.modern-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

/* Category Nav Active */
.category-btn {
  transition: var(--transition-smooth);
}
.category-btn.active {
  background: var(--accent-subtle);
  color: var(--accent-primary);
  font-weight: 600;
  border-color: rgba(99, 102, 241, 0.4);
}
[data-theme="dark"] .category-btn.active {
  color: #a5b4fc;
}

/* Unit Dropdown Custom styling */
.unit-select-custom {
  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'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25em 1.25em;
  padding-right: 2.5rem;
}

/* Swap button rotation */
.swap-btn {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, box-shadow 0.2s ease;
}
.swap-btn:hover {
  transform: rotate(180deg) scale(1.08);
}
.swap-btn:active {
  transform: rotate(180deg) scale(0.95);
}

/* Popular pill tags */
.popular-pill {
  transition: var(--transition-smooth);
}
.popular-pill:hover {
  transform: translateY(-1px);
  border-color: var(--accent-primary);
  background-color: var(--accent-subtle);
}

/* Toast System */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(1rem) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(1rem) scale(0.95);
  }
}

/* Quick search spotlight modal */
.search-backdrop {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.65);
}

/* Table Row Highlights */
.matrix-row {
  transition: var(--transition-smooth);
}
.matrix-row:hover {
  background-color: var(--bg-surface-subtle);
}
.matrix-row.highlighted {
  background: var(--accent-subtle);
  border-left: 3px solid var(--accent-primary);
}

/* Copy button feedback */
.copy-btn {
  transition: var(--transition-smooth);
}
.copy-btn:active {
  transform: scale(0.92);
}

/* Tab Active states */
.tab-item.active {
  color: var(--accent-primary);
  border-bottom: 2px solid var(--accent-primary);
}

/* Shimmer pulse for real-time calculation update */
@keyframes subtlePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.01); filter: brightness(1.1); }
  100% { transform: scale(1); }
}
.pulse-on-calc {
  animation: subtlePulse 0.25s ease-out;
}

/* Ad Slot Container Styling */
.ad-slot-wrapper {
  transition: var(--transition-smooth);
}
.ad-slot-wrapper:hover {
  border-color: rgba(99, 102, 241, 0.25);
}
.ad-slot-wrapper ins.adsbygoogle {
  display: block;
  margin: 0 auto;
}

