:root {
  --bg-dark: #0f0f11;
  --bg-surface: #18181b;
  --border: #27272a;
  --accent: #f5b800;
  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
}

/* --- TEMA ALTERNATIF --- */
[data-theme="grove"] {
  --bg-dark: #0b140c;
  --bg-surface: #122114;
  --border: #1e3a22;
  --accent: #2ecc71;
  --text-main: #e2f7e5;
  --text-muted: #80b388;
}

[data-theme="light"] {
  --bg-dark: #f4f5f7;
  --bg-surface: #ffffff;
  --border: #e5e7eb;
  --accent: #2563eb;
  --text-main: #111111;
  --text-muted: #6b7280;
}

[data-theme="black"] {
  --bg-dark: #000000;
  --bg-surface: #0d0d0d;
  --border: #222222;
  --accent: #ffffff;
  --text-main: #ffffff;
  --text-muted: #888888;
}

[data-theme="blue"] {
  --bg-dark: #0a111e;
  --bg-surface: #101c2e;
  --border: #1e293b;
  --accent: #38bdf8;
  --text-main: #e0f2fe;
  --text-muted: #64748b;
}

[data-theme="pink"] {
  --bg-dark: #180914;
  --bg-surface: #281023;
  --border: #4a1d42;
  --accent: #ec4899;
  --text-main: #fce7f3;
  --text-muted: #9d4b85;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Space Grotesk', sans-serif;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Navbar */
.navbar {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
}

.logo span {
  color: var(--text-main);
}

#searchInput {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  width: 100%;
  max-width: 320px;
}

#searchInput:focus {
  border-color: var(--accent);
}

/* Theme Selector Dropdown */
#themeSelect {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 9px 12px;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  font-weight: 700;
}

#themeSelect:focus {
  border-color: var(--accent);
}

/* Categories */
.category-bar {
  display: flex;
  gap: 8px;
  margin: 24px 0;
  overflow-x: auto;
  padding-bottom: 8px;
}

.cat-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.cat-btn.active, .cat-btn:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

/* Mod Grid & Cards */
.mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.mod-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.2s;
}

.mod-card:hover {
  border-color: var(--accent);
}

.card-image-wrap {
  position: relative;
  height: 180px;
  background: #000;
  overflow: hidden;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.85);
  color: var(--accent);
  border: 1px solid var(--border);
  font-size: 0.65rem;
  padding: 2px 6px;
  text-transform: uppercase;
}

.card-body {
  padding: 16px;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.card-footer {
  padding: 16px;
  padding-top: 0;
}

.btn-download {
  display: block;
  text-align: center;
  background: var(--border);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.2s, color 0.2s;
}

.btn-download:hover {
  background: var(--accent);
  color: #000;
}

.no-results {
  color: var(--text-muted);
  grid-column: 1 / -1;
}

/* Modal Preview Styling */
.modal {
  display: none; 
  position: fixed; 
  z-index: 2000; 
  left: 0; top: 0;
  width: 100%; height: 100%; 
  overflow: auto; 
  background-color: rgba(0, 0, 0, 0.85); 
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: var(--bg-surface);
  border: 1px solid var(--accent);
  margin: 5% auto;
  padding: 24px;
  width: 90%;
  max-width: 600px;
  color: var(--text-main);
  position: relative;
}

.close-btn {
  position: absolute;
  right: 18px; top: 12px;
  color: var(--accent);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-btn:hover {
  color: var(--text-main);
}

.modal-img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border: 1px solid var(--border);
  margin-bottom: 15px;
}

.modal-title {
  color: var(--accent);
  margin-bottom: 8px;
  font-size: 1.3rem;
}

.modal-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.modal-section {
  margin-bottom: 15px;
}

.modal-section h4 {
  color: var(--accent);
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.modal-section p {
  color: var(--text-main);
  font-size: 0.85rem;
  line-height: 1.5;
}

.download-btn {
  display: block;
  text-align: center;
  background-color: var(--accent);
  color: #000000;
  font-weight: bold;
  text-decoration: none;
  padding: 12px;
  margin-top: 20px;
}