:root {
  --primary-color: #00879e; /* Premium Teal */
  --secondary-color: #f7b42c; /* Gold accent */
  --text-dark: #1a1a1a;
  --text-light: #666;
  --white: #ffffff;
  --light-bg: #f5f8fa;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  --hover-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --font-heading: "Outfit", sans-serif;
  --font-body: "Inter", sans-serif;

  /* Glassmorphism Variables */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: 1px solid rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  --glass-blur: blur(10px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-dark);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Glass Utility */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* ==============================
   Header / Navbar
   ============================== */
.main-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  position: relative;
}

.logo img {
  height: 50px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-item {
  font-weight: 500;
  color: var(--text-dark);
}
.nav-item:hover {
  color: var(--primary-color);
}

.btn-primary {
  background: linear-gradient(135deg, var(--secondary-color), #fcbf49);
  color: #000;
  padding: 10px 25px;
  border-radius: 30px;
  font-weight: 600;
  border: none;
  box-shadow: 0 4px 15px rgba(247, 180, 44, 0.3);
  transition: var(--transition);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(247, 180, 44, 0.4);
}

.lang-switch a {
  margin-left: 10px;
  font-weight: 600;
  opacity: 0.7;
}
.lang-switch a.active {
  opacity: 1;
  color: var(--primary-color);
}

/* ==============================
   Hamburger Button
   ============================== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 8px;
  transition: background 0.2s;
  z-index: 1001;
}
.nav-toggle:hover {
  background: rgba(0, 135, 158, 0.08);
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--text-dark);
  border-radius: 3px;
  transition: all 0.3s ease;
  transform-origin: center;
}
/* Animated X when active */
.nav-toggle.active span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ==============================
   Hero Section
   ============================== */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color), #005f73);
  padding: 100px 0;
  text-align: center;
  color: var(--white);
  border-bottom-left-radius: 50px;
  border-bottom-right-radius: 50px;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -50px;
  left: -50px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 25px;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ==============================
   Search Box
   ============================== */
.search-box {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 10px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  width: 90%;
  max-width: 850px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  border: 4px solid rgba(255, 255, 255, 0.2);
}
.search-box input,
.search-box select {
  border: none;
  padding: 15px 20px;
  outline: none;
  font-size: 1.05rem;
  background: transparent;
}
.search-box input {
  flex-grow: 1;
}
.search-box button {
  background: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 15px 40px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
}
.search-box button:hover {
  background: #006c7e;
  transform: scale(1.05);
}

/* ==============================
   Categories
   ============================== */
.categories-section {
  padding: 80px 0;
}

.section-title {
  margin-bottom: 50px;
  position: relative;
  display: inline-block;
  font-size: 2rem;
}
.section-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: var(--secondary-color);
  margin-top: 15px;
  border-radius: 2px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 25px;
}

.category-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 35px 20px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  transition: var(--transition);
  cursor: pointer;
}
.category-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.8);
}

.category-icon {
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: var(--primary-color);
  background: rgba(0, 135, 158, 0.1);
  width: 70px;
  height: 70px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}
.category-card:hover .category-icon {
  background: var(--primary-color);
  color: var(--white);
  transform: rotateY(360deg);
}

.category-title {
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 5px;
}

/* ==============================
   Auth Pages
   ============================== */
.auth-container {
  max-width: 480px;
  margin: 60px auto;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 50px;
  border-radius: 20px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}
.auth-header {
  text-align: center;
  margin-bottom: 35px;
}
.form-group {
  margin-bottom: 25px;
}
.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
  color: #444;
}
.form-control {
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.9);
}
.form-control:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 135, 158, 0.1);
}
.btn-block {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px;
  font-size: 1.05rem;
}
.btn-google {
  background: #fff;
  color: #444;
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  padding: 12px;
  border-radius: 10px;
  font-weight: 500;
  transition: var(--transition);
}
.btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}
.form-footer {
  text-align: center;
  margin-top: 25px;
  font-size: 0.95rem;
  color: #666;
}
.form-footer a {
  color: var(--primary-color);
  font-weight: 700;
}

/* ==============================
   Ad Grid
   ============================== */
.ad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.ad-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  transition: var(--transition);
  display: block;
  color: inherit;
  text-decoration: none;
  position: relative;
}
.ad-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

/* ==============================
   Top Hits Section
   ============================== */
.top-hits-section {
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}

.top-hits-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
  z-index: -2;
}

.top-hits-section::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.05) 0%, transparent 60%);
  z-index: -1;
  animation: pulse 10s infinite ease-in-out;
}

@keyframes pulse {
  0%   { transform: scale(0.8); }
  50%  { transform: scale(1.2); }
  100% { transform: scale(0.8); }
}

.top-hits-section .section-title {
  color: #1e1b4b;
  position: relative;
  display: inline-block;
}

.top-hit-card {
  border: none !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(0);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  position: relative;
}
.top-hit-card:hover {
  transform: translateY(-10px) !important;
  box-shadow: 0 20px 30px rgba(79, 70, 229, 0.15);
}

.badge-top-hit {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(45deg, #ff4500, #ff8c00);
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(255, 69, 0, 0.3);
  z-index: 2;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-5px); }
  100% { transform: translateY(0px); }
}

/* ==============================
   Footer
   ============================== */
.main-footer {
  background: #1a262b;
  color: #fff;
  padding: 60px 0 30px;
  margin-top: 80px;
}
.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
}
.footer-section h4 {
  color: var(--white);
  margin-bottom: 25px;
  font-size: 1.2rem;
  border-left: 3px solid var(--secondary-color);
  padding-left: 15px;
}
.footer-links li {
  margin-bottom: 12px;
}
.footer-links a {
  color: #b0bec5;
}
.footer-links a:hover {
  color: var(--white);
  padding-left: 5px;
}
.footer-bottom {
  text-align: center;
  margin-top: 50px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  color: #78909c;
}

/* ==============================
   Mobile Responsive (≤ 768px)
   ============================== */
@media (max-width: 768px) {
  /* Show hamburger */
  .nav-toggle {
    display: flex;
  }

  /* Hide nav by default; show when .open */
  .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    padding: 20px;
    z-index: 999;
    
    visibility: hidden;
    opacity: 0;
    transform: translateY(-15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .nav-links.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    display: flex; /* Keep display flex so it functions internally */
  }

  /* Nav items full-width */
  .nav-links .nav-item {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 1rem;
  }
  .nav-links .nav-item:hover {
    background: rgba(0, 135, 158, 0.07);
  }
  .nav-links .btn-primary {
    margin-top: 8px;
    width: 100%;
    text-align: center;
    display: block;
    padding: 12px 14px;
  }
  .lang-switch {
    margin-top: 8px;
    width: 100%;
    padding: 8px 14px 0;
  }

  /* Hero */
  .hero-section {
    padding: 60px 0 50px;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
  }
  .hero-title {
    font-size: 1.9rem;
  }

  /* Categories */
  .categories-section {
    padding: 50px 0;
  }
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
  }
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .category-card {
    padding: 24px 12px;
  }
  .category-icon {
    font-size: 1.7rem;
    width: 58px;
    height: 58px;
  }

  /* Ad grid: 2 columns */
  .ad-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  /* Footer stack */
  .footer-content {
    flex-direction: column;
    gap: 24px;
  }

  /* Auth container padding */
  .auth-container {
    margin: 30px auto;
    padding: 30px 20px;
  }
}

/* Extra small (≤ 420px) */
@media (max-width: 420px) {
  .hero-title {
    font-size: 1.55rem;
  }
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .ad-grid {
    grid-template-columns: 1fr;
  }
  .logo img {
    height: 38px;
  }
}