/* ==========================================================================
   Design System & Premium Theme Variables
   ========================================================================== */
:root {
  --bg-main: #0b0f19;
  --bg-gradient: radial-gradient(circle at top, #1e293b 0%, #0f172a 50%, #020617 100%);
  --panel-glass: rgba(30, 41, 59, 0.4);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(6, 182, 212, 0.4);
  
  --primary-color: #06b6d4;     /* Electric Cyan */
  --secondary-color: #3b82f6;   /* Royal Blue */
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  
  --font-family: 'Outfit', 'Inter', sans-serif;
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --border-radius: 16px;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background: var(--bg-main);
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  padding-bottom: 60px;
  overflow-x: hidden;
}

/* ==========================================================================
   Container & Typography
   ========================================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
}

header {
  padding: 60px 0 40px 0;
  text-align: center;
}

.logo-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  color: var(--primary-color);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: 30px;
  margin-bottom: 15px;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.15);
}

h1 {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 30%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 15px;
  letter-spacing: -1px;
}

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

/* ==========================================================================
   Search Panel (Glassmorphism)
   ========================================================================== */
.search-container {
  max-width: 500px;
  margin: 0 auto 50px auto;
  position: relative;
}

.search-input-wrapper {
  position: relative;
  border-radius: 50px;
  background: var(--panel-glass);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 2px;
  transition: var(--transition);
}

.search-input-wrapper:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.25);
  transform: translateY(-2px);
}

.search-input-wrapper i {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}

#search-input {
  width: 100%;
  padding: 15px 20px 15px 50px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-family: var(--font-family);
}

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

/* ==========================================================================
   Hotsites Cards Grid
   ========================================================================== */
.grid-wrapper {
  margin-top: 20px;
}

.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 30px;
}

.site-card {
  position: relative;
  background: var(--panel-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius);
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.site-card:hover {
  transform: translateY(-10px);
  border-color: var(--border-glass-hover);
  box-shadow: 0 20px 40px rgba(6, 182, 212, 0.15);
}

.card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #1e293b;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.site-card:hover .card-image img {
  transform: scale(1.08);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.site-card:hover .card-overlay {
  opacity: 1;
}

.view-btn {
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
}

/* Screen reader helper class for search/accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* ==========================================================================
   Status & Error Handling
   ========================================================================== */
.no-results, .error-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  font-size: 1.2rem;
  color: var(--text-muted);
  border: 1px dashed var(--border-glass);
  border-radius: var(--border-radius);
  background: rgba(30, 41, 59, 0.2);
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  margin-top: 100px;
  text-align: center;
  border-top: 1px solid var(--border-glass);
  padding: 30px 0;
}

footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 768px) {
  h1 {
    font-size: 2.3rem;
  }
  
  header {
    padding: 40px 0 30px 0;
  }
}

@media (max-width: 480px) {
  .sites-grid {
    grid-template-columns: 1fr;
  }
  
  .container {
    padding: 0 20px;
  }
}
