* { margin: 0; padding: 0; box-sizing: border-box; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb { background: #1a1a1a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #333; }

body {
  background: #000;
  color: #e0e0e0;
  font-family: 'Courier New', Courier, monospace;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Animated background grid effect */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background:
    linear-gradient(rgba(200,55,75,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,55,75,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
  animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

body::after {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(200,55,75,0.02) 30%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: glowDrift 15s ease-in-out infinite;
}

@keyframes glowDrift {
  0% { transform: translate(0, 0); }
  33% { transform: translate(5%, -5%); }
  66% { transform: translate(-3%, 3%); }
  100% { transform: translate(0, 0); }
}

.nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
  border-bottom: 1px solid #111;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
}

.nav-brand {
  color: #c8374b;
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 4px;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  color: #555;
  text-decoration: none;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover { color: #e0e0e0; background: #0a0a0a; }
.nav-link.active { color: #fff; background: #0a0a0a; }
.nav-logout { color: #c0392b; }
.nav-logout:hover { color: #e74c3c; background: #1a0a0a; }

.container {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.login-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-box {
  border: 1px solid #111;
  padding: 4rem 3.5rem;
  text-align: center;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px);
}

.logo {
  font-size: 2rem;
  color: #c8374b;
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.subtitle {
  color: #444;
  margin-bottom: 2rem;
  font-size: 0.85rem;
}

.discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #5865F2;
  color: #fff;
  padding: 12px 28px;
  text-decoration: none;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.discord-btn:hover { background: #4752c4; }

.page-title {
  color: #fff;
  font-size: 1.2rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 2rem;
  font-weight: normal;
}

.dashboard { text-align: center; }

.typewriter-text {
  font-size: 1.6rem;
  color: #c8374b;
  letter-spacing: 4px;
  min-height: 2.5rem;
}

.download-section {
  margin-top: 3rem;
  padding: 2.5rem;
  border: 1px solid #111;
}

.download-section h2 {
  color: #fff;
  font-size: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-weight: normal;
}

.download-section p {
  color: #555;
  font-size: 0.82rem;
  margin-bottom: 1.5rem;
}

.download-btn {
  display: inline-block;
  background: #c8374b;
  color: #fff;
  padding: 1rem 3rem;
  text-decoration: none;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: background 0.2s;
}

.download-btn:hover { background: #e0556a; }

.changelog-entry {
  padding: 1.5rem;
  border: 1px solid #111;
  margin-bottom: 1rem;
}

.changelog-entry h3 { color: #fff; font-size: 0.95rem; margin-bottom: 0.4rem; font-weight: normal; }
.changelog-entry .date { color: #444; font-size: 0.72rem; margin-bottom: 0.75rem; }
.changelog-entry .content { color: #888; font-size: 0.82rem; line-height: 1.7; white-space: pre-wrap; }

.box {
  padding: 1.5rem;
  border: 1px solid #111;
  margin-bottom: 1rem;
  background: rgba(0,0,0,0.5);
}

.box h3 { color: #fff; font-size: 0.95rem; font-weight: normal; margin-bottom: 0.3rem; }
.box .label { color: #444; font-size: 0.75rem; margin-bottom: 0.25rem; }
.box .value { color: #aaa; font-size: 0.85rem; margin-bottom: 1rem; }
.box .value:last-child { margin-bottom: 0; }

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid #111;
}

.tab {
  padding: 0.6rem 1.2rem;
  color: #555;
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 1px;
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s;
}
.tab:hover { color: #fff; }
.tab.active { color: #fff; border-bottom-color: #c8374b; }

input[type="text"], input[type="number"], input[type="password"], input[type="datetime-local"], input[type="file"], textarea, select {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  color: #e0e0e0;
  padding: 0.6rem 1rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}

input:focus, textarea:focus { border-color: #333; }
textarea { resize: vertical; min-height: 100px; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; color: #666; font-size: 0.75rem; margin-bottom: 0.4rem; letter-spacing: 1px; text-transform: uppercase; }

.btn {
  display: inline-block;
  background: #1a1a1a;
  color: #e0e0e0;
  padding: 0.6rem 1.5rem;
  border: 1px solid #2a2a2a;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.btn:hover { background: #2a2a2a; border-color: #444; }
.btn-red { background: #c0392b; border-color: #c0392b; color: #fff; }
.btn-red:hover { background: #e74c3c; }
.btn-green { background: #27ae60; border-color: #27ae60; color: #fff; }
.btn-green:hover { background: #2ecc71; }
.btn-accent { background: #c8374b; border-color: #c8374b; color: #fff; }
.btn-accent:hover { background: #e0556a; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { border: 1px solid #111; padding: 1.25rem; text-align: center; transition: border-color 0.2s; }
.stat-card:hover { border-color: #222; }
.stat-num { font-size: 1.8rem; color: #fff; font-weight: bold; line-height: 1; margin-bottom: 0.25rem; }
.stat-label { color: #555; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; }
.stat-bar { height: 2px; background: #111; margin-top: 0.5rem; border-radius: 1px; overflow: hidden; }
.stat-fill { height: 100%; background: #555; border-radius: 1px; }
.stat-fill.green { background: #27ae60; }
.stat-fill.red { background: #e74c3c; }
.stat-fill.orange { background: #f39c12; }
.stat-fill.accent { background: #c8374b; }

.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
th, td { padding: 0.6rem 1rem; text-align: left; border-bottom: 1px solid #111; }
th { color: #444; font-weight: normal; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 1px; }
td { color: #999; }

.col-id { width: 40px; color: #444 !important; font-size: 0.75rem; }
.col-num { width: 50px; text-align: center !important; color: #777 !important; font-size: 0.8rem; }
.col-date { width: 100px; color: #555 !important; font-size: 0.72rem; white-space: nowrap; }
.col-ip { width: 120px; color: #555 !important; font-size: 0.72rem; font-family: inherit; }
.col-name { width: 120px; }
.col-actions { width: 100px; white-space: nowrap; text-align: right !important; }

.user-name { display: block; color: #ccc; font-size: 0.82rem; }
.user-discord { display: block; color: #333; font-size: 0.65rem; margin-top: 1px; }

.tag {
  display: inline-block; padding: 2px 8px; font-size: 0.65rem;
  letter-spacing: 1px; text-transform: uppercase; border: 1px solid #333; color: #666;
}
.tag-green { border-color: #27ae60; color: #27ae60; }
.tag-red { border-color: #e74c3c; color: #e74c3c; }
.tag-orange { border-color: #f39c12; color: #f39c12; }

.btn-sm {
  display: inline-block; background: none; border: 1px solid #333; color: #888;
  padding: 0.3rem 0.6rem; font-family: 'Courier New', Courier, monospace;
  font-size: 0.65rem; cursor: pointer; letter-spacing: 1px; text-transform: uppercase;
  transition: color 0.2s, border-color 0.2s;
}
.btn-sm:hover { color: #fff; border-color: #555; }
.btn-sm-red { color: #c0392b; border-color: #c0392b; }
.btn-sm-red:hover { color: #e74c3c; border-color: #e74c3c; }
.btn-sm-green { color: #27ae60; border-color: #27ae60; }
.btn-sm-green:hover { color: #2ecc71; border-color: #2ecc71; }

.protected { color: #333; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1px; }
.admin-version { color: #333; font-size: 0.72rem; }
.role-select { background: #0a0a0a; border: 1px solid #1a1a1a; color: #e0e0e0; padding: 0.3rem 0.5rem; font-family: 'Courier New', Courier, monospace; font-size: 0.75rem; outline: none; cursor: pointer; width: auto; }

.form-row { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 160px; }
.form-note { color: #555; font-weight: normal; font-size: 0.72rem; }

.empty-state { text-align: center; padding: 3rem; color: #444; font-size: 0.85rem; }
.inline-form { display: inline; }

.role-badge { display: inline-block; padding: 2px 8px; font-size: 0.7rem; letter-spacing: 1px; text-transform: uppercase; }
.role-admin { color: #e74c3c; border: 1px solid #e74c3c; }
.role-member { color: #27ae60; border: 1px solid #27ae60; }

.success-msg { padding: 0.75rem 1rem; margin-bottom: 1rem; border: 1px solid #27ae60; color: #27ae60; font-size: 0.82rem; }
.error-msg { padding: 0.75rem 1rem; margin-bottom: 1rem; border: 1px solid #e74c3c; color: #e74c3c; font-size: 0.82rem; }
.info-msg { padding: 0.75rem 1rem; margin-bottom: 1rem; border: 1px solid #c8374b; color: #c8374b; font-size: 0.82rem; }

.setup-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.setup-box { border: 1px solid #111; padding: 3rem; text-align: center; max-width: 440px; width: 100%; }
.setup-box h2 { color: #fff; font-size: 1.1rem; letter-spacing: 2px; text-transform: uppercase; font-weight: normal; margin-bottom: 0.5rem; }
.setup-box p { color: #555; font-size: 0.82rem; margin-bottom: 1.5rem; }
.setup-box .form-group { text-align: left; }
.setup-box .btn { width: 100%; margin-top: 0.5rem; }

.user-info-bar { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 2rem; padding: 0.75rem 1rem; border: 1px solid #111; }
.user-info-bar .avatar { width: 28px; height: 28px; border-radius: 50%; }
.user-info-bar .name { color: #ccc; font-size: 0.82rem; }
.user-info-bar .role { margin-left: auto; }

.log-entry { border: 1px solid #111; margin-bottom: 1rem; }
.log-entry-head { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; border-bottom: 1px solid #111; }
.log-entry-title { color: #e0e0e0; font-size: 0.85rem; }
.log-entry-date { color: #444; font-size: 0.72rem; }
.log-entry-body { padding: 1rem; color: #888; font-size: 0.82rem; line-height: 1.7; white-space: pre-wrap; }

.pagination { margin-top: 1.5rem; text-align: center; display: flex; justify-content: center; gap: 0.3rem; }
.page-link { display: inline-block; padding: 0.3rem 0.7rem; border: 1px solid #1a1a1a; color: #555; text-decoration: none; font-size: 0.75rem; transition: color 0.2s, border-color 0.2s; }
.page-link:hover, .page-link.active { color: #fff; border-color: #555; }

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.product-card {
  border: 1px solid #111;
  padding: 1.5rem;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  border-color: #2a2a2a;
  transform: translateY(-2px);
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, #c8374b, transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.product-card:hover::before { opacity: 1; }

.product-card h3 {
  color: #fff;
  font-size: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: normal;
  margin-bottom: 0.5rem;
}

.product-card p {
  color: #666;
  font-size: 0.75rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.product-card .sub-status {
  font-size: 0.72rem;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
}

.product-card .sub-active { color: #27ae60; }
.product-card .sub-none { color: #555; }
.product-card .sub-expires { color: #888; font-size: 0.65rem; }

.product-card .btn {
  width: 100%;
  text-align: center;
}

/* Invite code box */
.invite-code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.1rem;
  color: #fff;
  letter-spacing: 4px;
  padding: 0.5rem;
  user-select: all;
}

/* Loader-style product cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.product-card {
  border: 1px solid #111;
  background: rgba(0,0,0,0.4);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
  position: relative;
}

.product-card:hover {
  border-color: #2a2a2a;
  transform: translateY(-3px);
}

.product-image {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: #0a0a0a;
}

.product-image .img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-image .img-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.85) 100%);
  pointer-events: none;
}

.product-image .product-banner {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  pointer-events: none;
}

.product-image .product-banner h3 {
  color: #fff;
  font-size: 1.1rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: normal;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.product-image .product-banner .view-btn {
  pointer-events: all;
  display: inline-block;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(255,255,255,0.15);
  color: #aaa;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  background: rgba(0,0,0,0.5);
}

.product-image .product-banner .view-btn:hover {
  color: #fff;
  border-color: #c8374b;
  background: rgba(200,55,75,0.2);
}

.product-card .product-info {
  padding: 1rem 1.25rem 1.25rem;
}

.product-card .product-info p {
  color: #666;
  font-size: 0.75rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.product-card .product-access {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid #111;
}

.product-card .access-badge {
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.product-card .access-badge.granted { color: #27ae60; }
.product-card .access-badge.denied { color: #555; }

.product-card .product-changelog {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #0a0a0a;
}

.product-card .product-changelog .cl-title {
  color: #444;
  font-size: 0.6rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.product-card .product-changelog .cl-entry {
  color: #555;
  font-size: 0.68rem;
  margin-bottom: 0.15rem;
}

.product-card .product-changelog .cl-entry .cl-ver {
  color: #777;
}

.product-card .product-changelog .cl-entry .cl-date {
  color: #333;
  font-size: 0.6rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.form-grid .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.form-grid .form-group label {
  font-size: 0.68rem;
  color: #555;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.form-grid .form-group input,
.form-grid .form-group select {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  color: #ccc;
  padding: 0.45rem 0.6rem;
  font-size: 0.78rem;
  font-family: inherit;
  outline: none;
  border-radius: 3px;
}
.form-grid .form-group input:focus,
.form-grid .form-group select:focus {
  border-color: #c8374b;
}
.form-grid .form-group button {
  white-space: nowrap;
}

.key-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.4rem;
}
.key-grid .invite-code {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  padding: 0.3rem 0.5rem;
  font-family: monospace;
  font-size: 0.72rem;
  color: #888;
  letter-spacing: 1px;
  border-radius: 3px;
  transition: border-color 0.2s;
}
.key-grid .invite-code:hover {
  border-color: #333;
}
