/* -- DARK & BLUE APP THEME VARIABLES -- */
:root {
  --bg-color: #060b13; 
  --panel-bg: #0b1524; 
  --text-main: #f0f4f8; 
  --text-muted: #7d90a8; 
  --border-color: #162a45; 
  --accent-color: #3b82f6; 
  --accent-red: #ef4444; 
  --font-sans: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --container-width: 1100px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
}

h1, h2, h3, strong { font-weight: 600; }
.mono-badge, .small-mono, .logo-icon { font-family: var(--font-mono); }

/* -- HEADER -- */
.header {
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(6, 11, 19, 0.95);
  backdrop-filter: blur(10px);
  padding: 1.2rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.logo-icon { color: var(--accent-color); margin-right: 5px; }

.search-box input {
  font-family: var(--font-mono);
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 15px;
  width: 250px;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
  width: 300px;
}

/* -- HERO -- */
.hero { padding: 3rem 0 2rem; }
.hero h1 { font-size: 2.2rem; text-transform: uppercase; margin-bottom: 0.2rem; color: #ffffff; }
.hero p { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.9rem; }

/* -- APP-STYLE GRID & CARDS -- */
.status-loader { padding: 3rem 0; font-family: var(--font-mono); color: var(--text-muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); 
  gap: 25px 15px;
  padding-bottom: 4rem;
}

.card {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.card-img-wrapper {
  width: 100%;
  aspect-ratio: 3 / 4; 
  border-radius: 12px; 
  overflow: hidden;
  box-shadow: 0 6px 12px rgba(0,0,0,0.5);
  position: relative;
  border: 1px solid rgba(255,255,255,0.05); 
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

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

.card-info { padding: 10px 4px 0 4px; }

/* Less glowy text */
.card-info h2 { 
  font-size: 0.95rem; 
  line-height: 1.4; 
  font-weight: 600;
  color: #a0aec0 !important; 
  white-space: normal; 
  display: flex; 
  align-items: flex-start; 
}

/* Less glowy blue dot */
.card-info h2::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--accent-color);
  border-radius: 50%;
  margin-right: 8px;
  margin-top: 6px; 
  flex-shrink: 0;
  box-shadow: none !important;
}

/* -- MODERN MODALS -- */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(2, 6, 12, 0.9);
  backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}

.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-window {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px; 
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0,0,0,0.8); 
}

.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding: 12px 20px;
}

.modal-title-bar {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.close-btn {
  background: rgba(255, 255, 255, 0.05); 
  border: none; color: var(--text-main);
  border-radius: 50%; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; cursor: pointer; transition: 0.2s;
}
.close-btn:hover { background: var(--accent-red); color: #fff; }

.modal-body { display: flex; gap: 2.5rem; padding: 2.5rem; }

.modal-body img {
  width: 260px; height: auto; object-fit: cover;
  border-radius: 12px; 
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.05);
}

.modal-details { flex: 1; display: flex; flex-direction: column; }
.modal-details h2 { font-size: 2.2rem; margin-bottom: 0.5rem; line-height: 1.2; color: #fff; }

.mono-badge {
  display: inline-block; padding: 6px 12px;
  background: rgba(59, 130, 246, 0.1); border: 1px solid var(--accent-color);
  border-radius: 6px;
  font-size: 0.8rem; color: var(--accent-color); width: fit-content;
}

.divider { height: 1px; background: var(--border-color); margin: 1.5rem 0; }
.modal-details p { color: var(--text-muted); margin-bottom: 2rem; font-size: 0.95rem; }

.action-btn {
  display: inline-block; padding: 14px 24px;
  background: var(--accent-color); color: #fff;
  font-weight: 700; text-decoration: none; text-transform: uppercase;
  border-radius: 8px; 
  border: none; cursor: pointer; text-align: center;
  margin-top: auto; transition: 0.3s;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}
.action-btn:hover { background: #2563eb; box-shadow: 0 6px 15px rgba(59, 130, 246, 0.4); transform: translateY(-2px); }

.popup-window { max-width: 450px; }
.popup-body { flex-direction: column; text-align: center; gap: 1rem; }

/* -- DOC PANEL -- */
.doc-panel { background: var(--panel-bg); border-radius: 12px; border: 1px solid var(--border-color); padding: 2.5rem; margin-bottom: 4rem; }
.rule-block { margin-bottom: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--border-color); }
.rule-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.rule-header h3 { font-size: 1.4rem; color: var(--text-main); margin: 0; }
.rule-text { color: var(--text-muted); font-size: 1rem; line-height: 1.7; padding-left: 1rem; border-left: 2px solid var(--accent-color); }

/* -- FOOTER -- */
.footer { border-top: 1px solid var(--border-color); padding: 3rem 0; margin-top: 2rem; }
.footer-grid { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; margin-left: 1.5rem; transition: 0.2s; font-size: 0.95rem; }
.footer-links a:hover { color: var(--accent-color); }

/* Hamburger Menu Base Styles */
.hamburger-btn { 
  display: none; background: none; border: none; 
  color: var(--text-main); font-size: 1.8rem; cursor: pointer; 
}
.mobile-nav { 
  display: none; flex-direction: column; background: var(--panel-bg); 
  padding: 0; text-align: center; border-bottom: 1px solid var(--border-color); 
}
.mobile-nav a { 
  color: var(--text-muted); text-decoration: none; padding: 15px; 
  border-bottom: 1px solid var(--border-color); font-size: 1rem;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav.active { display: flex; }

/* -- MERGED MOBILE RESPONSIVE -- */
@media (max-width: 768px) {
  /* Header & Hamburger adjustments */
  .header-inner { flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; }
  .hamburger-btn { display: block; }
  .search-box, .search-box input, .search-box input:focus { width: 100%; order: 3; margin-top: 5px; }

  /* Hero */
  .hero { padding: 1.5rem 0 0.5rem; }
  .hero h1 { font-size: 1.6rem; }

  /* Grid & Cards */
  .grid { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px 10px; 
    padding-bottom: 2rem; 
  }
  .card-info { padding: 8px 0 0 0; }
  .card-info h2 { font-size: 0.85rem; white-space: normal; }

  /* Modals */
  .modal-overlay { padding: 1.5rem 1rem; align-items: flex-start; }
  .modal-body { flex-direction: column; padding: 1.5rem; gap: 1rem; }
  .modal-body img { width: 100%; max-width: 150px; margin: 0 auto; }
  .modal-details h2 { font-size: 1.4rem; margin-bottom: 0.5rem; }
  .modal-details p { margin-bottom: 1rem; font-size: 0.9rem; }
  .action-btn { padding: 12px 16px; font-size: 0.85rem; }

  /* -- DOC PANEL MOBILE FIXES (About & Guidelines) -- */
  .doc-panel { 
    padding: 1.5rem 1rem; /* Massively reduces the empty space on the sides */
    margin-bottom: 2rem;
  }
  .rule-header { 
    flex-direction: column; /* Stacks the badge on top of the title */
    align-items: flex-start; 
    gap: 0.5rem; 
  }
  .rule-header h3 { font-size: 1.2rem; }
  .rule-text { 
    padding-left: 0.8rem; /* Reduces the blue line indent */
    font-size: 0.9rem; /* Slightly smaller text for readability */
  }
  .rule-block { 
    margin-bottom: 1.5rem; 
    padding-bottom: 1.5rem; 
  }

  /* Footer */
  .footer { padding: 2rem 0; }
  .footer-grid { flex-direction: column; align-items: center; text-align: center; gap: 1.5rem; }
  
  /* Hide standard footer links since they are in the hamburger menu now */
  .footer-links { display: none; } 
}