/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%);
  min-height: 100vh;
  background-attachment: fixed;
  color: #9ca3af; /* Medium gray for normal text */
}

/* CSS Variables */
:root {
  --text-primary: #ffffff;
  --text-secondary: #e5e7eb;
  --highlight: #1100fecc;
  --points-gold: #fbbf24;
  --success: #10b981;
  --danger: #ef4444;
}

/* Container */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

/* Page Management */
.page {
  display: none;
}

.page.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

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

/* Logo and Branding */
.logo {
  font-size: 48px;
  text-align: center;
  margin-bottom: 10px;
  font-weight: bold;
  color: #ffffff;
  opacity: 0.95;
  /* Simple white, slightly transparent */
}

.tagline {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-size: 18px;
}

/* Cards */
.card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Stats Card */
.stats-card {
  text-align: center;
}

.points-display {
  font-size: 64px;
  color: var(--points-gold);
  font-weight: bold;
  margin-bottom: 10px;
}

.points-label {
  color: var(--text-secondary);
  font-size: 18px;
  margin-bottom: 15px;
}

/* Badges */
.badge {
  display: inline-block;
  background: rgba(59, 130, 246, 0.3);
  border: 2px solid #3b82f6;
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
}

.badge-small {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid #3b82f6;
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 11px;
  margin-left: 8px;
}

/* Cache Notification Banner */
.banner {
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  margin-bottom: 20px;
  animation: slideDown 0.3s ease-out;
}

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

/* Forms */
.form {
  display: none;
}

.form.active {
  display: block;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 14px;
  margin-bottom: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 16px;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--highlight);
}

.input-large {
  font-size: 24px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 4px;
}

/* Buttons */
button {
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-size: 16px;
  transition: all 0.2s;
}

.btn-primary {
  width: 100%;
  padding: 16px;
  background: linear-gradient(90deg, #4facfe, #00f2fe);
  color: white;
  font-weight: bold;
  border-radius: 8px;
  margin-bottom: 12px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(79, 172, 254, 0.4);
}

.btn-secondary {
  width: 100%;
  padding: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-weight: bold;
  border-radius: 8px;
  margin-bottom: 12px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-large {
  font-size: 20px;
  padding: 20px;
}

.btn-back {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.tab {
  flex: 1;
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border-radius: 8px;
  border: 2px solid transparent;
}

.tab.active {
  background: rgba(59, 130, 246, 0.3);
  border-color: #3b82f6;
  color: var(--text-primary);
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.header h2 {
  font-size: 24px;
}

.header button {
  width: auto;
  padding: 10px 20px;
}

/* Leaderboard */
.leaderboard-entry {
  display: flex;
  align-items: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 12px;
}

.rank {
  font-size: 24px;
  font-weight: bold;
  color: var(--points-gold);
  width: 50px;
}

.username {
  flex: 1;
  font-size: 18px;
}

.points {
  font-weight: bold;
  color: var(--highlight);
}

/* Prizes Grid */
.prizes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.prize-card {
  text-align: center;
  padding: 20px;
}

.prize-card h3 {
  margin-bottom: 12px;
  font-size: 18px;
}

.prize-cost {
  color: var(--points-gold);
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 16px;
}

/* Text Utilities */
.success-text {
  color: var(--success);
  font-size: 18px;
  margin: 20px 0;
  text-align: center;
}

.timer {
  text-align: center;
  font-size: 24px;
  margin: 20px 0;
  color: var(--highlight);
}

.hint-text {
  font-size: 18px;
  padding: 20px;
  background: rgba(0, 242, 254, 0.1);
  border-left: 4px solid var(--highlight);
  border-radius: 8px;
}

.highlight {
  color: var(--highlight);
  font-weight: bold;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 15px;
  }
  
  .logo {
    font-size: 36px;
  }
  
  .points-display {
    font-size: 48px;
  }
}