:root {
  --bg-dark: #08060e;
  --bg-card: #110d22;
  --bg-card-hover: #17122e;
  --bg-glass: rgba(17, 13, 34, 0.85);
  --border-frame: rgba(124, 58, 237, 0.3);
  --border-glow: rgba(6, 182, 212, 0.5);
  --primary-violet: #7c3aed;
  --primary-violet-light: #9333ea;
  --accent-cyan: #06b6d4;
  --accent-cyan-light: #22d3ee;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --shadow-frame: 0 0 25px rgba(124, 58, 237, 0.15);
  --shadow-cyan: 0 0 20px rgba(6, 182, 212, 0.25);
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1240px;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(124, 58, 237, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 70%, rgba(6, 182, 212, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: all 0.25s ease;
}

a:hover {
  color: var(--accent-cyan-light);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header Styles - Slim, Unstuck, Fully Responsive */
.header-nav {
  position: relative;
  width: 100%;
  background: rgba(8, 6, 14, 0.95);
  border-bottom: 1px solid var(--border-frame);
  padding: 0.75rem 0;
  z-index: 1000;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.brand-logo svg {
  width: 28px;
  height: 28px;
}

.brand-text {
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid var(--primary-violet);
  color: var(--accent-cyan);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary-violet) 0%, #5b21b6 100%);
  color: #ffffff !important;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.3);
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-frame);
  color: var(--text-main);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
}

.mobile-toggle svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* FrameMatch Hero & Framing UI */
.frame-card {
  background: var(--bg-card);
  border: 1px solid var(--border-frame);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-frame);
}

.frame-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  opacity: 0.6;
}

.frame-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-4px);
  box-shadow: var(--shadow-cyan);
}

.hero-section {
  padding: 4rem 0 3rem;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid var(--border-frame);
  color: var(--accent-cyan);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.hero-title span {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.25rem;
}

/* Match Filter / Finder Tool Bar */
.finder-bar {
  background: rgba(17, 13, 34, 0.9);
  border: 1px solid var(--border-frame);
  border-radius: 12px;
  padding: 1.25rem;
  max-width: 900px;
  margin: 0 auto 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) auto;
  gap: 1rem;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
}

.filter-group label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--accent-cyan);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.filter-select, .filter-input {
  background: rgba(8, 6, 14, 0.8);
  border: 1px solid rgba(124, 58, 237, 0.4);
  color: var(--text-main);
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  font-size: 0.88rem;
  outline: none;
}

.filter-select:focus, .filter-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-violet) 0%, #4c1d95 100%);
  color: #ffffff;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  border: 1px solid var(--accent-cyan);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
  font-size: 0.9rem;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--primary-violet) 100%);
  color: #000000;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.6);
}

.btn-secondary {
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid var(--border-frame);
  color: var(--text-main);
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
}

/* Grid Layouts */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-bottom: 4rem;
}

.card-img-wrapper {
  position: relative;
  width: 100%;
  height: 210px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.1rem;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.frame-card:hover .card-img {
  transform: scale(1.05);
}

.card-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(8, 6, 14, 0.85);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.card-match-score {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: linear-gradient(135deg, var(--primary-violet) 0%, #000 100%);
  border: 1px solid #a855f7;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 50px;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.5);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #ffffff;
  line-height: 1.3;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(124, 58, 237, 0.2);
  padding-top: 0.85rem;
}

/* Detail Page Layouts */
.detail-header {
  padding: 3rem 0 2rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
  margin-bottom: 4rem;
}

.content-box {
  background: var(--bg-card);
  border: 1px solid var(--border-frame);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-frame);
}

.content-box h2 {
  font-size: 1.5rem;
  color: #ffffff;
  margin: 1.75rem 0 0.85rem;
  border-bottom: 1px solid rgba(124, 58, 237, 0.3);
  padding-bottom: 0.4rem;
}

.content-box h3 {
  font-size: 1.2rem;
  color: var(--accent-cyan);
  margin: 1.25rem 0 0.6rem;
}

.content-box p {
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  font-size: 0.98rem;
  line-height: 1.7;
}

.content-box ul {
  margin: 0 0 1.25rem 1.5rem;
  color: var(--text-muted);
}

.content-box li {
  margin-bottom: 0.4rem;
}

.sidebar-box {
  background: var(--bg-card);
  border: 1px solid var(--border-frame);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.spec-list {
  list-style: none;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
}

.spec-label {
  color: var(--text-dim);
}

.spec-val {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Footer Section */
.footer-main {
  background: #050309;
  border-top: 1px solid var(--border-frame);
  padding: 3.5rem 0 2rem;
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 1rem 0 1.25rem;
  max-width: 320px;
}

.footer-title {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

.address-box {
  color: var(--text-muted);
  font-size: 0.83rem;
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Cookie Banner Popup */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: 20px;
  max-width: 480px;
  margin: 0 auto;
  background: rgba(17, 13, 34, 0.96);
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.3);
  border-radius: 12px;
  padding: 1.25rem;
  z-index: 9999;
  display: none;
  backdrop-filter: blur(10px);
}

.cookie-banner.active {
  display: block;
}

.cookie-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.cookie-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

.btn-cookie-accept {
  background: var(--accent-cyan);
  color: #000000;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

.btn-cookie-decline {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  font-size: 0.8rem;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

/* Responsive Queries */
@media (max-width: 992px) {
  .hero-title {
    font-size: 2.25rem;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(11, 8, 22, 0.98);
    flex-direction: column;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-frame);
    gap: 1rem;
    align-items: flex-start;
  }
  .nav-links.show {
    display: flex;
  }
  .finder-bar {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 1.8rem;
  }
}