/* ==========================================================================
   SobiTools - Stitch-Accurate Design System
   Matches Google Stitch exports: Dark Navy/Black with Vibrant Mint Accent
   ========================================================================== */

:root {
  /* Color Palette - Dark Theme (Default) */
  --bg-main: #070d10;
  --bg-surface: #0e161c;
  --bg-surface-elevated: #131e26;
  --bg-card: #0f1920;
  --bg-card-hover: #15222c;
  --bg-input: #0a1116;
  
  --border-subtle: #16242e;
  --border-focus: #10b981;
  --border-card: #15232d;
  --border-light: rgba(255, 255, 255, 0.08);

  --accent-primary: #10b981;
  --accent-hover: #059669;
  --accent-light: rgba(16, 185, 129, 0.12);
  --accent-glow: rgba(16, 185, 129, 0.25);
  --accent-gradient: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --text-inverse: #070d10;

  --badge-bg: rgba(16, 185, 129, 0.1);
  --badge-border: rgba(16, 185, 129, 0.25);
  --badge-text: #34d399;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  --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 12px 30px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.2);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #f1f5f9;

  --border-subtle: #e2e8f0;
  --border-focus: #059669;
  --border-card: #e2e8f0;
  --border-light: rgba(0, 0, 0, 0.06);

  --accent-primary: #059669;
  --accent-hover: #047857;
  --accent-light: rgba(5, 150, 105, 0.08);
  --accent-glow: rgba(5, 150, 105, 0.15);
  --accent-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #94a3b8;
  --text-inverse: #ffffff;

  --badge-bg: rgba(5, 150, 105, 0.08);
  --badge-border: rgba(5, 150, 105, 0.2);
  --badge-text: #059669;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(5, 150, 105, 0.12);
}

/* ==========================================================================
   Base & Resets
   ========================================================================== */

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--bg-main);
  color: var(--text-main);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(16, 185, 129, 0.08), transparent),
    radial-gradient(circle at 100% 30%, rgba(16, 185, 129, 0.03), transparent 40%);
  background-attachment: fixed;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 13, 16, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.88);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}

/* Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: #10b981;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #070d10;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Nav links */
.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
  background: var(--bg-surface-elevated);
}

/* Header right controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 7px 14px;
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: var(--transition);
}

.search-trigger:hover {
  border-color: var(--border-focus);
  color: var(--text-main);
  box-shadow: 0 0 10px var(--accent-glow);
}

.kbd-badge {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-subtle);
}

.btn-all-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #070d10;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.btn-all-tools:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

[data-theme="light"] .btn-all-tools {
  background: #0f172a;
  color: #ffffff;
}

[data-theme="light"] .btn-all-tools:hover {
  background: #1e293b;
}

.btn-theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  transition: var(--transition);
}

.btn-theme-toggle:hover {
  color: var(--text-main);
  border-color: var(--border-focus);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  padding: 56px 0 64px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

/* Left Hero */
.hero-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.badge-tools-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  color: var(--badge-text);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  width: fit-content;
}

.pulsing-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-primary);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-main);
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-description {
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 580px;
}

/* Hero Search Bar */
.hero-search-wrap {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin-top: 6px;
}

.hero-search-box {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  gap: 12px;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.hero-search-box:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 16px var(--accent-glow);
}

.hero-search-box svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.hero-search-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.98rem;
  outline: none;
}

.hero-search-input::placeholder {
  color: var(--text-subtle);
}

/* Quick shortcut pills */
.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.quick-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  transition: var(--transition);
}

.quick-tag:hover {
  border-color: var(--border-focus);
  color: var(--text-main);
  background: var(--bg-surface-elevated);
  transform: translateY(-1px);
}

.quick-tag svg {
  opacity: 0.7;
}

/* Right Hero: Live Conversions Card */
.hero-right {
  display: flex;
  justify-content: flex-end;
}

.live-conversions-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.live-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.live-card-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  text-transform: uppercase;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #10b981;
}

.live-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

.live-items-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.live-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: var(--transition);
}

.live-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-subtle);
}

.live-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-file-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.live-file-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.live-filename {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.live-time {
  font-size: 0.75rem;
  color: var(--text-subtle);
  white-space: nowrap;
}

/* Card bottom progress ticker */
.live-progress-container {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.live-progress-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.live-progress-fill {
  height: 100%;
  width: 60%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px var(--accent-primary);
  animation: live-ticker-bar 3.5s ease-in-out infinite;
}

@keyframes live-ticker-bar {
  0% { width: 15%; margin-left: 0; }
  50% { width: 85%; margin-left: 10%; }
  100% { width: 25%; margin-left: 75%; }
}

/* ==========================================================================
   Tool Directory & Category Navigation
   ========================================================================== */

.tools-section {
  padding: 40px 0 80px;
}

.tools-header {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 36px;
}

.category-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}

.cat-tab:hover {
  color: var(--text-main);
  border-color: var(--border-focus);
}

.cat-tab.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #070d10;
  font-weight: 600;
  box-shadow: 0 0 12px var(--accent-glow);
}

.cat-tab-badge {
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.15);
}

.cat-tab.active .cat-tab-badge {
  background: rgba(0, 0, 0, 0.25);
  color: #ffffff;
}

/* Grid of Tools */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  text-align: left;
}

.tool-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), 0 0 15px var(--accent-glow);
}

.tool-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.tool-icon-box {
  width: 44px;
  height: 44px;
  background: var(--accent-light);
  border-radius: 12px;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.tool-card:hover .tool-icon-box {
  background: var(--accent-primary);
  color: #070d10;
  box-shadow: 0 0 10px var(--accent-primary);
}

.tool-arrow {
  color: var(--text-subtle);
  transition: var(--transition);
  opacity: 0.5;
}

.tool-card:hover .tool-arrow {
  color: var(--accent-primary);
  opacity: 1;
  transform: translateX(3px);
}

.tool-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tool-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.tool-card-desc {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  margin-top: auto;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 32px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 300px;
}

.footer-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #10b981;
  font-weight: 500;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.04em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--accent-primary);
  transform: translateX(2px);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.footer-legal-links {
  display: flex;
  gap: 18px;
}

/* ==========================================================================
   Cookie Notice Card (from Stitch image)
   ========================================================================== */

.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 999;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg), 0 0 20px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: slide-up-fade 0.4s ease-out;
}

.cookie-banner.hidden {
  display: none !important;
}

@keyframes slide-up-fade {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.cookie-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cookie-icon {
  width: 28px;
  height: 28px;
  background: var(--accent-light);
  color: var(--accent-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cookie-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.cookie-text {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.cookie-text a {
  color: var(--accent-primary);
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-cookie-accept {
  background: var(--accent-primary);
  color: #070d10;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.btn-cookie-accept:hover {
  background: var(--accent-hover);
}

.btn-cookie-reject {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.btn-cookie-reject:hover {
  color: var(--text-main);
  border-color: var(--border-focus);
}

.btn-cookie-custom {
  color: var(--text-subtle);
  font-size: 0.82rem;
  padding: 7px 10px;
}

.btn-cookie-custom:hover {
  color: var(--text-main);
}

/* ==========================================================================
   Command Palette / Quick Search Modal
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  animation: fadeIn 0.2s ease-out;
}

.modal-backdrop.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cmd-modal {
  width: 100%;
  max-width: 620px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 0 35px var(--accent-glow);
  overflow: hidden;
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleUp {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.cmd-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.cmd-input-wrap svg {
  color: var(--text-muted);
}

.cmd-input {
  width: 100%;
  background: transparent;
  border: none;
  font-size: 1.1rem;
  color: var(--text-main);
  outline: none;
}

.cmd-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cmd-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  transition: var(--transition);
  cursor: pointer;
}

.cmd-result-item:hover, .cmd-result-item.selected {
  background: var(--bg-surface-elevated);
  color: var(--accent-primary);
}

.cmd-footer {
  padding: 10px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-subtle);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-right {
    justify-content: flex-start;
  }
  .live-conversions-card {
    max-width: 100%;
  }
  .footer-top {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
}
