:root {
  --primary-color: #0ea5e9;
  --primary-hover: #0284c7;
  --secondary-color: #06b6d4;
  --success-color: #10b981;
  --success-light: #d1fae5;
  --error-color: #ef4444;
  --error-light: #fee2e2;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
  margin: 0;
  padding: 0;
  height: 100vh;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
}

h1 {
  text-align: center;
  color: white;
  font-size: 2rem;
  margin: 1rem 0 0.5rem 0;
  padding: 0 4rem 0 1rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  flex-shrink: 0;
}

h2 {
  text-align: center;
  color: var(--text-primary);
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.container {
  max-width: 1200px;
  width: 98%;
  margin: 0 auto;
  background: var(--bg-color);
  border-radius: 20px 20px 0 0;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tab {
  background-color: white;
  border: 2px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.tab:hover {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(6, 182, 212, 0.1));
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tab.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tab-separator {
  margin-left: 1rem;
  position: relative;
}

.tab-separator::before {
  content: '';
  position: absolute;
  left: -0.75rem;
  top: 20%;
  height: 60%;
  width: 2px;
  background: var(--border-color);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
  flex: 1;
  overflow-y: auto;
  width: 100%;
  max-width: 100%;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
}

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

table {
  width: 100%;
  max-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 1.5rem;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  table-layout: fixed;
}

th, td {
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
  text-overflow: ellipsis;
}

th {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
}

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

tr:hover td {
  background-color: #f8fafc;
}

input {
  width: 90%;
  max-width: 100%;
  padding: 0.625rem;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
}

input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

input:disabled {
  background-color: #f1f5f9;
  cursor: not-allowed;
}

button {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  padding: 0.75rem 1.75rem;
  margin: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease, opacity 0.3s ease, filter 0.3s ease;
  box-shadow: var(--shadow-sm);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  background: linear-gradient(135deg, #cbd5e1, #94a3b8) !important;
  cursor: not-allowed !important;
  transform: none !important;
  opacity: 0.5;
  filter: grayscale(50%);
  pointer-events: none;
}

button:disabled:hover {
  transform: none !important;
  box-shadow: var(--shadow-sm) !important;
}

.correct {
  background-color: var(--success-light) !important;
  border-color: var(--success-color) !important;
  animation: successPulse 0.5s ease;
}

.incorrect {
  background-color: var(--error-light) !important;
  border-color: var(--error-color) !important;
  animation: errorShake 0.5s ease;
}

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

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.score {
  margin: 1.5rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
  width: 100%;
}

.stat-box {
  background: white;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.stat-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.stat-box h3 {
  margin: 0 0 0.5rem 0;
  font-size: 0.875rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.stat-box > div:last-child {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-box .stat-breakdown {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.leaderboard {
  background: white;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 100%;
}

.leaderboard table {
  margin: 0;
  box-shadow: none;
}

.wrong-verbs {
  background: white;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 100%;
}

.wrong-verbs p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  text-align: center;
}

.quiz-controls {
  text-align: center;
  margin: 2rem 0;
  width: 100%;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  margin: 1.5rem 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: width 0.3s ease;
}

.loading-container {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Flashcard styles */
.flashcard-container {
  perspective: 1500px;
  max-width: 700px;
  width: 100%;
  margin: 1rem auto;
  flex-shrink: 0;
}

.flashcard {
  position: relative;
  width: 100%;
  height: 350px;
  min-width: 500px;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease-out, opacity 0.3s ease-out;
  transform-style: preserve-3d;
  cursor: pointer;
  touch-action: pan-y pinch-zoom; /* Allow vertical scrolling but enable horizontal swipe */
  user-select: none;
}

.flashcard.flipped {
  transform: rotateY(180deg);
}

.flashcard-container.slide-out-left {
  animation: slideOutLeft 0.3s ease-out forwards;
}

.flashcard-container.slide-out-right {
  animation: slideOutRight 0.3s ease-out forwards;
}

.flashcard-container.slide-in-left {
  animation: slideInLeft 0.3s ease-out forwards;
}

.flashcard-container.slide-in-right {
  animation: slideInRight 0.3s ease-out forwards;
}

@keyframes slideOutLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.flashcard-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.flashcard-front {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  border: none;
}

.flashcard-front::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 3px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.flashcard-back {
  background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
  color: white;
  transform: rotateY(180deg);
}

.flashcard-question {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  text-align: center;
  line-height: 1.2;
}

.flashcard-hint {
  font-size: 1.25rem;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
  background: rgba(14, 165, 233, 0.1);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  display: inline-block;
}

.flashcard-answer {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.flashcard-verb-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.flashcard-verb-label {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

.flashcard-verb-value {
  font-size: 1.25rem;
  font-weight: 600;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.flashcard-controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.flashcard-nav {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-top: 1.5rem;
}

.flashcard-progress {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.flashcard-feedback {
  text-align: center;
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 12px;
  font-size: 1.125rem;
  font-weight: 600;
}

.flashcard-feedback.correct {
  background: var(--success-light);
  color: var(--success-color);
}

.flashcard-feedback.wrong {
  background: var(--error-light);
  color: var(--error-color);
}

.flip-hint {
  margin-top: 3rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.flip-hint::before {
  content: '↻';
  font-size: 1.5rem;
  animation: rotate 2s ease-in-out infinite;
}

@keyframes rotate {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(180deg); }
}

/* Confetti styles */
.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  top: -10px;
  z-index: 9999;
  pointer-events: none;
}

@keyframes confetti-fall {
  to {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

/* Mobile quiz card view */
.quiz-card-view {
  display: none;
}

.quiz-card {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
  border: 2px solid var(--border-color);
  transition: all 0.2s ease;
}

.quiz-card.submitted {
  pointer-events: none;
}

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

.quiz-card-number {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 0.875rem;
}

.quiz-card-given {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin: 1.5rem 0;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(6, 182, 212, 0.1));
  border-radius: 12px;
}

.quiz-card-inputs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quiz-card-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quiz-card-label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quiz-card input {
  width: 100%;
  padding: 0.875rem;
  font-size: 1.125rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.quiz-card input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.quiz-card-given-value {
  width: 100%;
  padding: 0.875rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary-color);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(6, 182, 212, 0.1));
  border: 2px solid var(--primary-color);
  border-radius: 12px;
}

@media (max-width: 768px) {
  .flashcard-container {
    max-width: 100%;
  }

  .flashcard {
    height: 300px;
    min-width: unset;
  }

  .flashcard-question {
    font-size: 1.75rem;
    color: var(--text-primary) !important;
  }

  .flashcard-hint {
    font-size: 1rem;
    padding: 0.5rem 1rem;
  }

  .flashcard-verb-value {
    font-size: 1rem;
    padding: 0.625rem;
  }

  .flashcard-verb-label {
    font-size: 0.75rem;
  }

  .tab-separator {
    margin-left: 0.25rem;
  }

  .tab-separator::before {
    left: -0.25rem;
  }

  /* Show card view on mobile for quiz */
  #quiz-container table {
    display: none;
  }

  .quiz-card-view {
    display: block;
  }
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
  width: 100%;
}

.heatmap-item {
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.heatmap-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.heatmap-item.correct {
  background: #d1fae5;
  border-color: #10b981;
}

.heatmap-item.wrong {
  background: #fee2e2;
  border-color: #ef4444;
}

.heatmap-item.unattempted {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.heatmap-item-verb {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.heatmap-item-french {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.heatmap-item-status {
  position: absolute;
  top: 4px;
  right: 4px;
  left: 4px;
  font-size: 0.75rem;
  text-align: right;
  line-height: 1;
}

@media (max-width: 768px) {
  .heatmap-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.5rem;
  }

  .heatmap-item {
    padding: 0.5rem;
  }

  .heatmap-item-verb {
    font-size: 0.75rem;
  }

  .heatmap-item-french {
    font-size: 0.65rem;
  }
}

.tab-helper {
  display: none;
  text-align: center;
  margin-bottom: 0.5rem;
}

/* Hide regular tabs, always use burger menu */
.tabs {
  display: none;
}

/* Burger menu styles */
.burger-btn {
  display: block;
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1001;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  padding: 0.75rem;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  pointer-events: auto;
}

.burger-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.burger-btn:active {
  transform: scale(0.95);
}

.burger-icon {
  width: 24px;
  height: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.burger-icon span {
  display: block;
  height: 3px;
  width: 100%;
  background: white;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.burger-btn.active .burger-icon span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.burger-btn.active .burger-icon span:nth-child(2) {
  opacity: 0;
}

.burger-btn.active .burger-icon span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

.mobile-menu-overlay {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu {
  display: block;
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  max-width: 85%;
  height: 100vh;
  background: white;
  z-index: 1000;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.2);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
}

.mobile-menu-items {
  padding: 1rem;
}

.mobile-menu-item {
  display: block;
  width: 100%;
  padding: 1rem;
  margin-bottom: 0.5rem;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-menu-item:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(6, 182, 212, 0.1));
  border-color: var(--primary-color);
  transform: translateX(-4px);
}

.mobile-menu-item.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-color: transparent;
}

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

/* Modal styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.modal {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-align: center;
}

.modal-body {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  text-align: center;
}

.modal-input {
  width: 100%;
  padding: 0.875rem;
  font-size: 1.125rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 1rem;
  font-family: inherit;
}

.modal-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.modal-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.modal-btn-secondary {
  background: #e2e8f0;
  color: var(--text-primary);
}

.modal-btn-danger {
  background: linear-gradient(135deg, var(--error-color), #dc2626);
  color: white;
}

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

/* Welcome banner */
.welcome-banner {
  position: fixed;
    text-align: center;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1.125rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 1500;
  opacity: 0;
  animation: slideDown 0.5s ease forwards, fadeOut 0.5s ease 2.5s forwards;
}

@keyframes slideDown {
  from {
    top: -100px;
    opacity: 0;
  }
  to {
    top: 20px;
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    pointer-events: none;
  }
}

/* Update notification banner */
.update-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 1500;
  display: none;
  gap: 1rem;
  align-items: center;
  max-width: 90%;
}

.update-banner button {
  background: white;
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
}

.update-banner button:hover {
  background: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.5rem;
    margin: 0.5rem 0;
    padding: 0 3rem 0 0.5rem;
  }

  .container {
    padding: 1rem;
    border-radius: 16px 16px 0 0;
  }

  h2 {
    font-size: 1.5rem;
  }

  .tab-helper {
    display: none;
  }

  th, td {
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
  }

  input {
    padding: 0.5rem;
    font-size: 0.875rem;
  }

  button {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat-box > div:last-child {
    font-size: 2rem;
  }

  .stat-box .stat-breakdown {
    font-size: 0.65rem;
  }

  .update-banner {
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }
}
