@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Cinzel:wght@400;600;700&family=Raleway:ital,wght@0,300;0,400;0,500;0,600;1,300&display=swap');

:root {
  --bg-void: #040508;
  --bg-dark: #080b10;
  --bg-card: rgba(10, 14, 22, 0.92);
  --bg-card-hover: rgba(15, 20, 32, 0.96);
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --gold-dim: #7a6330;
  --crimson: #8b1a1a;
  --crimson-light: #c0392b;
  --silver: #a8b4c8;
  --silver-dim: #5a6478;
  --text-primary: #e8dcc8;
  --text-secondary: #8a9ab8;
  --text-dim: #4a5568;
  --border: rgba(201, 168, 76, 0.2);
  --border-glow: rgba(201, 168, 76, 0.5);
  --shadow-gold: 0 0 30px rgba(201, 168, 76, 0.15);
  --shadow-deep: 0 20px 60px rgba(0, 0, 0, 0.8);
  --radius: 4px;
  --radius-lg: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Raleway', sans-serif;
  background-color: var(--bg-void);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ═══════════════════════════════════════════
   BACKGROUND EFFECTS
═══════════════════════════════════════════ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(139, 26, 26, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(201, 168, 76, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse 40% 60% at 0% 50%, rgba(30, 40, 80, 0.3) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Noise texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ═══════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════ */
.wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ═══════════════════════════════════════════
   HEADER / NAVBAR
═══════════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(4, 5, 8, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), var(--gold), var(--gold-dim), transparent);
}

.nav-brand {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-shadow: 0 0 20px rgba(201, 168, 76, 0.4);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-brand .brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--crimson), var(--crimson-light));
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 0 15px rgba(139, 26, 26, 0.4);
}

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

.nav-links a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.05em;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
  background: rgba(201, 168, 76, 0.08);
  border-color: var(--border);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
}

.nav-user .user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
}

.nav-user .badge-admin {
  background: linear-gradient(135deg, var(--crimson), #a83232);
  color: #ffd;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  font-size: 0.65rem;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.1em;
  border: 1px solid rgba(201, 168, 76, 0.3);
}

/* ═══════════════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════════════ */
.main-content {
  flex: 1;
  padding: 2.5rem 2rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════
   HERO / PAGE HEADER
═══════════════════════════════════════════ */
.page-hero {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.page-hero .eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.page-hero h1 {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--gold);
  line-height: 1.1;
  text-shadow: 0 0 40px rgba(201, 168, 76, 0.3), 0 2px 0 rgba(0,0,0,0.5);
  margin-bottom: 0.75rem;
}

.page-hero p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Decorative separator */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem auto;
  max-width: 300px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim));
}
.divider::after { background: linear-gradient(90deg, var(--gold-dim), transparent); }
.divider span {
  color: var(--gold);
  font-size: 1rem;
}

/* ═══════════════════════════════════════════
   CARDS
═══════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

.card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-gold);
}

.card-title {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ═══════════════════════════════════════════
   FORMS
═══════════════════════════════════════════ */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.7rem 1rem;
  background: rgba(4, 5, 8, 0.8);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: 'Raleway', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-control::placeholder { color: var(--text-dim); }

.form-control:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.08), inset 0 1px 3px rgba(0,0,0,0.3);
}

select.form-control option {
  background: #0d1117;
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), transparent);
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(135deg, #a07820, var(--gold));
  color: #0a0a08;
  box-shadow: 0 4px 15px rgba(201, 168, 76, 0.25), inset 0 1px 0 rgba(255,255,255,0.1);
  border: 1px solid rgba(201, 168, 76, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  box-shadow: 0 6px 25px rgba(201, 168, 76, 0.4), inset 0 1px 0 rgba(255,255,255,0.15);
  transform: translateY(-1px);
  color: #050503;
}

.btn-danger {
  background: linear-gradient(135deg, #6b1010, var(--crimson-light));
  color: #ffeedd;
  border: 1px solid rgba(139, 26, 26, 0.5);
  box-shadow: 0 4px 15px rgba(139, 26, 26, 0.2);
}

.btn-danger:hover {
  background: linear-gradient(135deg, var(--crimson-light), #e74c3c);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(201, 168, 76, 0.05);
  color: var(--gold);
  border-color: var(--border-glow);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.7rem;
}

.btn-full { width: 100%; }

/* ═══════════════════════════════════════════
   ALERTS
═══════════════════════════════════════════ */
.alert {
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  line-height: 1.5;
}

.alert-error {
  background: rgba(139, 26, 26, 0.15);
  border: 1px solid rgba(139, 26, 26, 0.4);
  color: #f8a8a8;
}

.alert-success {
  background: rgba(26, 100, 50, 0.15);
  border: 1px solid rgba(26, 100, 50, 0.4);
  color: #9de8b8;
}

.alert-info {
  background: rgba(30, 60, 110, 0.2);
  border: 1px solid rgba(60, 100, 180, 0.3);
  color: #aac8f8;
}

.alert-warning {
  background: rgba(160, 120, 20, 0.15);
  border: 1px solid rgba(201, 168, 76, 0.3);
  color: #e8c97a;
}

/* ═══════════════════════════════════════════
   VOTE TOPS GRID
═══════════════════════════════════════════ */
.tops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.top-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.top-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--gold-dim), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.top-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}

.top-card:hover::after { opacity: 1; }

.top-card.voted {
  border-color: rgba(26, 100, 50, 0.4);
  background: rgba(10, 14, 22, 0.95);
}

.top-card.voted::after {
  background: linear-gradient(180deg, transparent, #2d8a5a, transparent);
  opacity: 1;
}

.top-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.top-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.1), rgba(201, 168, 76, 0.05));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.top-name {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: var(--gold);
  font-weight: 600;
}

.top-status {
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.top-status.ok { color: #5cb85c; }
.top-status.pending { color: var(--gold-dim); }

.top-cooldown {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  padding: 0.4rem;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ═══════════════════════════════════════════
   REWARDS SECTION
═══════════════════════════════════════════ */
.rewards-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.reward-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 2px;
  font-size: 0.8rem;
  color: var(--gold-light);
  font-family: 'Cinzel', serif;
}

/* ═══════════════════════════════════════════
   TABLES
═══════════════════════════════════════════ */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

thead tr {
  border-bottom: 1px solid var(--border);
}

th {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
  padding: 0.8rem 1rem;
  text-align: left;
  font-weight: 600;
}

td {
  padding: 0.8rem 1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(201, 168, 76, 0.05);
}

tr:hover td { background: rgba(201, 168, 76, 0.03); }

/* ═══════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════ */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-box {
  width: 100%;
  max-width: 420px;
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo .logo-text {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 30px rgba(201, 168, 76, 0.4);
}

.login-logo .logo-sub {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

/* ═══════════════════════════════════════════
   INSTALL WIZARD
═══════════════════════════════════════════ */
.wizard-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.wizard-box {
  width: 100%;
  max-width: 600px;
}

.wizard-steps {
  display: flex;
  gap: 0;
  margin-bottom: 2.5rem;
  position: relative;
}

.wizard-steps::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: var(--border);
  transform: translateY(-50%);
  z-index: 0;
}

.wizard-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  position: relative;
  z-index: 1;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  color: var(--text-dim);
  transition: all 0.3s;
}

.wizard-step.active .step-num {
  background: var(--gold);
  border-color: var(--gold);
  color: #0a0a08;
  box-shadow: 0 0 15px rgba(201, 168, 76, 0.4);
}

.wizard-step.done .step-num {
  background: rgba(45, 138, 90, 0.3);
  border-color: #2d8a5a;
  color: #5cb85c;
}

.step-label {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.wizard-step.active .step-label { color: var(--gold); }

/* Project selector */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.project-option {
  position: relative;
}

.project-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.project-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.25rem 0.75rem;
  background: rgba(4, 5, 8, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.project-option label:hover {
  border-color: var(--gold-dim);
  background: rgba(201, 168, 76, 0.05);
}

.project-option input:checked + label {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.1);
  box-shadow: 0 0 15px rgba(201, 168, 76, 0.15);
}

.project-option .proj-icon {
  font-size: 2rem;
  line-height: 1;
}

.project-option .proj-name {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.project-option input:checked + label .proj-name { color: var(--gold); }

/* ═══════════════════════════════════════════
   STATS ROW
═══════════════════════════════════════════ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
}

.stat-value {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: 'Cinzel', serif;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════
   ADMIN PANEL
═══════════════════════════════════════════ */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}

/* Toggle switch */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle {
  position: relative;
  width: 38px;
  height: 20px;
}

.toggle input {
  opacity: 0;
  width: 0; height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 14px; width: 14px;
  left: 2px; top: 2px;
  background: var(--text-dim);
  border-radius: 50%;
  transition: 0.3s;
}

.toggle input:checked + .toggle-slider {
  background: rgba(201, 168, 76, 0.2);
  border-color: var(--gold-dim);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(18px);
  background: var(--gold);
}

/* ═══════════════════════════════════════════
   LANGUAGE SWITCHER — fixo canto sup. direito
═══════════════════════════════════════════ */
.lang-switcher {
  position: fixed;
  top: 10px;
  right: 16px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  background: rgba(4, 5, 8, 0.82);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 8px;
  padding: 0.28rem 0.35rem;
  backdrop-filter: blur(14px);
  box-shadow: 0 2px 16px rgba(0,0,0,0.55), 0 0 0 1px rgba(201,168,76,0.07);
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.55rem;
  line-height: 1;
  width: 38px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  opacity: 0.42;
  transition: opacity 0.18s, background 0.15s, transform 0.15s, box-shadow 0.15s;
  padding: 0;
  position: relative;
}

.lang-btn img {
  width: 26px;
  height: 19px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
  pointer-events: none;
}

.lang-btn:hover {
  opacity: 0.82;
  background: rgba(201, 168, 76, 0.1);
  transform: scale(1.12);
}

.lang-btn.active {
  opacity: 1;
  background: rgba(201, 168, 76, 0.16);
  box-shadow: 0 0 10px rgba(201,168,76,0.2), inset 0 1px 0 rgba(201,168,76,0.12);
}

.lang-btn.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(201,168,76,0.6);
}

@media (max-width: 480px) {
  .lang-switcher { top: 8px; right: 8px; padding: 0.22rem 0.28rem; }
  .lang-btn { width: 32px; height: 29px; font-size: 1.25rem; }
}

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.footer {
  position: relative;
  z-index: 1;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: 'Cinzel', serif;
  letter-spacing: 0.1em;
}

.footer a { color: var(--gold-dim); text-decoration: none; }
.footer a:hover { color: var(--gold); }

.footer-ip {
  display: inline-block;
  margin-left: 0.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(201, 168, 76, 0.18);
  color: var(--text-dim);
  opacity: 0.9;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════
   UTILITIES
═══════════════════════════════════════════ */
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-dim); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  font-size: 0.65rem;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.badge-success {
  background: rgba(45, 138, 90, 0.2);
  border: 1px solid rgba(45, 138, 90, 0.4);
  color: #6dd8a0;
}

.badge-danger {
  background: rgba(139, 26, 26, 0.2);
  border: 1px solid rgba(139, 26, 26, 0.4);
  color: #e88888;
}

.badge-gold {
  background: rgba(201, 168, 76, 0.15);
  border: 1px solid rgba(201, 168, 76, 0.3);
  color: var(--gold);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 768px) {
  .navbar { padding: 0 1rem; }
  .nav-links { display: none; }
  .main-content { padding: 1.5rem 1rem; }
  .tops-grid { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .page-hero h1 { font-size: 1.4rem; }
  .wizard-box, .login-box { max-width: 100%; }
}

/* ═══════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 15px rgba(201, 168, 76, 0.15); }
  50% { box-shadow: 0 0 30px rgba(201, 168, 76, 0.3); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.animate-in {
  animation: fadeUp 0.5s ease both;
}

.card { animation: fadeUp 0.4s ease both; }
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }

.top-card { animation: fadeUp 0.4s ease both; }
.top-card:nth-child(1) { animation-delay: 0.05s; }
.top-card:nth-child(2) { animation-delay: 0.1s; }
.top-card:nth-child(3) { animation-delay: 0.15s; }
.top-card:nth-child(4) { animation-delay: 0.2s; }

/* Loading state */
.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn.loading::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 0.4rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Item reward rows */
.reward-row {
  display: grid;
  grid-template-columns: 1fr 100px auto;
  gap: 0.5rem;
  align-items: end;
  margin-bottom: 0.5rem;
}

.reward-row:last-child { margin-bottom: 0; }

#rewards-container .reward-row + .reward-row {
  padding-top: 0.5rem;
  border-top: 1px solid rgba(201, 168, 76, 0.05);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border: 1px solid var(--border);
  background: rgba(139, 26, 26, 0.15);
  color: #e88888;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-icon:hover { background: rgba(139, 26, 26, 0.3); border-color: var(--crimson); }

.section-heading {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
  padding: 0.5rem 0;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ── Vote image button ───────────────────────────────────────────────────── */
.vote-img-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
  border-radius: var(--radius);
}
.vote-img-btn img {
  max-width: 180px;
  max-height: 60px;
  width: auto;
  height: auto;
  display: block;
  border-radius: var(--radius);
}
.vote-img-btn:hover:not(:disabled) {
  transform: scale(1.05);
  filter: brightness(1.15) drop-shadow(0 0 6px rgba(201,168,76,.5));
}
.vote-img-btn:disabled { cursor: not-allowed; }
.vote-img-btn.voted-overlay { cursor: default; }
