/* Sleek Teen-Friendly Dark Mode Glassmorphism CSS */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  /* Color Palette */
  --bg-color: #0b0c10;
  --bg-darker: #050608;
  --primary-color: #7f5af0;
  --secondary-color: #94a3b8;
  --card-bg: rgba(26, 27, 38, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-white: #fffffe;
  --text-muted: #94a1b2;
  
  /* Operations Neon Themes */
  --color-add: #2ecc71;
  --color-add-glow: rgba(46, 204, 113, 0.25);
  --color-sub: #3498db;
  --color-sub-glow: rgba(52, 152, 219, 0.25);
  --color-mul: #e67e22;
  --color-mul-glow: rgba(230, 126, 34, 0.25);
  --color-divide: #9b59b6;
  --color-divide-glow: rgba(155, 89, 182, 0.25);

  /* Alerts & Indicators */
  --color-star: #ffbc00;
  --color-correct: #2ecc71;
  --color-incorrect: #ff5e57;
  --color-timer-warning: #ff5e57;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-white);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(127, 90, 240, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(162, 155, 254, 0.1) 0%, transparent 45%);
}

#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100;
  pointer-events: none;
}

/* App Container Layout */
.app-container {
  width: 100%;
  max-width: 950px;
  min-height: 85vh;
  margin: 20px;
  background: rgba(17, 19, 28, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* Header Styling */
.app-header {
  padding: 24px 32px;
  background: rgba(11, 12, 16, 0.5);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.magic-wand {
  font-size: 2rem;
  color: var(--primary-color);
  animation: float 4s ease-in-out infinite;
}

.logo h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #7f5af0, #a29bfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.score-board {
  display: flex;
  gap: 12px;
}

.stars-counter, .streak-counter {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
}

.stars-counter {
  border-color: rgba(255, 188, 0, 0.3);
  color: var(--color-star);
  text-shadow: 0 0 10px rgba(255, 188, 0, 0.2);
}

.streak-counter {
  border-color: rgba(255, 94, 87, 0.3);
  color: var(--color-incorrect);
  text-shadow: 0 0 10px rgba(255, 94, 87, 0.2);
}

/* Tabs Navigation Styling */
.tabs-container {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
}

.tab-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 12px 24px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.06);
}

.tab-btn.active {
  color: var(--text-white);
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 4px 15px rgba(127, 90, 240, 0.3);
}

.tab-content {
  display: none;
}

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

/* Main Content Area */
.app-content {
  flex-grow: 1;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.screen {
  display: none;
  width: 100%;
}

.screen.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

.section-title {
  font-family: 'Outfit', sans-serif;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 28px;
}

/* Grid layout for Adventure Selector */
.adventure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.adventure-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px 16px;
  cursor: pointer;
  text-align: center;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 230px;
}

.adventure-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.card-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
  transition: transform 0.3s ease;
}

.adventure-card:hover .card-icon {
  transform: scale(1.15);
}

.adventure-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.adventure-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 16px;
  flex-grow: 1;
}

.action-badge {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: white;
  padding: 6px 20px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
}

/* Operation card hover effects */
.adventure-card.add:hover {
  box-shadow: 0 0 20px var(--color-add-glow);
  border-color: var(--color-add);
}
.adventure-card.subtract:hover {
  box-shadow: 0 0 20px var(--color-sub-glow);
  border-color: var(--color-sub);
}
.adventure-card.multiply:hover {
  box-shadow: 0 0 20px var(--color-mul-glow);
  border-color: var(--color-mul);
}
.adventure-card.divide:hover {
  box-shadow: 0 0 20px var(--color-divide-glow);
  border-color: var(--color-divide);
}
.adventure-card.count:hover {
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
  border-color: #6366f1;
}
.adventure-card.calculus:hover {
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.4);
  border-color: #ec4899;
}

/* AI Test Generator Screen Styles */
.ai-setup-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: start;
}

.ai-input-form {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--secondary-color);
}

.form-group textarea {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  color: var(--text-white);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  resize: vertical;
  outline: none;
}

.form-group textarea:focus {
  border-color: var(--primary-color);
}

.upload-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  background: rgba(0,0,0,0.15);
  transition: all 0.2s ease;
}

.upload-dropzone:hover {
  border-color: var(--primary-color);
  background: rgba(127, 90, 240, 0.05);
}

.upload-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
  display: block;
}

.dropzone-prompt p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.file-info {
  font-size: 0.75rem;
  color: var(--primary-color);
  margin-top: 4px;
  display: block;
  font-weight: 500;
}

.generate-btn {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  background: var(--primary-color);
  border: none;
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(127, 90, 240, 0.3);
}

.generate-btn:hover {
  transform: translateY(-2px);
  background: #8b5cf6;
}

.generate-btn:active {
  transform: translateY(1px);
}

/* Loading Shimmer Animation */
.ai-loading-container {
  display: none;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 32px;
  border-radius: 20px;
  text-align: center;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 250px;
}

.shimmer-card {
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shimmer-title, .shimmer-line {
  height: 20px;
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.shimmer-line.short {
  width: 60%;
}

.loading-text {
  font-size: 0.95rem;
  color: var(--secondary-color);
  line-height: 1.5;
  margin-top: 10px;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Countdown Timer */
.timer-container {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.timer-bar {
  flex-grow: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.timer-fill {
  height: 100%;
  width: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #8b5cf6, #3b82f6);
  transition: width 1s linear, background-color 0.3s ease;
}

.timer-fill.warning {
  background: linear-gradient(90deg, var(--color-timer-warning), #e67e22);
  box-shadow: 0 0 10px rgba(255, 94, 87, 0.3);
}

.timer-text {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--secondary-color);
  min-width: 100px;
  text-align: right;
}

/* Screen 2: Game Board */
.game-control {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.back-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px 16px;
  cursor: pointer;
  color: var(--text-white);
  transition: all 0.2s;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.game-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-white);
  border: 1px solid var(--border-color);
  background: rgba(255,255,255,0.03);
  padding: 6px 16px;
  border-radius: 12px;
}

.game-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

/* Question Panel styling */
.question-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.progress-container {
  width: 100%;
  margin-bottom: 16px;
  background: var(--card-bg);
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
}

.progress-bar-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.progress-track {
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7f5af0, #a29bfe);
  width: 0%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.level-indicator {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: right;
  margin-top: 6px;
  color: var(--primary-color);
}

.equation-card {
  width: 100%;
  background: var(--card-bg);
  border-radius: 20px;
  padding: 40px 16px;
  text-align: center;
  border: 1px solid var(--border-color);
  position: relative;
  transition: transform 0.2s;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.equation-display {
  font-family: 'Outfit', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  letter-spacing: -1px;
}

.eq-op {
  color: var(--primary-color);
  text-shadow: 0 0 15px rgba(127, 90, 240, 0.4);
}

.eq-input-placeholder {
  display: inline-block;
  min-width: 90px;
  height: 75px;
  line-height: 70px;
  border-radius: 12px;
  border: 2px dashed rgba(255,255,255,0.2);
  background-color: rgba(255,255,255,0.02);
  color: rgba(255,255,255,0.3);
  text-align: center;
  vertical-align: middle;
}

.eq-input-placeholder.has-value {
  border-style: solid;
  border-color: var(--primary-color);
  background-color: rgba(127, 90, 240, 0.05);
  color: var(--text-white);
}

.feedback-message {
  margin-top: 16px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-muted);
  min-height: 25px;
}

/* Animations for feedback state */
.shake {
  animation: shake 0.5s ease-in-out;
  border-color: var(--color-incorrect) !important;
  box-shadow: 0 0 20px rgba(255, 94, 87, 0.15);
}

.correct-bounce {
  animation: correctBounce 0.5s ease-in-out;
  border-color: var(--color-correct) !important;
  box-shadow: 0 0 20px rgba(46, 204, 113, 0.15);
}

/* Input Panel styling */
.input-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.answer-row {
  display: flex;
  gap: 12px;
}

#answer-input {
  flex-grow: 1;
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  padding: 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-color);
  color: var(--text-white);
  border-radius: 14px;
  outline: none;
  text-align: center;
  transition: all 0.2s;
  width: 60%;
}

#answer-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(127, 90, 240, 0.2);
}

/* Hide Spin Buttons */
#answer-input::-webkit-outer-spin-button,
#answer-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#answer-input[type=number] {
  -moz-appearance: textfield;
}

.submit-btn {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: white;
  background-color: var(--primary-color);
  border: none;
  border-radius: 14px;
  padding: 0 24px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(127, 90, 240, 0.25);
  white-space: nowrap;
}

.submit-btn:hover {
  transform: translateY(-2px);
  background-color: #8b5cf6;
}

.submit-btn:active {
  transform: translateY(1px);
}

/* Keypad Grid layout */
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: rgba(0,0,0,0.2);
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--border-color);
}

.key-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 0;
  cursor: pointer;
  color: var(--text-white);
  transition: all 0.15s ease;
}

.key-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.key-btn:active {
  transform: scale(0.95);
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.key-btn.clear, .key-btn.delete {
  font-size: 0.95rem;
  background-color: rgba(255, 255, 255, 0.02);
}

/* Screen 3: AI practice test board layout */
.ai-test-layout {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.ai-test-card, .ai-results-card {
  width: 100%;
  max-width: 600px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.ai-test-meta {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 12px;
}

.ai-test-question {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 24px;
  color: var(--text-white);
}

.ai-choices-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.choice-btn {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  text-align: left;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-white);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.choice-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.choice-btn.correct {
  background: rgba(46, 204, 113, 0.15) !important;
  border-color: var(--color-correct) !important;
  color: var(--color-correct);
  font-weight: 600;
}

.choice-btn.incorrect {
  background: rgba(255, 94, 87, 0.15) !important;
  border-color: var(--color-incorrect) !important;
  color: var(--color-incorrect);
}

.choice-btn.disabled {
  pointer-events: none;
}

.ai-feedback {
  margin-top: 20px;
  font-weight: 500;
  font-size: 1rem;
  text-align: center;
  min-height: 25px;
}

/* AI Test Results Styling */
.ai-results-card h2 {
  font-family: 'Outfit', sans-serif;
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.ai-results-score {
  text-align: center;
  font-size: 1.25rem;
  color: var(--secondary-color);
  margin-bottom: 24px;
}

.ai-results-score span {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color);
}

.tutor-feedback {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: 14px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.tutor-feedback h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  color: var(--secondary-color);
  margin-bottom: 8px;
}

.tutor-feedback p {
  font-size: 0.95rem;
  color: var(--text-white);
}

/* Footer styling */
.app-footer {
  padding: 20px;
  text-align: center;
  background: rgba(11, 12, 16, 0.3);
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Keyframes */
@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

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

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

@keyframes correctBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Responsive adjustment for Mobile/Tablet */
@media (max-width: 768px) {
  .app-container {
    margin: 10px;
    border-radius: 16px;
  }
  
  .app-header {
    padding: 16px 20px;
  }
  
  .app-content {
    padding: 20px;
  }
  
  .ai-setup-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .game-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .equation-display {
    font-size: 2.8rem;
  }
  
  .eq-input-placeholder {
    min-width: 70px;
    height: 65px;
    line-height: 60px;
  }
  
  .adventure-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  
  .adventure-card {
    min-height: 200px;
    padding: 16px 12px;
  }
  
  .card-icon {
    font-size: 2.2rem;
  }
}

@media (max-width: 480px) {
  .adventure-grid {
    grid-template-columns: 1fr;
  }
  
  .logo h1 {
    font-size: 1.3rem;
  }
  
  .stars-counter, .streak-counter {
    padding: 6px 10px;
    font-size: 0.95rem;
  }
}

/* --- Cognito Auth & Parent Dashboard Styles --- */
.login-layout {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 40px 32px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.login-card h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
}

.login-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 32px;
}

.login-error {
  color: var(--color-incorrect);
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 20px;
  text-align: center;
  display: none;
  background: rgba(255, 94, 87, 0.1);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 94, 87, 0.2);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 12px;
}

.user-role-tag {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--primary-color);
  color: white;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.user-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-white);
}

.logout-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s ease;
  margin-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 12px;
}

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

/* Parent dashboard specifics */
.parent-dashboard-layout {
  animation: fadeIn 0.4s ease-out;
}

.parent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.parent-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 16px;
  color: var(--text-white);
}

.feedback-text {
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  min-height: 20px;
}

.child-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border-color);
  transition: border-color 0.2s ease;
}

.child-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.child-item-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-white);
}

.child-item-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
}

.reports-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.reports-table th, .reports-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
}

.reports-table th {
  background: rgba(0, 0, 0, 0.4);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--secondary-color);
  letter-spacing: 0.5px;
}

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

.reports-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.badge-correct {
  color: var(--color-correct);
  font-weight: 600;
}

.badge-incorrect {
  color: var(--color-incorrect);
  font-weight: 600;
}

.loading-shimmer-mini {
  height: 60px;
  width: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 10px;
}

/* Segmented Control for Question Count */
.segmented-control {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  gap: 4px;
}

.segment-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 12px;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.segment-btn:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.05);
}

.segment-btn.active {
  background: linear-gradient(135deg, var(--primary-color) 0%, #8b5cf6 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(127, 90, 240, 0.3);
}

/* Daily active time chart tooltip display */
.chart-bar-tooltip-wrapper:hover .chart-tooltip {
  visibility: visible !important;
  opacity: 1 !important;
}

.chart-bar:hover {
  filter: brightness(1.2);
  transform: scaleY(1.05);
}
