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

/* Age gate */
.age-gate {
  position: fixed;
  inset: 0;
  background: #1a1a2e;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.age-gate.hidden {
  display: none;
}

.age-gate-box {
  text-align: center;
  padding: 40px;
  max-width: 420px;
}

.age-gate-box h1 {
  color: #e94560;
  font-size: 2em;
  margin-bottom: 16px;
}

.age-gate-box p {
  color: #ccc;
  margin-bottom: 10px;
  line-height: 1.5;
}

.age-gate-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

body {
  font-family: "Trebuchet MS", "Lucida Grande", Arial, sans-serif;
  background: #1a1a2e;
  color: #e0e0e0;
  min-height: 100vh;
}

header {
  background: linear-gradient(135deg, #16213e, #0f3460);
  border-bottom: 3px solid #e94560;
  padding: 20px;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: left;
}

.header-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

header h1 {
  font-size: 2.2em;
  color: #e94560;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 2px;
}

header .subtitle {
  color: #a0a0b0;
  margin-top: 5px;
  font-style: italic;
}

nav {
  display: flex;
  justify-content: center;
  gap: 0;
  background: #16213e;
  border-bottom: 1px solid #333;
  flex-wrap: wrap;
}

.nav-btn {
  background: none;
  border: none;
  color: #a0a0b0;
  padding: 12px 24px;
  font-size: 1em;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}

.nav-btn:hover {
  color: #fff;
  background: rgba(233, 69, 96, 0.1);
}

.nav-btn.active {
  color: #e94560;
  border-bottom-color: #e94560;
}

.nav-mod, .nav-admin {
  color: #666;
  font-size: 0.9em;
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px 20px;
}

.search-bar {
  margin-bottom: 20px;
}

.search-bar input {
  width: 100%;
  padding: 12px 16px;
  background: #16213e;
  border: 1px solid #333;
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 1em;
}

.search-bar input:focus {
  border-color: #e94560;
  outline: none;
}

.section {
  display: none;
}

.section.active {
  display: block;
}

/* Gallery */
.profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.profile-card {
  background: #16213e;
  border: 1px solid #333;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.profile-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(233, 69, 96, 0.2);
}

.profile-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.profile-info {
  padding: 12px;
}

.profile-info h3 {
  color: #fff;
  font-size: 1.1em;
  margin-bottom: 6px;
}

.profile-info .discord-tag {
  color: #7289da;
  font-family: monospace;
  font-size: 0.95em;
}

.btn-reveal {
  background: #0f3460;
  color: #7289da;
  border: 1px solid #333;
  padding: 4px 12px;
  font-size: 0.85em;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.2s;
}

.btn-reveal:hover {
  background: #163a6a;
}

.profile-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.78em;
  color: #777;
}

.profile-meta .expiring-soon {
  color: #e94560;
}

.manage-meta {
  display: block;
  margin-top: 4px;
  font-size: 0.78em;
  color: #777;
}

.empty-msg {
  text-align: center;
  color: #666;
  font-size: 1.2em;
  padding: 60px 20px;
}

/* Forms */
h2 {
  color: #e94560;
  margin-bottom: 20px;
}

h3 {
  color: #ccc;
  margin: 20px 0 12px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: #ccc;
  font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="file"] {
  width: 100%;
  padding: 10px;
  background: #16213e;
  border: 1px solid #333;
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 1em;
}

.form-group input:focus {
  border-color: #e94560;
  outline: none;
}

.btn-submit {
  background: #e94560;
  color: #fff;
  border: none;
  padding: 12px 30px;
  font-size: 1em;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-submit:hover {
  background: #c73652;
}

.btn-small {
  background: #333;
  color: #ccc;
  border: none;
  padding: 6px 14px;
  font-size: 0.85em;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-small:hover {
  background: #444;
}

.btn-danger {
  background: #c0392b;
}

.btn-danger:hover {
  background: #a93226;
}

.btn-approve {
  background: #27ae60;
}

.btn-approve:hover {
  background: #219a52;
}

.result-box {
  margin-top: 20px;
  padding: 16px;
  border-radius: 4px;
  background: #16213e;
  border: 1px solid #333;
}

.result-box.success {
  border-color: #27ae60;
}

.result-box.error {
  border-color: #c0392b;
}

.result-box .token-display {
  background: #0f3460;
  padding: 10px;
  margin-top: 10px;
  border-radius: 4px;
  font-family: monospace;
  word-break: break-all;
  color: #f1c40f;
  user-select: all;
}

/* CAPTCHA */
.captcha-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.captcha-group label {
  width: 100%;
}

.captcha-group input {
  flex: 1;
  min-width: 120px;
}

#captcha-question {
  color: #f1c40f;
  font-family: monospace;
  font-size: 1.1em;
}

/* Login panels */
.login-panel {
  max-width: 400px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.panel-header h2 {
  margin-bottom: 0;
}

/* Admin settings */
.admin-settings {
  background: #16213e;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #333;
  margin-bottom: 20px;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin-top: 8px;
}

.toggle-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #e94560;
}

/* Mod password section */
.mod-password-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #333;
}

.mod-password-section h4 {
  color: #ccc;
  margin-bottom: 8px;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-form input {
  flex: 1;
  padding: 8px;
  background: #0f3460;
  border: 1px solid #333;
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 0.95em;
}

.inline-form input:focus {
  border-color: #e94560;
  outline: none;
}

.inline-form input[readonly] {
  color: #888;
}

/* Admin/Mod profile list */
.manage-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #16213e;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
}

.manage-card img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.manage-card-info {
  flex: 1;
  min-width: 0;
}

.manage-card-info h4 {
  color: #fff;
  margin-bottom: 4px;
}

.manage-card-info .discord-tag {
  color: #7289da;
  font-family: monospace;
  font-size: 0.9em;
}

.manage-card-info .status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75em;
  font-weight: bold;
  margin-left: 8px;
  text-transform: uppercase;
}

.status-badge.approved {
  background: #27ae60;
  color: #fff;
}

.status-badge.pending {
  background: #f39c12;
  color: #000;
}

.manage-card-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

footer {
  text-align: center;
  padding: 20px;
  color: #555;
  border-top: 1px solid #222;
  margin-top: 40px;
}

.bmc-link {
  display: inline-block;
  background: #ffdd00;
  color: #000;
  font-weight: bold;
  padding: 8px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.95em;
  margin-bottom: 12px;
  transition: background 0.2s;
}

.bmc-link:hover {
  background: #e6c700;
}
