/* ==================== BLACK-GOLD-WHITE THEME - FULL & COMPLETE ==================== */
/* Elegant, luxurious design: Black for depth, Gold for accents, White for clarity */
/* Exact adaptation of original style.css - all structures, rules, and features preserved */

:root {
  --primary-color: #D4AF37; /* Elegant gold primary */
  --primary-dark: #B8942F; /* Deeper gold */
  --secondary-color: #FFD700; /* Bright gold accent */
  --tertiary-color: #F5F5F5; /* Soft white */
  --accent-color: #FFFFFF; /* Pure white */
  --success-color: #D4AF37; /* Gold for success */
  --error-color: #FF6B6B; /* Retained for clear errors */
  --warning-color: #FFD700; /* Gold for warnings */
  --info-color: #D4AF37; /* Gold for info */
  --light-bg: #1a1a1e; /* Dark gray-black */
  --dark-bg: #0a0a0a; /* Pure black */
  --card-bg: #1a1a1e; /* Dark cards */
  --border-color: #333333; /* Subtle dark borders */
  --text-primary: #FFFFFF; /* White primary text */
  --text-secondary: #CCCCCC; /* Light gray secondary */
  --text-light: #999999; /* Muted gray */
  --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smoother elegant easing */
  --shadow-sm: 0 2px 8px rgba(212, 175, 55, 0.2); /* Gold-tinted subtle shadow */
  --shadow-md: 0 8px 24px rgba(212, 175, 55, 0.15); /* Medium gold glow */
  --shadow-lg: 0 16px 48px rgba(212, 175, 55, 0.1); /* Large elegant shadow */
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1e 100%); /* Black gradient bg */
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ==================== TYPOGRAPHY ==================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

h1 {
  font-size: 3.5rem;
  background: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%); /* Gold gradient */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2.25rem;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
}

h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}

a:hover {
  color: var(--primary-dark);
}

/* ==================== NAVIGATION ==================== */

.navbar {
  background: rgba(255, 255, 255, 0.95); /* Adjusted for theme - semi-white on black for elegance */
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid rgba(212, 175, 55, 0.1); /* Gold border */
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative; /* For absolute positioning of menu */
}

.nav-logo {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.nav-logo:hover {
  transform: scale(1.05);
}

.nav-logo::before {
  content: '🏆';
  font-size: 2rem;
  display: block;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2.5rem;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #D4AF37, #FFD700); /* Gold underline */
  transition: width 0.4s ease;
}

.nav-link:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.nav-link:hover::after {
  width: 100%;
}

.logout-btn {
  background: none;
  border: none;
  padding: 0.5rem 0;
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  position: relative;
}

.logout-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #D4AF37, #FFD700);
  transition: width 0.4s ease;
}

.logout-btn:hover {
  color: var(--primary-color);
}

.logout-btn:hover::after {
  width: 100%;
}

/* Pure CSS mobile hamburger */
.menu-toggle {
  display: none; /* Hidden checkbox */
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: auto; /* Pushes to right */
  z-index: 1001;
}

.hamburger span {
  width: 100%;
  height: 3px;
  background: var(--text-primary); /* White lines */
  border-radius: 2px;
  transition: 0.4s;
  transform-origin: 1px;
}

/* Hamburger to X animation on check (using ~ sibling) */
#menu-toggle:checked ~ .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

#menu-toggle:checked ~ .hamburger span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

#menu-toggle:checked ~ .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.nav-link {
  text-decoration: none;
  color: inherit;
  transition: color 0.4s;
}

.nav-link:hover {
  color: var(--primary-color); /* Gold hover */
}

/* Mobile styles */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%; /* Below navbar */
    left: 0;
    width: 100%;
    height: calc(100vh - 100%);
    background: var(--card-bg); /* Dark menu bg */
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    margin: 0;
    padding: 2rem 0;
    box-shadow: var(--shadow-md);
    transform: translateX(-100%);
    transition: transform 0.4s ease-in-out;
    z-index: 1000;
    opacity: 0;
    visibility: hidden; /* Initial hidden state */
  }

  /* Show and slide menu when checkbox is checked */
  #menu-toggle:checked ~ .nav-menu {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }

  /* Animate list items on menu show */
  .nav-menu li {
    opacity: 0;
    transform: translateX(-20px);
    animation: slideIn 0.4s forwards;
    width: 100%;
    text-align: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
  }

  /* Delays for staggered animation (applies when menu is shown) */
  #menu-toggle:checked ~ .nav-menu li:nth-child(1) { animation-delay: 0.1s; }
  #menu-toggle:checked ~ .nav-menu li:nth-child(2) { animation-delay: 0.2s; }
  #menu-toggle:checked ~ .nav-menu li:nth-child(3) { animation-delay: 0.3s; }
  #menu-toggle:checked ~ .nav-menu li:nth-child(4) { animation-delay: 0.4s; }
  /* Add more for additional links */

  @keyframes slideIn {
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  /* Ensure menu closes on link click */
  .nav-link {
    display: block;
    width: 100%;
  }
}

/* ==================== MAIN CONTAINER ==================== */

.container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
  min-height: calc(100vh - 300px);
}

/* ==================== HERO SECTION ==================== */

.hero-section {
  text-align: center;
  padding: 6rem 2rem;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%); /* Gold-tinted */
  border-radius: 20px;
  margin-bottom: 4rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s infinite ease-in-out;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 25s infinite ease-in-out 2s;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-logo {
  font-size: 5rem;
  margin-bottom: 1rem;
  animation: bounce 2s infinite;
}

.hero-section h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: slideInDown 0.8s ease;
}

.hero-section p {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  animation: slideInUp 0.8s ease 0.2s backwards;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: slideInUp 0.8s ease 0.4s backwards;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(30px) rotate(5deg);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== FOOTER ==================== */

.footer {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); /* Dark gradient */
  color: white;
  text-align: center;
  padding: 3rem 2rem;
  margin-top: 4rem;
  border-top: 2px solid rgba(212, 175, 55, 0.2); /* Gold border */
}

.footer p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

/* ==================== BUTTONS ==================== */

.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%); /* Gold gradient */
  color: #000000; /* Black text for contrast */
  position: relative;
  z-index: 1;
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(212, 175, 55, 0.5); /* Gold glow */
}

.btn-secondary {
  background: white;
  color: #D4AF37; /* Gold text */
  border: 2px solid #D4AF37;
  font-weight: 700;
}

.btn-secondary:hover {
  background: #D4AF37; /* Gold bg */
  color: white;
  transform: translateY(-4px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ==================== FORMS ==================== */

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.95rem;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  background: var(--card-bg); /* Dark bg */
  color: var(--text-primary); /* White text */
}

/* ... (Previous content up to input:focus cutoff) ... */

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color); /* Gold focus border */
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15); /* Gold focus glow */
  transform: translateY(-2px);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-light);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

small {
  display: block;
  margin-top: 0.5rem;
  color: var(--text-light);
  font-size: 0.85rem;
}

/* ==================== MESSAGES & ALERTS ==================== */

.message,
.alert {
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  animation: slideInDown 0.3s ease;
  border-left: 4px solid;
  background: var(--card-bg); /* Dark bg for theme */
  color: var(--text-primary);
  border: 1px solid rgba(212, 175, 55, 0.2); /* Subtle gold border */
}

.message-success,
.alert-success {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.05) 100%); /* Gold-tinted success */
  color: var(--text-primary);
  border-left-color: var(--success-color);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.message-error,
.alert-error {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 107, 107, 0.05) 100%);
  color: #FFFFFF; /* White text for contrast */
  border-left-color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.3);
}

.message-warning,
.alert-warning {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%); /* Gold-tinted warning */
  color: var(--text-primary);
  border-left-color: var(--warning-color);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.message-info,
.alert-info {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.05) 100%); /* Gold-tinted info */
  color: var(--text-primary);
  border-left-color: var(--info-color);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

/* ==================== AUTH PAGES ==================== */

.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 200px);
  padding: 2rem;
  background: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%); /* Gold gradient bg */
}

.auth-card {
  background: var(--card-bg); /* Dark card */
  padding: 3rem 2.5rem;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 450px;
  animation: slideInUp 0.6s ease;
  position: relative;
  overflow: hidden;
  color: var(--text-primary); /* White text */
}

.auth-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.auth-card h1 {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.auth-form {
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.auth-link {
  text-align: center;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

.auth-link a {
  font-weight: 700;
  color: var(--primary-color); /* Gold links */
}

/* ==================== NOMINATIONS PAGE ==================== */

.nominations-container {
  max-width: 1400px;
  margin: 0 auto;
}

.nominations-header {
  margin-bottom: 2rem;
  animation: slideInDown 0.6s ease;
}

.nominations-header h1 {
  margin-bottom: 1.5rem;
}

.theme-card {
  background: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%); /* Gold gradient */
  color: #000000; /* Black text for contrast */
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  animation: slideInDown 0.6s ease 0.1s backwards;
}

.theme-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 15s infinite ease-in-out;
}

.theme-card h2 {
  margin-bottom: 0.5rem;
  color: #000000; /* Black text */
  position: relative;
  z-index: 2;
}

.theme-card p {
  margin-bottom: 0.5rem;
  opacity: 0.95;
  position: relative;
  z-index: 2;
  color: #000000; /* Black text */
}

.week-number {
  font-weight: 700;
  font-size: 0.95rem;
  opacity: 0.9;
  position: relative;
  z-index: 2;
  color: #000000; /* Black text */
}

.nominations-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.nominate-section,
.my-nominations-section {
  background: var(--card-bg); /* Dark bg */
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  animation: slideInUp 0.6s ease;
  border-top: 4px solid transparent;
  border-image: linear-gradient(90deg, #D4AF37, #FFD700) 1; /* Gold border */
  color: var(--text-primary); /* White text */
}

.nominate-section {
  animation-delay: 0.1s;
}

.my-nominations-section {
  animation-delay: 0.2s;
}

.nominate-section h3,
.my-nominations-section h3 {
  color: var(--primary-color); /* Gold headings */
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.nomination-form {
  margin-bottom: 1.5rem;
}

.nominations-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nomination-card {
  background: linear-gradient(135deg, #1a1a1e 0%, #0a0a0a 100%); /* Dark gradient */
  border-left: 5px solid var(--primary-color); /* Gold left border */
  padding: 1.75rem;
  border-radius: 12px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  color: var(--text-primary);
}

.nomination-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: -50px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%); /* Gold radial */
  border-radius: 50%;
}

.nomination-card:hover {
  transform: translateX(8px) translateY(-4px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.2); /* Gold shadow */
  background: linear-gradient(135deg, #2a2a2e 0%, #1a1a1e 100%);
}

.nomination-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

.nomination-header h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.timestamp {
  font-size: 0.85rem;
  color: var(--text-light);
  white-space: nowrap;
  margin-left: 1rem;
  background: rgba(212, 175, 55, 0.1); /* Gold-tinted bg */
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

.nomination-reason {
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
  position: relative;
  z-index: 2;
  font-size: 0.95rem;
}

.empty-state {
  text-align: center;
  color: var(--text-light);
  padding: 3rem 2rem;
  font-style: italic;
  font-size: 1.05rem;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* ==================== LEADERBOARD ==================== */

.leaderboard-section {
  background: var(--card-bg); /* Dark bg */
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  grid-column: 1 / -1;
  animation: slideInUp 0.6s ease 0.3s backwards;
  border-top: 4px solid transparent;
  border-image: linear-gradient(90deg, #D4AF37, #FFD700) 1; /* Gold border */
  color: var(--text-primary);
}

.leaderboard-section h3 {
  color: var(--primary-color); /* Gold heading */
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table thead {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(255, 215, 0, 0.1) 100%); /* Gold-tinted header */
}

.leaderboard-table th {
  padding: 1.25rem;
  text-align: left;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 2px solid var(--primary-color); /* Gold bottom border */
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.leaderboard-table td {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
  color: var(--text-primary);
}

.leaderboard-table tbody tr {
  transition: var(--transition);
}

.leaderboard-table tbody tr:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, rgba(255, 215, 0, 0.05) 100%); /* Gold hover */
  transform: scale(1.01);
}

.rank {
  font-size: 1.3rem;
  font-weight: 800;
  width: 80px;
  text-align: center;
}

.count {
  font-weight: 700;
  color: var(--primary-color); /* Gold count */
  font-size: 1.2rem;
  text-align: center;
}

/* ==================== LEADERBOARD PAGE ==================== */

.leaderboard-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  animation: slideInUp 0.6s ease;
}

.leaderboard-header {
  text-align: center;
  margin-bottom: 4rem;
}

.leaderboard-header h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  animation: slideInDown 0.8s ease;
}

.leaderboard-header .subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  animation: slideInUp 0.8s ease 0.2s backwards;
}

.leaderboard-container {
  background: var(--card-bg); /* Dark container */
  border-radius: 16px;
  padding: 3rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 3rem;
  border-top: 4px solid transparent;
  border-image: linear-gradient(90deg, #D4AF37, #FFD700) 1; /* Gold border */
  color: var(--text-primary);
}

.leaderboard-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

/* ==================== PODIUM SECTION ==================== */

.podium-section {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 2.5rem;
  margin-bottom: 3rem;
  min-height: 450px;
  perspective: 1000px;
}

.podium-item {
  text-align: center;
  position: relative;
  flex: 1;
  max-width: 220px;
  animation: slideInUp 0.8s ease;
}

.podium-item:nth-child(1) {
  animation-delay: 0.2s;
}

.podium-item:nth-child(2) {
  animation-delay: 0s;
}

.podium-item:nth-child(3) {
  animation-delay: 0.4s;
}

.podium-item .medal {
  font-size: 4.5rem;
  margin-bottom: 1rem;
  animation: bounce 2s infinite;
  display: block;
}

.podium-item:nth-child(2) .medal {
  animation-delay: 0s;
}

.podium-item:nth-child(1) .medal {
  animation-delay: 0.3s;
}

.podium-item:nth-child(3) .medal {
  animation-delay: 0.6s;
}

.rank-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  font-weight: 800;
  font-size: 2rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 2;
  transition: var(--transition);
}

.rank-badge::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.2;
  animation: pulse 2s infinite;
}

.podium-1st .rank-badge {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #333;
  box-shadow: 0 12px 32px rgba(255, 215, 0, 0.4);
}

.podium-1st .rank-badge:hover {
  transform: scale(1.1) rotateY(10deg);
}

.podium-2nd .rank-badge {
  background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
  color: #333;
  box-shadow: 0 12px 32px rgba(192, 192, 192, 0.4);
}

.podium-2nd .rank-badge:hover {
  transform: scale(1.1) rotateY(10deg);
}

.podium-3rd .rank-badge {
  background: linear-gradient(135deg, #cd7f32 0%, #e8a76a 100%);
  color: white;
  box-shadow: 0 12px 32px rgba(205, 127, 50, 0.4);
}

.podium-3rd .rank-badge:hover {
  transform: scale(1.1) rotateY(10deg);
}

.podium-content h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  word-break: break-word;
  position: relative;
  z-index: 2;
}

.nomination-count {
  color: var(--text-secondary);
  font-size: 1rem;
  position: relative;
  z-index: 2;
}

/* ... (Previous content up to nomination-count strong cutoff) ... */

.nomination-count strong {
  font-size: 2rem;
  color: var(--primary-color); /* Gold count */
  display: block;
  font-weight: 800;
}

.podium-height {
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.05) 100%); /* Gold-tinted podium */
  border-radius: 12px 12px 0 0;
  margin-top: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.podium-height::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(212, 175, 55, 0.1) 100%);
  pointer-events: none;
}

.height-1 {
  height: 200px;
}

.height-2 {
  height: 150px;
}

.height-3 {
  height: 100px;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.3;
  }
}

/* ==================== TABLE SECTION ==================== */

.table-section {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
}

.leaderboard-table thead {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(255, 215, 0, 0.08) 100%); /* Gold-tinted */
  border-bottom: 3px solid var(--primary-color); /* Gold border */
}

.leaderboard-table th {
  padding: 1.25rem;
  text-align: left;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.rank-col {
  width: 100px;
  text-align: center;
}

.name-col {
  flex: 1;
}

.count-col {
  width: 140px;
  text-align: center;
}

.badge-col {
  width: 180px;
  text-align: center;
}

.leaderboard-row {
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
  animation: slideInUp 0.5s ease;
}

.leaderboard-row:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(255, 215, 0, 0.08) 100%); /* Gold hover */
  transform: scale(1.01);
}

.leaderboard-row.top-3 {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, rgba(255, 215, 0, 0.05) 100%);
  font-weight: 600;
}

.leaderboard-row td {
  padding: 1.25rem;
  color: var(--text-primary);
}

.rank-cell {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 800;
}

.rank-number {
  display: inline-block;
  width: 50px;
  height: 50px;
  line-height: 50px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(255, 215, 0, 0.15) 100%);
  border-radius: 50%;
  font-weight: 800;
  transition: var(--transition);
  color: var(--text-primary);
}

.leaderboard-row:hover .rank-number {
  transform: scale(1.15) rotate(360deg);
  background: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%);
  color: #000000; /* Black on gold */
}

.name-cell {
  color: var(--text-primary);
  font-weight: 600;
}

.name-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-name {
  font-weight: 600;
}

.count-cell {
  text-align: center;
}

.nomination-badge {
  display: inline-block;
  background: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%);
  color: #000000; /* Black text */
  padding: 0.6rem 1.25rem;
  border-radius: 25px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
  transition: var(--transition);
}

.leaderboard-row:hover .nomination-badge {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
}

.badge-cell {
  text-align: center;
}

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-gold {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #333;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.badge-silver {
  background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
  color: #333;
  box-shadow: 0 4px 12px rgba(192, 192, 192, 0.3);
}

.badge-bronze {
  background: linear-gradient(135deg, #cd7f32 0%, #e8a76a 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(205, 127, 50, 0.3);
}

.badge-star {
  background: linear-gradient(135deg, #ffc107 0%, #ffed4e 100%);
  color: #333;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.badge-good {
  background: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%); /* Gold for good */
  color: #000000;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.leaderboard-row:hover .badge {
  transform: scale(1.1);
}

/* ==================== STATS SECTION ==================== */

.stats-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: linear-gradient(135deg, #1a1a1e 0%, #0a0a0a 100%); /* Dark gradient */
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 2px solid rgba(212, 175, 55, 0.1); /* Gold border */
  animation: slideInUp 0.6s ease;
  position: relative;
  overflow: hidden;
  color: var(--text-primary);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color); /* Gold on hover */
}

.stat-card:hover::before {
  transform: scale(1.2);
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  font-weight: 700;
  position: relative;
  z-index: 2;
}

.stat-value {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 2;
  display: block;
}

/* ==================== EMPTY STATE ==================== */

.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  animation: slideInUp 0.6s ease;
  color: var(--text-primary);
}

.empty-icon {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  animation: bounce 2s infinite;
}

.empty-state h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* ==================== ACTION SECTION ==================== */

.action-section {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 3rem;
  animation: slideInUp 0.8s ease;
}

/* ==================== ANIMATIONS ==================== */

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5); /* Gold glow */
  }
  50% {
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.8);
  }
}

/* ==================== RESPONSIVE DESIGN ==================== */

@media (max-width: 1024px) {
  .nominations-content {
    grid-template-columns: 1fr;
  }

  .leaderboard-section {
    grid-column: 1;
  }

  .podium-section {
    gap: 1.5rem;
    min-height: 350px;
  }

  .podium-item {
    max-width: 150px;
  }

  .height-1 {
    height: 150px;
  }

  .height-2 {
    height: 120px;
  }

  .height-3 {
    height: 80px;
  }
}

@media (max-width: 768px) {
  :root {
    --shadow-md: 0 4px 12px rgba(212, 175, 55, 0.1); /* Adjusted gold shadow */
    --shadow-lg: 0 8px 24px rgba(212, 175, 55, 0.12);
  }

  .nav-container {
    padding: 1rem;
  }

  .nav-menu {
    gap: 1.5rem;
    font-size: 0.95rem;
  }

  .container {
    padding: 0 1rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .hero-section {
    padding: 4rem 1.5rem;
  }

  .hero-section h1 {
    font-size: 2.5rem;
  }

  .hero-section p {
    font-size: 1.1rem;
  }

  .nominations-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .leaderboard-section {
    grid-column: 1;
    padding: 1.5rem;
  }

  .auth-card {
    padding: 2rem 1.5rem;
  }

  .theme-card {
    padding: 1.5rem;
  }

  .nominate-section,
  .my-nominations-section {
    padding: 1.5rem;
  }

  .leaderboard-page {
    padding: 1.5rem;
  }

  .leaderboard-header h1 {
    font-size: 2.5rem;
  }

  .leaderboard-container {
    padding: 1.5rem;
  }

  /* Mobile: Hide podium section and enhance table responsiveness */
  .podium-section {
    display: none; /* Hide podium on mobile to avoid layout issues */
  }

  .leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem; /* Slightly smaller for mobile */
  }

  .leaderboard-table th,
  .leaderboard-table td {
    padding: 0.75rem 0.5rem; /* Reduce padding for mobile */
    text-align: center;
    border-bottom: 1px solid var(--border-color); /* Dark border */
  }

  .leaderboard-table thead {
    display: none; /* Hide headers on very small screens for cleaner look */
  }

  .leaderboard-row {
    display: block;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--card-bg); /* Dark card bg */
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: var(--text-primary);
  }

  .leaderboard-row .rank-cell,
  .leaderboard-row .name-cell,
  .leaderboard-row .count-cell,
  .leaderboard-row .badge-cell {
    display: inline-block;
    width: auto;
    margin: 0.25rem;
  }

  .leaderboard-row .rank-cell {
    font-size: 1.5rem;
    font-weight: bold;
  }

  .leaderboard-row .name-cell {
    font-weight: 600;
    flex: 1;
  }

  .leaderboard-row .count-cell {
    background: rgba(212, 175, 55, 0.1); /* Gold-tinted badge */
    padding: 0.5rem;
    border-radius: 20px;
    min-width: 60px;
  }

  .leaderboard-row .badge-cell {
    justify-self: end;
  }

  /* Ensure top-3 rows stand out on mobile */
  .leaderboard-row.top-3 {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
    border: 2px solid var(--primary-color); /* Gold border */
  }

  /* Adjust other sections for mobile */
  .leaderboard-header h1 {
    font-size: 1.8rem;
    text-align: center;
  }

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

  .stats-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .stat-card {
    text-align: center;
    padding: 1rem;
  }

  .action-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 250px;
    text-align: center;
  }

  .nomination-header {
    flex-direction: column;
  }

  .timestamp {
    margin-left: 0;
    margin-top: 0.5rem;
  }

  input,
  textarea,
  select {
    padding: 0.75rem;
    font-size: 16px; /* Prevents zoom on mobile */
  }

  .podium-item {
    max-width: 100%;
  }

  .podium-height {
    display: none;
  }

  .rank-badge {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .badge {
    font-size: 0.7rem;
    padding: 0.4rem 0.6rem;
  }

  .nomination-badge {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .stats-section {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .stat-card {
    padding: 2rem 1.5rem;
  }

  .stat-value {
    font-size: 2.5rem;
  }
}

/* ... (Previous content up to @media (max-width: 480px) h1 cutoff) ... */

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  .nav-logo {
    font-size: 1.3rem;
  }

  .nav-menu {
    gap: 1rem;
    font-size: 0.85rem;
  }

  .hero-section {
    padding: 2.5rem 1rem;
  }

  .hero-logo {
    font-size: 3rem;
  }

  .hero-section h1 {
    font-size: 1.8rem;
  }

  .hero-section p {
    font-size: 0.95rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    width: 100%;
  }

  .leaderboard-header h1 {
    font-size: 1.5rem;
  }

  .leaderboard-header .subtitle {
    font-size: 0.95rem;
  }

  .podium-item .medal {
    font-size: 3rem;
  }

  .rank-badge {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .podium-content h3 {
    font-size: 1rem;
  }

  .nomination-count strong {
    font-size: 1.5rem;
  }

  .rank-col {
    width: 50px;
  }

  .count-col {
    width: 80px;
  }

  .badge-col {
    width: 90px;
  }

  .leaderboard-table th {
    padding: 0.75rem 0.25rem;
    font-size: 0.75rem;
  }

  .leaderboard-table td {
    padding: 0.75rem 0.25rem;
  }

  .badge {
    font-size: 0.65rem;
    padding: 0.3rem 0.5rem;
  }

  .nomination-badge {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
  }

  .stat-card {
    padding: 1.5rem 1rem;
  }

  .stat-value {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 0.8rem;
  }

  .nomination-card {
    padding: 1.25rem;
  }

  .empty-state {
    padding: 3rem 1rem;
  }

  .empty-icon {
    font-size: 3rem;
  }

  .empty-state h2 {
    font-size: 1.4rem;
  }

  .empty-state p {
    font-size: 0.95rem;
  }

  .theme-card {
    padding: 1.25rem;
  }

  .auth-card {
    padding: 1.5rem 1.25rem;
    border-radius: 16px;
  }

  .nominate-section,
  .my-nominations-section {
    padding: 1.25rem;
  }

  .leaderboard-container {
    padding: 1.25rem;
  }

  .form-group {
    margin-bottom: 1.25rem;
  }

  label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  textarea {
    min-height: 120px;
  }
}

/* ==================== ACCESSIBILITY ==================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --primary-color: #B8942F; /* Deeper gold for contrast */
    --primary-dark: #8B6914;
  }

  .btn-primary {
    border: 2px solid currentColor;
  }
}

/* ==================== DARK MODE (Enhanced for Theme - Base is Already Dark) ==================== */

@media (prefers-color-scheme: dark) {
  :root {
    --light-bg: #1a1a1e; /* Already dark base */
    --card-bg: #0a0a0a; /* Deeper black cards */
    --text-primary: #FFFFFF;
    --text-secondary: #CCCCCC;
    --text-light: #999999;
    --border-color: #333333;
    --dark-bg: #0a0a0a;
  }

  body {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1e 100%);
    color: var(--text-primary);
  }

  .navbar {
    background: rgba(10, 10, 10, 0.95); /* Black nav */
    border-bottom-color: rgba(212, 175, 55, 0.2); /* Gold border */
  }

  .auth-card,
  .nominate-section,
  .my-nominations-section,
  .leaderboard-section,
  .leaderboard-container,
  .stat-card {
    background-color: var(--card-bg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  }

  .nomination-card {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1e 100%);
  }

  .nomination-card:hover {
    background: linear-gradient(135deg, #1a1a1e 0%, #0a0a0a 100%);
  }

  .leaderboard-table thead {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(255, 215, 0, 0.15) 100%);
  }

  .leaderboard-table tbody tr:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(255, 215, 0, 0.1) 100%);
  }

  .theme-card {
    background: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%);
  }

  .hero-section {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(255, 215, 0, 0.15) 100%);
  }

  input,
  textarea,
  select {
    background-color: #0a0a0a; /* Deeper dark inputs */
    color: var(--text-primary);
    border-color: rgba(212, 175, 55, 0.3); /* Gold border */
  }

  input:focus,
  textarea:focus,
  select:focus {
    background-color: #1a1a1e;
    border-color: var(--primary-color);
  }

  input::placeholder,
  textarea::placeholder {
    color: var(--text-light);
  }

  .footer {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1e 100%);
    border-top-color: rgba(212, 175, 55, 0.2);
  }

  .rank-number {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(255, 215, 0, 0.2) 100%);
  }

  .message-success,
  .alert-success {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.1) 100%);
    color: #FFFFFF;
  }

  .message-error,
  .alert-error {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(255, 107, 107, 0.1) 100%);
    color: #FFFFFF;
  }

  .message-warning,
  .alert-warning {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.1) 100%);
    color: #000000; /* Black for gold contrast */
  }

  .message-info,
  .alert-info {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.1) 100%);
    color: #FFFFFF;
  }
}

/* ==================== PRINT STYLES ==================== */

@media print {
  .navbar,
  .footer,
  .action-section,
  .auth-link {
    display: none;
  }

  body {
    background: white !important; /* White for print */
    color: black !important;
  }

  .leaderboard-table {
    page-break-inside: avoid;
  }

  .leaderboard-row {
    page-break-inside: avoid;
  }
}

/* ==================== UTILITY CLASSES ==================== */

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-light);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.rounded { border-radius: 8px; }
.rounded-lg { border-radius: 12px; }
.rounded-xl { border-radius: 16px; }

.shadow { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

.hidden { display: none !important; }

/* ==================== LOADING STATE ==================== */

.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* ==================== FOCUS VISIBLE FOR KEYBOARD NAVIGATION ==================== */

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary-color); /* Gold outline */
  outline-offset: 2px;
}

/* ==================== CUSTOM SCROLLBAR ==================== */

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--light-bg); /* Dark track */
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%); /* Gold thumb */
  border-radius: 6px;
  transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #FFD700 0%, #D4AF37 100%);
}

/* ==================== SELECTION ==================== */

::selection {
  background: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%); /* Gold selection */
  color: #000000; /* Black text */
}

/* ==================== INDEX.HTML PAGE-SPECIFIC STYLES ==================== */

/* Features Section */
.features-section {
  margin-bottom: 4rem;
  animation: slideInUp 0.8s ease;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--card-bg); /* Dark background */
  padding: 2.5rem 2rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border-top: 4px solid transparent;
  border-image: linear-gradient(90deg, var(--primary-color), var(--secondary-color)) 1; /* Gold border */
  animation: slideInUp 0.6s ease;
  color: var(--text-primary); /* White text */
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

.feature-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-lg);
  border-top-color: var(--primary-color); /* Gold hover */
}

.feature-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  animation: bounce 2s infinite;
  display: inline-block;
}

.feature-card:nth-child(1) .feature-icon { animation-delay: 0s; }
.feature-card:nth-child(2) .feature-icon { animation-delay: 0.2s; }
.feature-card:nth-child(3) .feature-icon { animation-delay: 0.4s; }
.feature-card:nth-child(4) .feature-icon { animation-delay: 0.6s; }
.feature-card:nth-child(5) .feature-icon { animation-delay: 0.8s; }
.feature-card:nth-child(6) .feature-icon { animation-delay: 1s; }

.feature-card h3 {
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); /* Gold gradient */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.3rem;
}

.feature-card p {
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* User Stats Section */
.user-stats-section {
  margin-bottom: 4rem;
  animation: slideInUp 0.8s ease;
}

.user-stats-section h2 {
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 3rem;
}

.user-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.user-stat-card {
  background: var(--card-bg);
  padding: 2.5rem 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 2rem;
  transition: var(--transition);
  border: 2px solid rgba(var(--primary-color-rgb), 0.1); /* Gold-tinted (assume RGB var if needed) */
  animation: slideInUp 0.6s ease;
  color: var(--text-primary);
}

.user-stat-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.stat-icon {
  font-size: 3.5rem;
  flex-shrink: 0;
}

.stat-detail {
  flex: 1;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-text {
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); /* Gold gradient */
  color: #000000; /* Black text */
  padding: 4rem 2rem;
  border-radius: 20px;
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
  overflow: hidden;
  animation: slideInUp 0.8s ease;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 15s infinite ease-in-out;
}

.cta-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 0 auto;
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #000000;
}

.cta-section p {
  font-size: 1.15rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  color: #000000;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-section .btn-primary {
  background: #000000;
  color: var(--secondary-color);
  border: 2px solid #000000;
}

.cta-section .btn-primary:hover {
  background: #1a1a1e;
  color: var(--secondary-color);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.cta-section .btn-secondary {
  background: transparent;
  color: #000000;
  border: 2px solid #000000;
}

.cta-section .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #000000;
}

/* Responsive for Index Sections */
@media (max-width: 768px) {
  .features-grid,
  .user-stats-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .feature-card,
  .user-stat-card {
    padding: 2rem 1.5rem;
  }

  .feature-icon,
  .stat-icon {
    font-size: 2.5rem;
  }

  .cta-section {
    padding: 3rem 1.5rem;
  }

  .cta-section h2 {
    font-size: 1.8rem;
  }

  .cta-section p {
    font-size: 1rem;
  }

  .cta-buttons,
  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .user-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .user-stat-card {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .stat-number {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .user-stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .stat-text {
    font-size: 0.8rem;
  }

  .leaderboard-header h1 {
    font-size: 1.5rem;
  }

  .leaderboard-header .subtitle {
    font-size: 0.95rem;
  }
}

/* Definition Section (Desktop Base) */
.definition-section {
  margin-bottom: 4rem;
  animation: slideInUp 0.8s ease;
}

.definition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.definition-card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  text-align: center;
  border: 2px solid rgba(212, 175, 55, 0.1);
  color: var(--text-primary);
  transition: var(--transition);
}

.definition-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.definition-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: bounce 2s infinite;
}

.definition-card h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.definition-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 1.1rem;
}

.combined-definition {
  text-align: center;
  background: var(--card-bg);
  padding: 3rem;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  border: 2px solid rgba(212, 175, 55, 0.1);
}

.combined-definition h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.combined-definition p {
  color: var(--text-secondary);
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
}

/* Mobile Optimization (≤768px: Tablets/Phones) */
@media (max-width: 768px) {
  .definition-grid {
    grid-template-columns: 1fr; /* Stack to single column */
    gap: 2rem; /* Smaller gap */
  }

  .definition-card {
    padding: 1.5rem; /* Reduce padding for more content space */
  }

  .definition-card:hover {
    transform: translateY(-4px); /* Subtler lift on touch */
    box-shadow: var(--shadow-md); /* Lighter shadow for performance */
  }

  .definition-icon {
    font-size: 3rem; /* Smaller icon */
  }

  .definition-card h3 {
    font-size: 1.5rem; /* Scaled heading */
  }

  .definition-card p {
    font-size: 1rem; /* Slightly smaller text */
  }

  .combined-definition {
    padding: 2rem; /* Reduced padding */
  }

  .combined-definition h2 {
    font-size: 2rem; /* Smaller main heading */
  }

  .combined-definition p {
    font-size: 1.1rem; /* Adjusted body text */
    max-width: 100%; /* Full width on mobile */
  }
}

/* Extra Small Mobile (≤480px: Phones in Portrait) */
@media (max-width: 480px) {
  .definition-section {
    margin-bottom: 3rem; /* Less bottom margin */
  }

  .definition-grid {
    gap: 1.5rem; /* Tighter gap */
  }

  .definition-card {
    padding: 1.25rem;
    border-radius: 12px; /* Slightly smaller radius */
  }

  .definition-icon {
    font-size: 2.5rem;
  }

  .definition-card h3 {
    font-size: 1.3rem;
  }

  .definition-card p {
    font-size: 0.95rem;
    line-height: 1.5; /* Tighter line height */
  }

  .combined-definition {
    padding: 1.5rem;
    border-radius: 12px;
  }

  .combined-definition h2 {
    font-size: 1.8rem;
  }

  .combined-definition p {
    font-size: 1rem;
  }
}