/* COPY AND PASTE THIS INTO assets/css/main.css 
*/

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navbar */
.navbar {
  background: var(--card-bg);
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text-main);
}

.logo span {
  color: var(--primary);
}
/* Update for centered login screens */
.bg-light {
  background-color: #f1f5f9;
}

.logo {
  letter-spacing: -1px;
}

/* Smooth transition for form inputs */
input {
  transition: all 0.3s ease;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  transition: 0.3s;
}

.nav-links a:hover {
  color: var(--primary);
}

/* Buttons */
.btn-primary {
  background: var(--primary);
  color: #fff !important;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius);
  transition: background 0.3s;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  border: 1px solid var(--primary);
  color: var(--primary) !important;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 4rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.hero h1 span {
  color: var(--primary);
}

.hero p {
  color: var(--text-muted);
  font-size: 1.2rem;
}

/* Quiz Cards */
.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.card-badge {
  background: #eef2ff;
  color: var(--primary);
  display: inline-block;
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.card-footer span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 5rem;
  padding: 2rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* --- ADD THIS TO THE BOTTOM OF main.css --- */

/* Quiz Arena Layout */
.quiz-container {
  max-width: 800px;
  margin: 2rem auto;
}

.progress-container {
  background: var(--border);
  height: 8px;
  border-radius: 10px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.progress-bar {
  background: var(--primary);
  height: 100%;
  width: 30%;
  /* This will be dynamic via PHP/JS */
  transition: width 0.4s ease;
}

.question-card {
  background: #fff;
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.option-label {
  display: block;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.option-label:hover {
  border-color: var(--primary);
  background: #f5f3ff;
}

/* Hidden Radio Input but accessible */
.option-label input[type="radio"] {
  margin-right: 10px;
  accent-color: var(--primary);
}

.timer-box {
  text-align: right;
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 1rem;
  font-variant-numeric: tabular-nums;
}
/* --- QUIZ SYSTEM SPECIFIC STYLES --- */
.quiz-container {
  max-width: 700px;
  margin: 5rem auto;
  padding: 0 1rem;
}

.progress-container {
  background: #e2e8f0;
  height: 8px;
  border-radius: 20px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.progress-bar {
  background: var(--primary);
  height: 100%;
  transition: width 0.4s ease-in-out;
}

.question-card {
  background: white;
  padding: 3rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.option-label {
  display: flex;
  align-items: center;
  padding: 1.2rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: 0.2s;
}

.option-label:hover {
  border-color: var(--primary);
  background: #f5f3ff;
}

.option-label input {
  margin-right: 15px;
  transform: scale(1.3);
  accent-color: var(--primary);
}

.result-card {
  max-width: 500px;
  margin: 6rem auto;
  text-align: center;
  background: white;
  padding: 4rem 2rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
/* Review Page Enhancements */
.option-label small {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-card h1 {
  font-size: 2rem;
  letter-spacing: -1px;
}

.score-circle {
  font-size: 4rem;
  font-weight: 800;
  color: var(--primary);
  margin: 2rem 0;
}

.score-circle span {
  font-size: 1.5rem;
  color: var(--text-muted);
  font-weight: 400;
}


/* --- TIMER STYLES --- */
#timer-wrapper {
  background: #fee2e2;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid #fecaca;
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-info {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Admin Table Utility */
th {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tr:hover {
  background-color: #fcfdfe;
}

table {
  box-shadow: var(--shadow);
}

/* --- SEARCH BAR STYLES --- */
.search-container {
  display: flex;
  max-width: 600px;
  margin: 2rem auto 0 auto;
  gap: 10px;
  background: white;
  padding: 8px;
  border-radius: 16px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
}

.search-container input {
  flex: 1;
  border: none;
  padding: 0 1rem;
  font-size: 1rem;
  outline: none;
  background: transparent;
}

.search-container button {
  border: none;
  cursor: pointer;
  font-weight: 600;
}

/* Category Badge Styles */
.card-badge {
  background: #f0fdf4;
  color: #166534;
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 99px;
  font-weight: 600;
  text-transform: uppercase;
  border: 1px solid #dcfce7;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary) !important;
  outline: none;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
  transition: 0.2s;
}












/* Sidebar and Grid Responsive Fix */
@media (max-width: 900px) {
  main.container>div {
    grid-template-columns: 1fr !important;
  }

  aside {
    order: -1;
    /* Move leaderboard to top on mobile */
  }
}

aside .card h3 {
  font-size: 1.1rem;
  color: var(--text-main);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px;
  display: inline-block;
}