/* ===================================
   Bilemezsin - Main Stylesheet
   Onedio-inspired modern design
   =================================== */

/* CSS Variables */
:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary-color: #ec4899;
  --accent-color: #f59e0b;
  
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #3b82f6;
  
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  
  --border-color: #e5e7eb;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
  
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  
  --transition: all 0.3s ease;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  min-height: 100vh;
}

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

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

img {
  max-width: 100%;
  height: auto;
}

/* ===================================
   NAVBAR
   =================================== */
.navbar {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0 1rem;
}

.navbar-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.logo-icon {
  font-size: 1.75rem;
}

.navbar-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.navbar-search i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.navbar-search input {
  width: 100%;
  padding: 0.625rem 1rem 0.625rem 2.75rem;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-size: 0.875rem;
  background: var(--bg-tertiary);
  transition: var(--transition);
}

.navbar-search input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--primary-color);
  background: var(--bg-tertiary);
}

.nav-link.btn-login {
  color: var(--primary-color);
}

.nav-link.btn-register {
  background: var(--primary-color);
  color: white;
}

.nav-link.btn-register:hover {
  background: var(--primary-dark);
  color: white;
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: var(--border-radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.dropdown-toggle:hover {
  background: var(--bg-tertiary);
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.dropdown-item:hover {
  background: var(--bg-tertiary);
}

.dropdown-item.text-danger {
  color: var(--danger-color);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.5rem 0;
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* ===================================
   ALERTS
   =================================== */
.alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  margin: 1rem auto;
  max-width: 1280px;
  border-radius: var(--border-radius);
  font-size: 0.875rem;
}

.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0.5;
}

.alert-close:hover {
  opacity: 1;
}

/* ===================================
   AUTH PAGES
   =================================== */
.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 64px);
}

.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
  background: var(--bg-primary);
}

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

.auth-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: var(--text-secondary);
}

.social-login {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: var(--transition);
}

.btn-google {
  background: white;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-google:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-facebook {
  background: #1877f2;
  color: white;
  border: none;
}

.btn-facebook:hover {
  background: #166fe5;
  color: white;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.auth-errors {
  margin-bottom: 1.5rem;
}

.error-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #fef2f2;
  color: #dc2626;
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group .optional {
  color: var(--text-muted);
  font-weight: 400;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper i {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
}

.input-wrapper input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 0.9375rem;
  transition: var(--transition);
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-wrapper input.input-valid {
  border-color: var(--success-color);
}

.input-wrapper input.input-invalid {
  border-color: var(--danger-color);
}

.input-status {
  position: absolute;
  right: 1rem;
  font-size: 1rem;
}

.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }

.toggle-password {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.validation-message {
  font-size: 0.8125rem;
  min-height: 1.25rem;
}

.validation-message .success {
  color: var(--success-color);
}

.validation-message .error {
  color: var(--danger-color);
}

.password-strength {
  margin-top: 0.5rem;
}

.strength-bar {
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0;
  transition: var(--transition);
}

.strength-text {
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.checkbox-wrapper input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary-color);
}

.forgot-link {
  font-size: 0.875rem;
}

.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-submit:hover {
  background: var(--primary-dark);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.auth-footer a {
  font-weight: 600;
}

.auth-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 3rem;
}

.illustration-content {
  max-width: 400px;
  text-align: center;
}

.illustration-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.illustration-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.illustration-content p {
  opacity: 0.9;
  margin-bottom: 2rem;
}

.features-list {
  list-style: none;
  text-align: left;
}

.features-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.9375rem;
}

.features-list i {
  width: 20px;
  height: 20px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 5rem 1.5rem;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: linear-gradient(to right, #fff, #fef08a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
}

.btn-hero.primary {
  background: white;
  color: var(--primary-color);
}

.btn-hero.primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-hero.secondary {
  background: rgba(255,255,255,0.2);
  color: white;
  border: 2px solid white;
}

.btn-hero.secondary:hover {
  background: white;
  color: var(--primary-color);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
}

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

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
}

.stat-text {
  opacity: 0.8;
}

/* ===================================
   SECTIONS
   =================================== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.see-all {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

/* Categories Section */
.categories-section {
  padding: 4rem 1.5rem;
  background: var(--bg-primary);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem;
  background: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  transition: var(--transition);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  background: var(--bg-primary);
}

.category-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.category-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.quiz-count {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Featured Section */
.featured-section {
  padding: 4rem 1.5rem;
}

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.quiz-card {
  background: var(--bg-primary);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.quiz-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.quiz-image {
  position: relative;
  height: 160px;
  overflow: hidden;
}

.quiz-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quiz-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.quiz-badge.hot {
  background: #fef2f2;
  color: #dc2626;
}

.quiz-badge.new {
  background: #eff6ff;
  color: #2563eb;
}

.quiz-content {
  padding: 1.25rem;
}

.quiz-category {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.quiz-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.quiz-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.quiz-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  padding: 4rem 1.5rem;
  text-align: center;
  color: white;
}

.cta-content h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.cta-content p {
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: white;
  color: var(--primary-color);
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ===================================
   PROFILE PAGE
   =================================== */
.profile-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.profile-header {
  background: var(--bg-primary);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.profile-cover {
  height: 150px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  position: relative;
}

.profile-avatar-wrapper {
  position: absolute;
  bottom: -50px;
  left: 2rem;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid var(--bg-primary);
  object-fit: cover;
}

.avatar-edit-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: 2px solid var(--bg-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.profile-info {
  padding: 4rem 2rem 2rem;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
}

.profile-username {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.profile-bio {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.profile-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.profile-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-content {
  background: var(--bg-primary);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

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

.stat-card .stat-icon {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
}

.stat-card .stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  padding: 1rem;
  background: none;
  border: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

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

.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.tab-content {
  padding: 2rem;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.settings-card {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.settings-card h3 {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.settings-form .form-group input,
.settings-form .form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 0.9375rem;
  background: var(--bg-primary);
  transition: var(--transition);
}

.settings-form .form-group input:focus,
.settings-form .form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.char-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.account-info .info-row {
  display: flex;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.account-info .info-row:last-child {
  border-bottom: none;
}

.account-info .info-label {
  width: 150px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.account-info .info-value {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-success { background: #ecfdf5; color: #065f46; }
.badge-warning { background: #fffbeb; color: #92400e; }
.badge-danger { background: #fef2f2; color: #991b1b; }
.badge-info { background: #eff6ff; color: #1e40af; }
.badge-secondary { background: var(--bg-tertiary); color: var(--text-secondary); }
.badge-google { background: #fef2f2; color: #dc2626; }
.badge-facebook { background: #eff6ff; color: #1877f2; }
.badge-email { background: var(--bg-tertiary); color: var(--text-secondary); }

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h4 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.empty-state p {
  margin-bottom: 1.5rem;
}

/* ===================================
   ADMIN PANEL
   =================================== */
.admin-container {
  display: flex;
  min-height: calc(100vh - 64px);
}

.admin-sidebar {
  width: 250px;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-color);
  flex-shrink: 0;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-nav {
  padding: 1rem 0;
}

.sidebar-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  transition: var(--transition);
}

.sidebar-nav .nav-item:hover,
.sidebar-nav .nav-item.active {
  background: var(--bg-tertiary);
  color: var(--primary-color);
}

.admin-content {
  flex: 1;
  padding: 2rem;
  background: var(--bg-secondary);
  overflow-y: auto;
}

.admin-header {
  margin-bottom: 2rem;
}

.admin-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.admin-header p {
  color: var(--text-secondary);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.admin-stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-primary);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.admin-stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: white;
}

.stat-icon.bg-blue { background: var(--info-color); }
.stat-icon.bg-green { background: var(--success-color); }
.stat-icon.bg-orange { background: var(--warning-color); }
.stat-icon.bg-purple { background: var(--primary-color); }

.admin-stat-card .stat-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
}

.admin-stat-card .stat-info p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.admin-card {
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-link {
  font-size: 0.875rem;
  font-weight: 500;
}

.card-body {
  padding: 0;
}

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

.admin-table th,
.admin-table td {
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.admin-table th {
  background: var(--bg-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.user-cell div {
  line-height: 1.3;
}

.user-cell small {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.status-dot.active { background: var(--success-color); }
.status-dot.inactive { background: var(--danger-color); }

.btn-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  color: var(--text-muted);
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--bg-tertiary);
  color: var(--primary-color);
}

.admin-filters {
  margin-bottom: 1.5rem;
}

.filter-form {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-group input,
.filter-group select {
  padding: 0.625rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  min-width: 180px;
}

.btn-filter {
  padding: 0.625rem 1.25rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
}

.page-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.page-link:hover,
.page-link.active {
  background: var(--primary-color);
  color: white;
}

.user-detail-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.5rem;
}

.user-profile-card {
  text-align: center;
  padding: 0;
}

.user-profile-header {
  padding: 2rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
}

.user-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid white;
  margin-bottom: 1rem;
}

.user-profile-header h2 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.user-profile-header p {
  opacity: 0.8;
  margin-bottom: 1rem;
}

.user-badges {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.user-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 1.5rem;
}

.user-profile-stats .stat {
  text-align: center;
}

.user-profile-stats .value {
  font-size: 1.25rem;
  font-weight: 700;
  display: block;
}

.user-profile-stats .label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.info-list {
  padding: 1.5rem;
}

.info-item {
  display: flex;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
  border-bottom: none;
}

.info-item .label {
  width: 120px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.info-item .value {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.action-form {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.action-form:last-child {
  border-bottom: none;
}

.action-form label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.action-row {
  display: flex;
  gap: 0.75rem;
}

.action-row select {
  flex: 1;
  padding: 0.625rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
}

.btn-success {
  background: var(--success-color);
  color: white;
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-danger {
  background: var(--danger-color);
  color: white;
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.back-link:hover {
  color: var(--primary-color);
}

/* ===================================
   ERROR PAGES
   =================================== */
.error-container {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.error-content {
  text-align: center;
  max-width: 400px;
}

.error-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.error-code {
  font-size: 5rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-title {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.error-message {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===================================
   PAGE CONTAINER
   =================================== */
.page-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

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

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-secondary);
}

.page-content {
  background: var(--bg-primary);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.legal-content section {
  margin-bottom: 2rem;
}

.legal-content h2 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.legal-content p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
}

.contact-info h2 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.contact-item i {
  color: var(--primary-color);
}

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

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 0.9375rem;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
  background: var(--text-primary);
  color: white;
  padding: 4rem 1.5rem 2rem;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
}

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

.footer-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-text {
  color: #9ca3af;
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: white;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--primary-color);
}

.footer-subtitle {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #9ca3af;
  font-size: 0.9375rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #9ca3af;
  font-size: 0.875rem;
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 1024px) {
  .auth-container {
    grid-template-columns: 1fr;
  }
  
  .auth-illustration {
    display: none;
  }
  
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .user-detail-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .navbar-search {
    display: none;
  }
  
  .navbar-nav {
    display: none;
  }
  
  .navbar-toggle {
    display: block;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .admin-container {
    flex-direction: column;
  }
  
  .admin-sidebar {
    width: 100%;
    position: static;
  }
  
  .sidebar-nav {
    display: flex;
    overflow-x: auto;
    padding: 0;
  }
  
  .sidebar-nav .nav-item {
    white-space: nowrap;
    padding: 1rem;
  }
  
  .admin-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .admin-table {
    display: block;
    overflow-x: auto;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 1.5rem;
  }
  
  .hero {
    padding: 3rem 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .btn-hero {
    width: 100%;
    justify-content: center;
  }
  
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .quiz-grid {
    grid-template-columns: 1fr;
  }
  
  .profile-tabs {
    flex-wrap: wrap;
  }
  
  .tab-btn {
    flex: 1 1 auto;
  }
}
