/* ==========================================================================
   CSS Stylesheet: Web Quản lý Học sinh & AI Hỗ trợ Học tập Cấp 1
   Elementary Friendly Theme: Vibrant colors, 3D buttons, Rounded shapes,
   Animations, Sparkle effects, Confetti, Toast & Badges
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&family=Quicksand:wght@500;600;700&display=swap');

:root {
  --primary-sky: #0284c7;
  --primary-sky-light: #38bdf8;
  --primary-sky-dark: #0369a1;
  --emerald-green: #10b981;
  --emerald-green-light: #34d399;
  --sun-yellow: #f59e0b;
  --sun-yellow-light: #fbbf24;
  --coral-red: #f43f5e;
  --coral-red-light: #fb7185;
  --royal-purple: #8b5cf6;
  --royal-purple-light: #a78bfa;
  --bg-cream: #fffdf7;
  --card-bg: #ffffff;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --border-light: #e2e8f0;
}

body {
  font-family: 'Nunito', 'Quicksand', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f8fafc;
  background-image: 
    radial-gradient(#e2e8f0 1px, transparent 1px),
    radial-gradient(#e2e8f0 1px, #f8fafc 1px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  color: var(--text-dark);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ==========================================================================
   Elementary 3D Buttons & Interactive Elements
   ========================================================================== */
.btn-3d {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border-radius: 1rem;
  padding: 0.625rem 1.25rem;
  transition: all 0.1s ease-in-out;
  cursor: pointer;
  user-select: none;
  border: none;
  outline: none;
  touch-action: manipulation;
}

.btn-3d-primary {
  background-color: #0ea5e9;
  color: #ffffff;
  box-shadow: 0 5px 0 #0284c7, 0 8px 12px rgba(14, 165, 233, 0.35);
}
.btn-3d-primary:hover {
  background-color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #0284c7, 0 10px 15px rgba(14, 165, 233, 0.4);
}
.btn-3d-primary:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #0284c7, 0 3px 6px rgba(14, 165, 233, 0.3);
}

.btn-3d-success {
  background-color: #10b981;
  color: #ffffff;
  box-shadow: 0 5px 0 #059669, 0 8px 12px rgba(16, 185, 129, 0.35);
}
.btn-3d-success:hover {
  background-color: #34d399;
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #059669, 0 10px 15px rgba(16, 185, 129, 0.4);
}
.btn-3d-success:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #059669, 0 3px 6px rgba(16, 185, 129, 0.3);
}

.btn-3d-warning {
  background-color: #f59e0b;
  color: #ffffff;
  box-shadow: 0 5px 0 #d97706, 0 8px 12px rgba(245, 158, 11, 0.35);
}
.btn-3d-warning:hover {
  background-color: #fbbf24;
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #d97706, 0 10px 15px rgba(245, 158, 11, 0.4);
}
.btn-3d-warning:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #d97706, 0 3px 6px rgba(245, 158, 11, 0.3);
}

.btn-3d-danger {
  background-color: #f43f5e;
  color: #ffffff;
  box-shadow: 0 5px 0 #e11d48, 0 8px 12px rgba(244, 63, 94, 0.35);
}
.btn-3d-danger:hover {
  background-color: #fb7185;
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #e11d48, 0 10px 15px rgba(244, 63, 94, 0.4);
}
.btn-3d-danger:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #e11d48, 0 3px 6px rgba(244, 63, 94, 0.3);
}

.btn-3d-purple {
  background-color: #8b5cf6;
  color: #ffffff;
  box-shadow: 0 5px 0 #7c3aed, 0 8px 12px rgba(139, 92, 246, 0.35);
}
.btn-3d-purple:hover {
  background-color: #a78bfa;
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #7c3aed, 0 10px 15px rgba(139, 92, 246, 0.4);
}
.btn-3d-purple:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #7c3aed, 0 3px 6px rgba(139, 92, 246, 0.3);
}

.btn-3d-neutral {
  background-color: #f1f5f9;
  color: #334155;
  box-shadow: 0 4px 0 #cbd5e1;
}
.btn-3d-neutral:hover {
  background-color: #e2e8f0;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #cbd5e1;
}
.btn-3d-neutral:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #cbd5e1;
}

/* ==========================================================================
   Kid-Friendly Cards & Containers
   ========================================================================== */
.card-elementary {
  background: #ffffff;
  border-radius: 1.5rem;
  border: 2px solid #e2e8f0;
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.card-elementary:hover {
  border-color: #cbd5e1;
  box-shadow: 0 14px 28px -6px rgba(0, 0, 0, 0.08), 0 6px 10px -3px rgba(0, 0, 0, 0.04);
}

.card-interactive {
  cursor: pointer;
}
.card-interactive:hover {
  transform: translateY(-4px);
}

/* ==========================================================================
   Badges, Tags, Flame & Streak
   ========================================================================== */
.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.8125rem;
}

.badge-present {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-absent-excused {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-absent-unexcused {
  background-color: #ffe4e6;
  color: #9f1239;
  border: 1px solid #fecdd3;
}

.badge-late {
  background-color: #ede9fe;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
}

/* Streak Flame Animation */
.streak-flame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: flameBounce 1.2s infinite alternate ease-in-out;
}

@keyframes flameBounce {
  0% { transform: scale(1) rotate(-3deg); filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.5)); }
  50% { transform: scale(1.15) rotate(4deg); filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.8)); }
  100% { transform: scale(1) rotate(-2deg); filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.5)); }
}

.flame-super {
  animation: flameSuper 0.9s infinite alternate ease-in-out;
}

@keyframes flameSuper {
  0% { transform: scale(1.05) rotate(-5deg); filter: drop-shadow(0 0 8px #8b5cf6); }
  50% { transform: scale(1.25) rotate(6deg); filter: drop-shadow(0 0 16px #ec4899); }
  100% { transform: scale(1.05) rotate(-4deg); filter: drop-shadow(0 0 8px #3b82f6); }
}

/* Pulse Glow Animation */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(14, 165, 233, 0); }
}

.pulse-glow {
  animation: pulseGlow 2s infinite;
}

/* Avatar Border Gradients */
.avatar-ring-gold {
  border: 3px solid #fbbf24;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}

.avatar-ring-silver {
  border: 3px solid #94a3b8;
  box-shadow: 0 0 8px rgba(148, 163, 184, 0.4);
}

.avatar-ring-bronze {
  border: 3px solid #d97706;
  box-shadow: 0 0 8px rgba(217, 119, 6, 0.4);
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
#toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
  max-width: 24rem;
  width: calc(100% - 3rem);
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 1.25rem;
  background: #ffffff;
  box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border: 2px solid transparent;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s ease;
}

.toast-item.toast-success {
  border-color: #10b981;
  background: linear-gradient(135deg, #ffffff 85%, #ecfdf5 100%);
}

.toast-item.toast-error {
  border-color: #f43f5e;
  background: linear-gradient(135deg, #ffffff 85%, #fff1f2 100%);
}

.toast-item.toast-warning {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #ffffff 85%, #fffbeb 100%);
}

.toast-item.toast-info {
  border-color: #0ea5e9;
  background: linear-gradient(135deg, #ffffff 85%, #f0f9ff 100%);
}

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

.toast-item.toast-hide {
  animation: slideOutRight 0.25s forwards ease-in;
}

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

/* ==========================================================================
   Modal Dialogs & Overlays
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out forwards;
}

.modal-card {
  background: #ffffff;
  border-radius: 2rem;
  border: 3px solid #e2e8f0;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 42rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from {
    transform: scale(0.85) translateY(20px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Mascot Bee Animation */
.mascot-bee {
  animation: beeFloat 2.5s ease-in-out infinite alternate;
}

@keyframes beeFloat {
  0% { transform: translateY(0px) rotate(-3deg); }
  50% { transform: translateY(-8px) rotate(4deg); }
  100% { transform: translateY(0px) rotate(-3deg); }
}

/* Custom Tabs & Navigation */
.nav-tab-active {
  background-color: #ffffff;
  color: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
  font-weight: 800;
  border-radius: 1rem;
}

/* Utility Animations */
.animate-spin-slow {
  animation: spin 6s linear infinite;
}

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

/* ==========================================================================
   Duolingo-style 3D Flashcard Styles
   ========================================================================== */
.flashcard-perspective {
  perspective: 1200px;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  cursor: pointer;
}

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

.flashcard-front,
.flashcard-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 2rem;
}

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

/* ==========================================================================
   Speech Recognition Mic Waves
   ========================================================================== */
.mic-pulse-ring {
  position: relative;
}

.mic-pulse-ring::before,
.mic-pulse-ring::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 9999px;
  border: 3px solid #0ea5e9;
  opacity: 0;
  animation: micRipples 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.mic-pulse-ring::after {
  animation-delay: 0.75s;
}

@keyframes micRipples {
  0% { transform: scale(0.85); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.sound-wave-bar {
  display: inline-block;
  width: 4px;
  background-color: #0ea5e9;
  border-radius: 9999px;
  margin: 0 2px;
  animation: soundBarWave 0.8s ease-in-out infinite alternate;
}

@keyframes soundBarWave {
  0% { height: 6px; }
  100% { height: 28px; }
}

/* ==========================================================================
   Chatbot Drawer & Speech Bubbles
   ========================================================================== */
.chatbot-drawer {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-bubble-bee {
  background: linear-gradient(135deg, #fef08a 0%, #fde047 100%);
  color: #713f12;
  border-radius: 1.25rem 1.25rem 1.25rem 0.25rem;
  border: 2px solid #facc15;
  box-shadow: 0 4px 6px -1px rgba(234, 179, 8, 0.15);
}

.chat-bubble-student {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  color: #0369a1;
  border-radius: 1.25rem 1.25rem 0.25rem 1.25rem;
  border: 2px solid #7dd3fc;
  box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.15);
}

/* ==========================================================================
   Leaderboard Podium & Badge Showcase
   ========================================================================== */
.podium-step-1 {
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
  border: 3px solid #f59e0b;
  box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.3);
}

.podium-step-2 {
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  border: 3px solid #94a3b8;
  box-shadow: 0 10px 25px -5px rgba(148, 163, 184, 0.25);
}

.podium-step-3 {
  background: linear-gradient(180deg, #ffedd5 0%, #fed7aa 100%);
  border: 3px solid #d97706;
  box-shadow: 0 10px 25px -5px rgba(217, 119, 6, 0.25);
}

.badge-card-unlocked {
  background: linear-gradient(145deg, #ffffff 0%, #fffbeb 100%);
  border: 2px solid #f59e0b;
  box-shadow: 0 8px 16px -2px rgba(245, 158, 11, 0.2);
  transition: all 0.25s ease;
}

.badge-card-unlocked:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 14px 24px -4px rgba(245, 158, 11, 0.35);
}

.badge-card-locked {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  opacity: 0.65;
  filter: grayscale(80%);
  transition: all 0.25s ease;
}

.badge-card-locked:hover {
  opacity: 0.85;
  filter: grayscale(40%);
}

.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 20%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 80%
  );
  transform: rotate(30deg);
  animation: shineSweep 4s infinite ease-in-out;
}

@keyframes shineSweep {
  0% { transform: translateX(-100%) rotate(30deg); }
  50%, 100% { transform: translateX(100%) rotate(30deg); }
}

/* ==========================================================================
   Print & PDF Export Styles
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    background-image: none !important;
    color: #000000 !important;
  }
  header, footer, nav, #toast-container, .print\\:hidden, #nav-more-menu, .btn-3d {
    display: none !important;
  }
  .card-elementary {
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
/* ==========================================================================
   Milestones U3 & U4: Photo Viewer, Split-Screen, Dropzone, Stepper & Badges
   ========================================================================== */

/* Photo Viewer Container in Review & Submission Modal */
.photo-viewer-container {
  position: relative;
  width: 100%;
  height: 380px;
  background-color: #0f172a;
  border-radius: 1.25rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #334155;
  user-select: none;
}

.photo-zoom-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center center;
  user-select: none;
}

.photo-viewer-toolbar {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 10;
}

.zoom-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 9999px;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.zoom-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

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

/* Status Pills & Badges Lifecycle */
.status-pill-grading {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 800;
  font-size: 0.75rem;
  animation: pulseGrading 1.5s infinite ease-in-out;
}

.status-pill-needs-review {
  background-color: #ffe4e6;
  color: #e11d48;
  border: 1px solid #fecdd3;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 800;
  font-size: 0.75rem;
  animation: alertPulse 2s infinite ease-in-out;
}

.status-pill-graded {
  background-color: #d1fae5;
  color: #047857;
  border: 1px solid #a7f3d0;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 800;
  font-size: 0.75rem;
}

.status-pill-teacher-reviewed {
  background-color: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-weight: 800;
  font-size: 0.75rem;
}

@keyframes pulseGrading {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(0.98); }
}

@keyframes alertPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(225, 29, 72, 0); }
}

/* Drag & Drop Zone */
.dropzone-area {
  border: 2.5px dashed #94a3b8;
  border-radius: 1.5rem;
  background-color: #f8fafc;
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.dropzone-area:hover, .dropzone-area.dragover {
  border-color: #0ea5e9;
  background-color: #f0f9ff;
  transform: scale(1.005);
}

/* 4-Stage Stepper */
.parsing-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin: 1.5rem 0;
}

.parsing-stepper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  background-color: #e2e8f0;
  z-index: 1;
  transform: translateY(-50%);
}

.stepper-step {
  position: relative;
  z-index: 2;
  background-color: #ffffff;
  border: 3px solid #cbd5e1;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.875rem;
  color: #64748b;
  transition: all 0.3s ease;
}

.stepper-step.active {
  border-color: #0ea5e9;
  background-color: #0ea5e9;
  color: #ffffff;
  box-shadow: 0 0 0 5px rgba(14, 165, 233, 0.2);
}

.stepper-step.completed {
  border-color: #10b981;
  background-color: #10b981;
  color: #ffffff;
}

/* ==========================================================================
   Mobile & Tablet Responsive Optimizations
   ========================================================================== */

/* Hide scrollbars cleanly on WebKit, Firefox, IE/Edge while keeping scrollability */
.no-scrollbar::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* iOS momentum touch scrolling */
.touch-scroll {
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
}

/* Minimum touch target utility (44px) */
.touch-target {
  min-height: 44px;
  min-width: 44px;
}

/* Mobile horizontal scroll hint pulse */
@keyframes scrollHintPulse {
  0%, 100% { transform: translateX(0); opacity: 0.9; }
  50% { transform: translateX(5px); opacity: 0.6; }
}

.scroll-hint-pulse {
  animation: scrollHintPulse 1.5s infinite ease-in-out;
}

/* Responsive modal container enhancements */
@media (max-width: 640px) {
  .modal-responsive {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0.5rem !important;
    max-height: 90vh !important;
    border-radius: 1.25rem !important;
    padding: 1rem !important;
  }

  /* Compact button styling on phones */
  .btn-3d {
    padding: 0.5rem 0.875rem;
    font-size: 0.75rem;
    border-radius: 0.75rem;
  }

  /* Compact card padding on phones */
  .card-elementary {
    border-radius: 1.25rem;
  }
}

/* Tablet Optimizations (641px - 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
  .tablet-col-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  /* Better spacing for tablet touch */
  .btn-3d {
    padding: 0.5625rem 1rem;
    font-size: 0.8125rem;
  }
}




