:root {
  --bg: #090e0b;
  --grid-color: rgba(60, 185, 115, 0.05);
  --text-main: #e2e8f0;
  --text-mut: #94a3b8;
  --accent: #57bf2d;  
  --accent-hover: #329d61;
  --panel-bg: #111814;
  --panel-hover: #16201a;
  --border: #1e2f23;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: 
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  height: 70px;
  background: rgba(9, 14, 11, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.logo-area { display: flex; align-items: center; gap: 10px; }
.logo-text { font-family: 'Press Start 2P', cursive; font-size: 14px; color: #fff; }
.accent { color: var(--accent); }
.mc-icon { font-size: 18px; filter: drop-shadow(0 0 8px rgba(60,185,115,0.4)); }

.links { display: flex; gap: 35px; align-items: center; }
.links a {
  color: var(--text-mut);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.2s;
}
.links a:hover, .links a.active { color: var(--accent); }

.dropdown {
  position: relative;
  display: inline-block;
  padding: 25px 0;
}
.nav-link { cursor: pointer; }
.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--panel-bg);
  min-width: 180px;
  border: 1px solid var(--border);
  box-shadow: 0px 8px 25px rgba(0,0,0,0.6);
  z-index: 200;
  border-radius: 6px;
  top: 100%;
  left: -20px;
  padding: 5px 0;
  margin-top: -10px;
}
.dropdown-content a {
  color: var(--text-mut);
  padding: 12px 20px;
  text-decoration: none;
  display: block;
  transition: 0.2s;
  font-size: 12px;
}
.dropdown-content a:hover {
  background-color: var(--panel-hover);
  color: var(--accent);
}
.dropdown:hover .dropdown-content { display: block; }

button {
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  border-radius: 6px;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 8px 16px;
  font-size: 12px;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: rgba(60,185,115,0.05); }

.feedback-nav-btn {
  white-space: nowrap;
  padding: 12px 20px;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 14px 28px;
  font-size: 14px;
  font-family: 'Press Start 2P', cursive;
  box-shadow: 0 4px 15px rgba(60,185,115,0.2);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(60,185,115,0.3); }

main { flex: 1; padding: 60px 40px; max-width: 1200px; margin: 0 auto; width: 100%; box-sizing: border-box; }

.hero-section { text-align: center; margin-top: 50px; }
.hero-title { font-family: 'Press Start 2P', cursive; font-size: 40px; color: #fff; margin-bottom: 20px; line-height: 1.4; text-shadow: 0 4px 20px rgba(60,185,115,0.2); }
.hero-sub { color: var(--text-mut); font-size: 16px; margin-bottom: 40px; line-height: 1.6; font-weight: 500; }
.hero-buttons { display: flex; justify-content: center; gap: 20px; margin-bottom: 50px; }

.stats-box { display: inline-block; padding: 15px 30px; background: var(--panel-bg); border: 1px solid var(--border); border-radius: 8px; font-family: 'Press Start 2P', cursive; font-size: 12px; }

.fade-in { opacity: 0; transform: translateY(15px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

.submit-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(17, 24, 20, 0.96), rgba(11, 16, 13, 0.96));
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

.submit-panel-copy {
  max-width: 760px;
}

.submit-panel-copy h3 {
  margin: 0 0 8px 0;
  font-family: 'Press Start 2P', cursive;
  font-size: 11px;
  line-height: 1.6;
  color: #fff;
}

.submit-panel-copy p {
  margin: 0;
  color: var(--text-mut);
  font-size: 13px;
  line-height: 1.7;
}

.submit-panel-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.cooldown-note {
  color: var(--text-mut);
  font-size: 12px;
  text-align: right;
}

.cooldown-note strong {
  color: var(--accent);
}

.submit-panel .floating-add-btn {
  position: static;
  bottom: auto;
  right: auto;
}

.submit-panel .floating-add-btn:disabled,
.xm-btn-dl:disabled,
.page-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.access-denied-card,
.request-card,
.empty-state-card {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.empty-state-card {
  color: var(--text-mut);
  font-size: 14px;
}

.access-denied-card h3,
.request-card h3 {
  margin: 0 0 12px 0;
  font-family: 'Press Start 2P', cursive;
  font-size: 11px;
  line-height: 1.7;
  color: #fff;
}

.request-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.request-meta,
.request-detail-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  background: rgba(87, 191, 45, 0.1);
  color: var(--accent);
  border: 1px solid rgba(87, 191, 45, 0.25);
}

.status-pill.pending {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.25);
}

.status-pill.approved {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.25);
}

.status-pill.rejected {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.25);
}

.request-detail {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(5, 8, 6, 0.8);
  flex: 1 1 240px;
}

.request-detail-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-mut);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.request-detail-value {
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.request-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.request-actions .xm-btn-dl,
.request-actions .btn-outline {
  flex: 1 1 160px;
}

.request-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.request-links a {
  color: var(--accent);
  text-decoration: none;
  word-break: break-word;
}

.request-links a:hover {
  text-decoration: underline;
}

.moderation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

@media (max-width: 900px) {
  .submit-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .submit-panel-actions {
    align-items: stretch;
  }

  .cooldown-note {
    text-align: left;
  }
}

.header-banner { margin-bottom: 30px; padding-bottom: 20px; }
.header-banner h2 { font-family: 'Press Start 2P', cursive; font-size: 20px; color: #fff; margin: 0 0 10px 0; }
.header-banner p { color: var(--text-mut); margin: 0; font-size: 14px;}

.community-feedback-section {
  margin-top: 44px;
}

.community-feedback-section h3 {
  margin: 0 0 18px 0;
  font-family: 'Press Start 2P', cursive;
  font-size: 22px;
  color: #fff;
}

.feedback-grid {
  margin-top: 0;
}

.feedback-card {
  position: relative;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.feedback-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.feedback-text {
  margin: 0;
  color: var(--text-mut);
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.feedback-delete-btn {
  top: 12px;
  right: 12px;
}

.grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.list-view { grid-template-columns: 1fr; }

.card {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  position: relative;
}
.card:hover { transform: translateY(-4px); background: var(--panel-hover); box-shadow: 0 8px 25px rgba(0,0,0,0.4); }

.card-admin-actions {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  gap: 6px;
  z-index: 10;
}

.card-admin-btn {
  width: 28px;
  height: 28px;
  border: 2px solid #000;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.5);
  flex-shrink: 0;
}

.card-edit-btn { background: #0f766e; }
.card-edit-btn:hover { background: #115e59; transform: translate(1px, 1px); box-shadow: 1px 1px 0px rgba(0,0,0,0.5); }
.card-delete-btn { background: #ef4444; }
.card-delete-btn:hover { background: #dc2626; transform: translate(1px, 1px); box-shadow: 1px 1px 0px rgba(0,0,0,0.5); }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 10px;
}

.card h3 { color: #fff; margin: 0; font-family: 'Press Start 2P', cursive; line-height: 1.4; font-size: 11px;}

.card .tag { 
  font-size: 10px; 
  color: var(--accent); 
  font-family: monospace; 
  margin-bottom: 15px; 
  display: inline-block; 
  align-self: flex-start; 
  background: #000; 
  padding: 4px 8px; 
  border-radius: 4px; 
  border: 1px solid var(--border);
}

.card p { color: var(--text-mut); font-size: 13px; line-height: 1.6; margin-bottom: 15px; flex: 1; white-space: pre-wrap;}
.card video, .card img { width: 100%; height: 160px; object-fit: cover; border-radius: 4px; margin-bottom: 15px; background: #000; cursor: pointer; border: 1px solid var(--border); }

.audio-placeholder { width: 100%; height: 160px; background: var(--accent); border-radius: 4px; margin-bottom: 15px; border: 2px solid #000; cursor: pointer; display: flex; align-items: center; justify-content: center; text-align: center; padding: 15px; box-sizing: border-box; transition: 0.2s; box-shadow: inset 0 0 20px rgba(0,0,0,0.2); }
.audio-placeholder:hover { background: var(--accent-hover); }
.audio-placeholder span { color: #fff; font-family: 'Press Start 2P', cursive; font-size: 10px; line-height: 1.6; text-shadow: 2px 2px 0px #000; }

.card-id { font-size: 8px; color: var(--text-mut); font-family: monospace; opacity: 0.4; text-align: right; margin-top: 10px; pointer-events: none; }
.card-x-btn { background: #ef4444; color: #fff; border: 2px solid #000; border-radius: 4px; width: 24px; height: 24px; font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; box-shadow: 2px 2px 0px rgba(0,0,0,0.5); flex-shrink: 0; position: absolute; top: 15px; right: 15px; z-index: 10;}
.card-x-btn:hover { background: #dc2626; transform: translate(1px, 1px); box-shadow: 1px 1px 0px rgba(0,0,0,0.5); }

.info-plain-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-entry {
  padding-bottom: 8px;
}

.info-entry h3 {
  margin: 0 0 16px 0;
  color: #fff;
  font-family: 'Press Start 2P', cursive;
  line-height: 1.45;
  font-size: 16px;
}

.info-entry p {
  margin: 0 0 18px 0;
  color: var(--text-mut);
  font-size: 17px;
  line-height: 2;
  white-space: pre-wrap;
  max-width: 1100px;
}

.info-entry p:last-child {
  margin-bottom: 0;
}

.dl-btn { background: #050806; color: #fff; border: 1px solid var(--border); padding: 12px; width: 100%; font-weight: 700; margin-top: auto; font-size: 12px; letter-spacing: 0.5px; border-radius: 4px; transition: 0.2s;}
.dl-btn:hover { border-color: var(--accent); color: var(--accent); }

.category-filters { margin-bottom: 25px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cat-btn { background: var(--panel-bg); border: 1px solid var(--border); color: var(--text-mut); padding: 8px 16px; font-size: 11px; display: flex; align-items: center; gap: 8px; border-radius: 6px; font-family: 'Press Start 2P', cursive; font-size: 9px;}
.cat-btn.act { border-color: var(--accent); color: var(--accent); background: #000;}

.assets-search-wrap { margin-bottom: 18px; }

.assets-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
}

.assets-search-input::placeholder { color: var(--text-mut); }
.assets-search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(60,185,115,0.1); }

.cat-del { background: #ef4444; color: #fff; border: 1px solid #000; font-size: 8px; margin-left: 5px; cursor: pointer; padding: 3px 6px; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-family: sans-serif; font-weight: bold;}
.cat-del:hover { background: #dc2626; }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; align-items: center; }
.page-btn { background: var(--panel-bg); border: 1px solid var(--border); color: var(--text-main); padding: 8px 12px; font-size: 13px; border-radius: 6px; }
.page-btn.act { background: var(--accent); color: #000; border-color: #000; }
.page-btn:hover:not(.act) { border-color: var(--accent); color: var(--accent); }
.page-dots { color: var(--text-mut); font-weight: bold; padding: 0 5px; }

.admin-wrapper { text-align: center; padding: 20px; margin-top: auto; }
.a-trigger { background: transparent; border: none; color: #090e0b; font-size: 10px; text-align: center; width: 120px; outline: none; transition: color 0.3s; }
.a-trigger:focus { color: var(--accent); }

.floating-add-btn { position: fixed; bottom: 30px; right: 30px; background: var(--accent); color: #000; border: none; border-radius: 8px; padding: 15px 25px; font-size: 12px; font-family: 'Press Start 2P', cursive; box-shadow: 0 10px 25px rgba(60,185,115,0.3); z-index: 990; }
.floating-add-btn:hover { background: var(--accent-hover); transform: translateY(-3px); }

#x-modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); z-index: 9998; display: flex; justify-content: center; align-items: center; }
#x-modal { background: var(--panel-bg); border: 1px solid var(--border); border-radius: 12px; width: 90%; max-width: 600px; max-height: 90vh; overflow-y: auto; box-shadow: 0 25px 50px rgba(0,0,0,0.5); display: flex; flex-direction: column; }
.xm-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 25px; border-bottom: 1px solid var(--border); }
.xm-head h2 { margin: 0; font-family: 'Press Start 2P', cursive; font-size: 12px; color: #fff; }
.xm-close { background: transparent; border: none; color: var(--text-mut); font-size: 20px; padding: 0; }
.xm-close:hover { color: #ef4444; }
.xm-body { padding: 25px; }
.xm-attr-box { background: rgba(60,185,115,0.05); border: 1px solid rgba(60,185,115,0.2); padding: 15px; margin-bottom: 20px; border-radius: 6px; }
.xm-attr-box.req { background: rgba(239,68,68,0.05); border-color: rgba(239,68,68,0.2); }
.xm-attr-title { font-size: 11px; color: var(--text-mut); margin-bottom: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.xm-attr-desc { font-size: 13px; line-height: 1.5; color: var(--accent); }
.xm-attr-box.req .xm-attr-desc { color: #ef4444; }
.xm-preview { width: 100%; border-radius: 6px; margin-bottom: 20px; max-height: 350px; object-fit: contain; background: #000; }
.xm-audio { width: 100%; margin-bottom: 20px; border-radius: 6px; outline: none; }
.xm-foot { padding: 20px 25px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 15px; }
.xm-foot button { flex: 1; padding: 14px; font-size: 12px; }
.xm-btn-dl { background: #fff; color: #000; border: none; }
.xm-btn-dl:hover { background: #e2e8f0; }

.admin-field { width: 100%; padding: 14px; margin-bottom: 18px; background: #050806; border: 1px solid var(--border); color: #fff; font-family: 'Inter', sans-serif; box-sizing: border-box; outline: none; border-radius: 6px; font-size: 13px; }
.admin-field:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(60,185,115,0.1); }
textarea.admin-field { min-height: 120px; resize: vertical; }
.feedback-textarea { min-height: 150px; }
.admin-label { display: block; font-size: 10px; font-weight: 700; color: var(--text-mut); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }

@media (max-width: 900px) {
  .topbar {
    padding: 0 18px;
    gap: 12px;
  }

  .topbar-left {
    gap: 10px;
  }

  .feedback-nav-btn {
    padding: 7px 10px;
    font-size: 8px;
  }
}
