/* ============================================
   novacalcs.com — Shared Styles
   Dark Theme · Mint Accent · Mobile First
   ============================================ */

:root {
  --bg-base:       #080c14;
  --bg-surface:    #0f1623;
  --bg-card:       #131c2e;
  --bg-card-hover: #182233;
  --bg-input:      #0d1525;
  --border:        rgba(255,255,255,0.06);
  --border-focus:  rgba(0,201,177,0.5);

  --mint:          #00C9B1;
  --mint-dim:      rgba(0,201,177,0.15);
  --mint-glow:     rgba(0,201,177,0.35);
  --mint-dark:     #00a492;

  --text-primary:  #e8edf5;
  --text-secondary:#8a97aa;
  --text-muted:    #4a5568;
  --text-on-mint:  #001a17;

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  --shadow-card: 0 2px 16px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 24px rgba(0,201,177,0.2);

  --font-display: 'DM Sans', 'Noto Sans', sans-serif;
  --font-body:    'DM Sans', 'Noto Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;
}

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

html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,201,177,0.4); }

a { color: var(--mint); text-decoration: none; }
a:hover { color: #00e8ce; }

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

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

/* ============================================
   SITE HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,12,20,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-logo span { color: var(--mint); }

.header-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.header-search input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px 8px 40px;
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.header-search input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(0,201,177,0.1);
}

.header-search input::placeholder { color: var(--text-muted); }

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.header-lang {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.lang-btn {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.2s;
  text-decoration: none;
}

.lang-btn:hover { color: var(--mint); border-color: var(--mint-dim); }
.lang-btn.active { color: var(--mint); background: var(--mint-dim); border-color: var(--mint); }

/* ============================================
   CATEGORY TABS
   ============================================ */
.category-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.category-bar::-webkit-scrollbar { display: none; }

.category-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 16px;
  max-width: 1400px;
  margin: 0 auto;
  white-space: nowrap;
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.813rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
}

.cat-tab:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.cat-tab.active {
  color: var(--mint);
  background: var(--mint-dim);
  border-color: rgba(0,201,177,0.25);
}

.cat-tab .count {
  font-size: 0.688rem;
  background: var(--bg-card);
  padding: 1px 6px;
  border-radius: 10px;
  color: var(--text-muted);
}

.cat-tab.active .count {
  background: rgba(0,201,177,0.2);
  color: var(--mint);
}

/* ============================================
   MAIN LAYOUT
   ============================================ */
.page-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 1024px) {
  .page-main {
    grid-template-columns: 220px 1fr 240px;
    padding: 32px 24px 64px;
    gap: 28px;
  }
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .sidebar {
    display: block;
  }

  .sidebar-inner {
    position: sticky;
    top: 80px;
  }
}

.sidebar-section {
  margin-bottom: 8px;
}

.sidebar-title {
  font-size: 0.688rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 0 8px 8px;
}

.sidebar-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.813rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
  text-align: left;
}

.sidebar-cat:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.sidebar-cat.active {
  color: var(--mint);
  background: var(--mint-dim);
  font-weight: 600;
}

.sidebar-cat .cat-icon { font-size: 1rem; width: 20px; }

.sidebar-cat .cat-num {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: auto;
}

.sidebar-cat.active .cat-num {
  background: rgba(0,201,177,0.2);
  color: var(--mint);
}

/* ============================================
   CONTENT AREA
   ============================================ */
.content-area {
  min-width: 0;
}

/* ============================================
   FAVORITES SECTION
   ============================================ */
.favorites-section {
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.section-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-title-icon { color: var(--mint); font-size: 1rem; }

/* ============================================
   AD SLOT
   ============================================ */
.ad-slot {
  background: var(--bg-surface);
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

/* ============================================
   CALCULATOR GRID
   ============================================ */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) {
  .calc-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .calc-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}

@media (min-width: 1280px) {
  .calc-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================
   CALCULATOR CARD
   ============================================ */
.calc-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.calc-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--mint-dim) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
}

.calc-card:hover {
  border-color: rgba(0,201,177,0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.calc-card:hover::before { opacity: 1; }

.calc-card:active { transform: translateY(0); }

.card-icon {
  font-size: 1.75rem;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.card-name {
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  position: relative;
  z-index: 1;
}

.card-desc {
  font-size: 0.688rem;
  color: var(--text-secondary);
  line-height: 1.4;
  position: relative;
  z-index: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-favorite {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: all 0.2s;
  z-index: 2;
}

.card-favorite:hover { color: #fbbf24; background: rgba(251,191,36,0.1); }
.card-favorite.starred { color: #fbbf24; }

/* ============================================
   RIGHT PANEL
   ============================================ */
.right-panel {
  display: none;
}

@media (min-width: 1024px) {
  .right-panel { display: block; }

  .right-panel-inner {
    position: sticky;
    top: 80px;
  }
}

.related-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.related-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.related-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.813rem;
  transition: color 0.15s;
}

.related-link:last-child { border-bottom: none; }
.related-link:hover { color: var(--mint); }
.related-link .ricon { font-size: 0.875rem; width: 20px; }

/* ============================================
   SEARCH RESULTS
   ============================================ */
.no-results {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}

.no-results .nr-icon { font-size: 3rem; margin-bottom: 12px; }
.no-results .nr-text { font-size: 0.875rem; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--mint); }

/* ============================================
   HERO STRIP (main landing)
   ============================================ */
.hero-strip {
  background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(0,201,177,0.05) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.hero-strip::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(0,201,177,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.hero-title .accent { color: var(--mint); }

.hero-sub {
  font-size: 0.813rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

/* ============================================
   UTILITY
   ============================================ */
.hidden { display: none !important; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-new { background: rgba(0,201,177,0.15); color: var(--mint); }
.badge-popular { background: rgba(251,191,36,0.15); color: #fbbf24; }
