/* Base Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* CSS Variables */
:root {
  --bg: #ffffff;
  --fg: #111111;
  --primary: #0066ff;
  --secondary: #004cc7;
  --card-bg: #f9f9f9;
  --transition: 0.3s;
}

html[data-theme="dark"] {
  --bg: #111111;
  --fg: #eeeeee;
  --primary: #3399ff;
  --secondary: #007acc;
  --card-bg: #1e1e1e;
}

/* Global Styles */
html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

/* Header & Nav */
header {
  background: var(--card-bg);
  position: sticky;
  top: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: background var(--transition);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 600;
  color: var(--primary);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--fg);
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
}

#theme-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--fg);
  transition: transform var(--transition);
}

#theme-toggle:hover {
  transform: rotate(20deg);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 6rem 2rem;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.hero p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

.btn {
  background: var(--primary);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background var(--transition);
}

.btn:hover {
  background: var(--secondary);
}

/* Features Grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  padding: 4rem 0;
}

.card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Footer */
footer {
  background: var(--card-bg);
  text-align: center;
  padding: 2rem 0;
  margin-top: 4rem;
  transition: background var(--transition);
}

footer a {
  color: var(--fg);
  text-decoration: none;
  transition: color var(--transition);
}

footer a:hover {
  color: var(--primary);
}

/* 1. Auth section fills the viewport minus header/footer */
.auth {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px - 120px); /* adjust if your header/footer heights differ */
  background: var(--bg);
  padding: 2rem 0;
}

/* 2. Spacious card matching theme colors */
.auth-card {
  background: var(--card-bg);
  max-width: 420px;
  width: 100%;
  padding: 3rem 2.5rem;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
  transition: transform var(--transition), box-shadow var(--transition);
}

.auth-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.16);
}

/* 3. Card heading matches brand accent */
.auth-card h2 {
  margin-bottom: 1.75rem;
  font-weight: 600;
  color: var(--primary);
  text-align: center;
}

/* 4. Form inputs with full width and clear focus states */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--fg);
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--card-bg);
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.15);
  outline: none;
}


/* 5. Bold, full-width CTA button */
.auth-card button {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition);
}

.auth-card button:hover {
  background: var(--secondary);
}

/* 6. Secondary links with a touch of spacing */
.auth-card .note {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--fg);
  text-align: center;
}

.auth-card .note a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

.auth-card .note a:hover {
  color: var(--secondary);
}

/* Admin Panel Container */
.admin-panel {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem 0;
}

/* Panel Card Base */
.panel-card {
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  padding: 1.75rem 2rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.panel-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
}

.panel-card h2 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: var(--primary);
  font-weight: 600;
}

/* Uniform Form Styling */
.panel-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
}

.panel-form label {
  grid-column: span 2;
  font-weight: 500;
  color: var(--fg);
}

.panel-form input,
.panel-form select,
.panel-form textarea {
  grid-column: span 2;
  padding: 0.75rem 1rem;
  border: 1px solid var(--card-bg);
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.panel-form input:focus,
.panel-form select:focus,
.panel-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.15);
  outline: none;
}

/* Single-Column on Small Screens */
@media (max-width: 768px) {
  .panel-form {
    grid-template-columns: 1fr;
  }
}

/* Button Overrides */
.panel-form button {
  grid-column: span 2;
  justify-self: start;
  padding: 0.6rem 1.2rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.panel-form button:hover {
  background: var(--secondary);
}

/* Action Grid for Multiple Forms */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

/* Divider Between Cards */
.admin-panel .panel-card + .panel-card {
  margin-top: 1rem;
}
.no-messages {
  text-align: center;
  font-style: italic;
  color: var(--fg);
  opacity: 0.7;
  margin-top: 2rem;
}

.mention {
    color: #ffd700;
    font-weight: bold;
    cursor: pointer;
}
.profile-card {
    position: absolute;
    z-index: 999;
    display: none;
    background: #252934;
    border: 1px solid #00ffff;
    padding: 16px;
    border-radius: 10px;
}

/* 5. Bold, full-width CTA button */
.change-card button {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition);
}

.change-card button:hover {
  background: var(--secondary);
}

/* 6. Secondary links with a touch of spacing */
.change-card .note {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--fg);
  text-align: center;
}

.change-card .note a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

.change-card .note a:hover {
  color: var(--secondary);
}
/* FORM ELEMENTS */
textarea,
input[type="text"],
select {
  width: 100%;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0 1rem;
  background: var(--card-bg, #1e1e1e);
  color: var(--fg);
  border: 1px solid var(--card-bg);
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--primary, #00aaff);
  box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.2);
  outline: none;
}

/* BADGES */
.badge {
  background: #2ecc71;
  color: #111;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
  box-shadow: 0 0 10px #2ecc71;
  animation: pulseGlow 1.6s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 6px #2ecc71; }
  50% { box-shadow: 0 0 12px #2ecc71; }
}

/* LAYOUT WRAPPER */
.forums {
  max-width: 960px;
  margin: 3rem auto;
  padding: 2rem;
  background: var(--card-bg, #1c1f26);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  position: relative;
}

/* PAGINATION */
.pagination {
  text-align: center;
  margin-top: 2rem;
}

.pagination a {
  color: var(--primary, #00ffff);
  margin: 0 0.75rem;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.pagination a:hover {
  color: var(--secondary, #007acc);
}

/* POST & REPLY CARDS */
.post-card,
.reply-card {
  background: var(--card-bg, #2c3e50);
  padding: 1.25rem 1.5rem;
  margin-top: 1rem;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,255,255,0.05);
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover,
.reply-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,255,255,0.08);
}

/* BUTTONS */
.button,
.toggle-btn,
.reaction-btn {
  background: var(--primary, #00ffff);
  color: #111;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.button:hover {
  background: var(--secondary, #007acc);
}

.reaction-btn {
  background: transparent;
  font-size: 1.2rem;
  margin-right: 8px;
  color: var(--primary);
}

/* MENTIONS */
.mention {
  color: #ffd700;
  font-weight: bold;
}

/* PROFILE CARD POPUP */
.profile-card {
  position: absolute;
  left: 0;
  transform: translateY(8px);
  background: #252934;
  color: white;
  padding: 1rem;
  min-width: 280px;
  max-width: 320px;
  border-radius: 10px;
  border: 1px solid var(--primary);
  box-shadow: 0 8px 24px rgba(0, 255, 255, 0.2);
  z-index: 9999;
  font-size: 0.9375rem;
  line-height: 1.4;
  display: none;
}

/* PROFILE STRUCTURE */
.profile-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.profile-avatar {
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.25rem;
  margin-right: 0.75rem;
  font-weight: bold;
}

.profile-meta {
  flex: 1;
}

.profile-bio {
  font-style: italic;
  color: #c7c7c7;
  margin-bottom: 0.75rem;
}

.profile-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: #aaa;
  margin-bottom: 0.75rem;
}

/* USERNAME INTERACTION */
.username {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
  transition: color 0.3s;
}

.username:hover {
  color: var(--secondary);
}

.username:hover ~ .profile-card,
.profile-card:hover {
  display: block;
}

.warning-box {
  background: linear-gradient(to right, #3a2f00, #4a3f0f);
  border-left: 6px solid #ffaa00;
  padding: 20px;
  border-radius: 10px;
  color: #ffdd88;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  margin-bottom: 20px;
}

.warning-box h3 {
  margin-top: 0;
  color: #ffcc00;
}
.tempban-box {
  background: linear-gradient(to right, #2f0000, #4a1f1f);
  border-left: 6px solid #ff5555;
  padding: 20px;
  border-radius: 10px;
  color: #ffb3b3;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  margin-bottom: 20px;
}

.tempban-box h2 {
  margin-top: 0;
  color: #ff7777;
}
.terminated-box {
  background: linear-gradient(to right, #240606, #3a0f0f);
  border-left: 6px solid #cc0000;
  padding: 25px;
  border-radius: 12px;
  color: #ff9999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  margin-top: 30px;
  text-align: center;
}

.terminated-box h2 {
  color: #ff4444;
}
