/* Base styles */
:root {
  --primary: #2563eb;    /* Bold blue */
  --secondary: #3b82f6;  /* Lighter blue */
  --accent: #06b6d4;     /* Teal for highlights */
  --background: #f8fafc; /* Light gray bg */
  --text: #1e293b;       /* Dark gray text */
  --success: #10b981;    /* Green */
  --error: #ef4444;      /* Red */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  min-height: 100vh;
  padding: 2rem;
}

/* Login page */
.login-container {
  max-width: 400px;
  margin: 2rem auto;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.login-form input {
  width: 100%;
  padding: 0.8rem;
  margin: 0.5rem 0;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  transition: border-color 0.3s;
}

.login-form input:focus {
  border-color: var(--accent);
  outline: none;
}

/* CAPTCHA page (User A) */
.captcha-container {
  max-width: 600px;
  margin: 2rem auto;
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.captcha-image {
  border: 2px solid var(--accent);
  border-radius: 0.5rem;
  margin: 1rem 0;
  padding: 0.5rem;
}

.answer-form input {
  width: 100%;
  padding: 1rem;
  font-size: 1.2rem;
  border: 2px solid #cbd5e1;
  border-radius: 0.5rem;
  margin: 1rem 0;
}

/* Dashboard (User B) */

/* Buttons */
button {
  background: var(--primary);
  color: white;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Status messages */
.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  margin: 1rem 0;
}

.alert-success {
  background: #dcfce7;
  color: var(--success);
}

.alert-error {
  background: #fee2e2;
  color: var(--error);
}

.usage-widget {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 2px solid #e2e8f0;
}

.usage-widget strong {
    color: var(--primary);
}

[data-license="free"] {
    border-left: 4px solid var(--error);
}

[data-license="paid"] {
    border-left: 4px solid var(--success);
}

button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

/* Ranking Table Styles */
.ranking-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ranking-table thead {
    background-color: #2563eb;
    color: white;
}

.ranking-table th,
.ranking-table td {
    padding: 12px 15px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.ranking-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

/* Top User Highlighting */
.ranking-table tr.top-1 {
    background-color: #fde047 !important; /* Gold */
    font-weight: 700;
    border: 2px solid #ca8a04;
}

.ranking-table tr.top-2 {
    background-color: #fef9c3 !important; /* Light Yellow */
    font-weight: 600;
}

.ranking-table tr.top-3 {
    background-color: #fef9c3 !important;
    opacity: 0.9;
}

.ranking-table tr.top-4,
.ranking-table tr.top-5 {
    background-color: #fef9c3 !important;
    opacity: 0.8;
}

/* Negative Points Highlight */
.ranking-table tr.negative-points {
    background-color: #fee2e2 !important;
    color: #dc2626;
    font-weight: 700;
}

/* Filter Section */
.filters {
    margin: 2rem 0;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filters input,
.filters button {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
}

.filters button {
    background: #2563eb;
    color: white;
    border: none;
}