/* styles.css */

/* MODERN FONT VARIABLES */
:root {
  --modern-font: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --pixel-font: 'Press Start 2P', monospace;
}

body {
  font-family: 'Press Start 2P', monospace;
  image-rendering: pixelated;
  background-color: #001f3f;
  background-image: repeating-linear-gradient(
    0deg,
    #001f3f 0px,
    #001f3f 2px,
    #002b5c 2px,
    #002b5c 4px
  );
  color: #fff;
}
/* Windows XP Specific Styles */
.winxp-window {
    position: relative;
    background: #ECE9D8;
    border: 1px solid #0A246A;
    border-radius: 8px 8px 0 0;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 48rem;
    box-shadow: 8px 8px 0px #444;
    image-rendering: pixelated;
    margin-top: 2rem;
}

.winxp-titlebar {
    background: linear-gradient(180deg, #0E68F1 0%, #1961DD 50%, #026AFE 100%);
    box-shadow: inset 0px 1.8px 1.2px #3291FF;
    border-radius: 8px 8px 0 0;
    height: 34px;
    padding: 2px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    position: relative;
}

.classic-xp-button {
  background: #c0c0c0;
  border: 2px outset #fff;
  font-family: 'Outfit', monospace;
  font-size: 10px;
  padding: 6px 10px;
  color: black;
  cursor: pointer;
  image-rendering: pixelated;
  box-shadow: inset -1px -1px 0 #808080;
  transition: transform 0.1s ease;
}

.classic-xp-button:hover {
  background: #e0e0e0;
  transform: scale(1.02);
}

.classic-xp-button:active {
  background: #a0a0a0;
  border-style: inset;
  transform: scale(0.98);
}
//
.classic-xp-button {
  transition: transform 0.1s ease;
}

.classic-xp-button[type="submit"] {
  background: repeating-linear-gradient(
    45deg,
    #fcd116,
    #fcd116 4px,
    #ff9f1c 4px,
    #ff9f1c 8px
  );
  border: 3px double #000;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  padding: 10px 14px;
  color: #000;
  text-transform: uppercase;
  width: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 0 #000;
  image-rendering: pixelated;
}

.classic-xp-button[type="submit"]:hover {
  background: repeating-linear-gradient(
    45deg,
    #fff162,
    #fff162 4px,
    #ffd700 4px,
    #ffd700 8px
  );
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #000;
}

.classic-xp-button[type="submit"]:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 #000 inset;
  background: #ffd700;
}

.classic-xp-button[type="submit"]:focus {
  outline: 2px dotted #000;
}
/* Form Elements */
.winxp-input,
.winxp-select {
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  border: 2px solid #ced4da;
  border-top-color: #adb5bd;
  border-left-color: #adb5bd;
  padding: 10px 14px;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  color: #2c3e50;
  width: 100%;
  border-radius: 3px;
  box-shadow: 
    inset 0 1px 2px rgba(0, 0, 0, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}

.winxp-input:focus,
.winxp-select:focus {
  background: linear-gradient(180deg, #ffffff 0%, #f0f8ff 100%);
  border-color: #0E68F1;
  outline: none;
  box-shadow: 
    inset 0 1px 3px rgba(14, 104, 241, 0.1),
    0 0 0 2px rgba(14, 104, 241, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.winxp-input:hover,
.winxp-select:hover {
  border-color: #6c757d;
  background: linear-gradient(180deg, #ffffff 0%, #f1f3f4 100%);
}

.winxp-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #374151;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.winxp-checkbox-container {
    background: #F0F0F0;
    border: 1px solid #003C74;
    padding: 4px 6px;
    margin: 1px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: Outfit, sans-serif;
    font-size: 11px;
    height: 28px;
}

.winxp-statusbar {
    background: #ECE9D8;
    border-top: 1px solid #919B9C;
    padding: 2px 4px;
    font-family: Outfit, sans-serif;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 0 0 8px 8px;
}

/* Layout & Utility Classes */
.min-h-screen {
    min-height: 100vh;
}

.w-full {
    width: 100%;
}

.hidden {
    display: none;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.space-x-2 > * + * {
    margin-left: 0.5rem;
}

.space-x-4 > * + * {
    margin-left: 1rem;
}

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

/* Test Results Styling */
.result-item {
  background: #FFF;
  border: 2px solid #003C74;
  padding: 1rem;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  margin-bottom: 10px;
  box-shadow: 2px 2px 0 #333;
  border-left: 6px solid;
  line-height: 1.4;
}

.result-item p {
  margin: 0.25rem 0;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  line-height: 1.4;
}

.result-item.correct {
  border-left-color: #00FF00;
}

.result-item.incorrect {
  border-left-color: #FF4B4B;
}

/* Notification styles for JavaScript-generated messages */
.export-notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: #000;
    color: #00FF00;
    border: 2px solid #00FF00;
    padding: 8px 12px;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    z-index: 10000;
    border-radius: 0;
    box-shadow: 2px 2px 0 #333;
    animation: retro-slide-in 0.3s ease-out;
    image-rendering: pixelated;
}

.export-notification.bg-red-100 {
    background: #000 !important;
    color: #FF4444 !important;
    border-color: #FF4444 !important;
}

.export-notification.text-red-700 {
    color: #FF4444 !important;
}

.export-notification.bg-green-100 {
    background: #000 !important;
    color: #00AA00 !important;
    border-color: #00AA00 !important;
}

.export-notification.text-green-700 {
    color: #00AA00 !important;
}

.export-notification.bg-blue-100 {
    background: #000 !important;
    color: #0099FF !important;
    border-color: #0099FF !important;
}

.export-notification.text-blue-700 {
    color: #0099FF !important;
}

/* Override Tailwind classes for retro theme */
.export-notification .text-sm {
    font-size: 8px !important;
    font-family: 'Press Start 2P', monospace !important;
}

.export-notification button {
    background: none !important;
    border: none !important;
    color: inherit !important;
    font-family: 'Press Start 2P', monospace !important;
    font-size: 10px !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
}

.export-notification button:hover {
    opacity: 0.7;
}

/* Minimal notification style for simple messages */
.minimal-notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: #000;
    color: #00FF00;
    border: 1px solid #00FF00;
    padding: 6px 10px;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    z-index: 9999;
    animation: retro-slide-in 0.3s ease-out;
}

.minimal-notification.error {
    color: #FF4444;
    border-color: #FF4444;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

/* Position Utilities */
.fixed {
    position: fixed;
}

.absolute {
    position: absolute;
}

.relative {
    position: relative;
}

.top-0 {
    top: 0;
}

.top-4 {
    top: 1rem;
}

.right-4 {
    right: 1rem;
}

.bottom-4 {
    bottom: 1rem;
}

.left-0 {
    left: 0;
}

/* Z-index Utilities */
.z-50 {
    z-index: 50;
}

/* Grid */
.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Background Colors */
.bg-\[\#235ABF\] {
    background-color: #235ABF;
}

/* Add these styles to your styles.css */

.winxp-folder-button {
    position: static;
    top: 16px;
    left: 16px;
    z-index: 9999;
    width: 70px;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: white;
    font-family: Outfit, sans-serif;
    font-size: 11px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.winxp-folder-button::before {
    content: "";
    width: 32px;
    height: 32px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23FCD474"><path d="M2 6C2 4.89543 2.89543 4 4 4H8L10 6H20C21.1046 6 22 6.89543 22 8V18C22 19.1046 21.1046 20 20 20H4C2.89543 20 2 19.1046 2 18V6Z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.5));
}

.winxp-folder-button:hover {
    background: rgba(49, 106, 197, 0.3);
    border: 1px dotted white;
}

.winxp-folder-button:active {
    background: rgba(49, 106, 197, 0.5);
}

.winxp-titlebar .classic-xp-button.bg-\[\#C24F3D\] {
    width: 24px !important;  /* w-6 in Tailwind equals 24px */
    height: 24px !important; /* h-6 in Tailwind equals 24px */
    
    background: linear-gradient(136.17deg, #DE836D 12.5%, #FF4000 89.09%) !important;
    border: 0.6px solid #FFFFFF !important;
    box-shadow: 
        inset -2.4px -2.4px 2.4px rgba(0, 0, 0, 0.18),
        inset -2.4px -4.8px 4.8px rgba(215, 65, 21, 0.5),
        inset 1.2px 1.2px 0px rgba(0, 0, 0, 0.2),
        inset -1.2px -1.2px 0px #CF2F01 !important;
    border-radius: 2.4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    color: white !important;
}

.winxp-titlebar .classic-xp-button.bg-\[\#C24F3D\]:hover {
  background: linear-gradient(136.17deg, #FF4000 12.5%, #DE836D 89.09%) !important;
}

.winxp-titlebar .classic-xp-button.bg-\[\#C24F3D\]:active {
  background: #FF4000 !important;
  box-shadow: 
      inset 2.4px 2.4px 2.4px rgba(0, 0, 0, 0.18),
      inset 2.4px 4.8px 4.8px rgba(215, 65, 21, 0.5) !important;
}

.winxp-titlebar .classic-xp-button.bg-\[\#C24F3D\]::before {
  border-color: rgba(255, 255, 255, 0.5) !important;
  inset: 0 !important;
}

/* 🔢 QUESTION NUMBER SELECTOR */
#question-number,
#custom-question-number {
  background: #fff;
  border: 2px solid #000;
  padding: 8px;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  width: 100%;
  image-rendering: pixelated;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg fill='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
}

#question-number:hover,
#custom-question-number:hover {
  background: #e8f0ff;
}

#question-number:focus,
#custom-question-number:focus {
  outline: none;
  border-color: #0e68f1;
}

.action-button {
  width: 130px !important;  /* Same width as generate button */
  height: 31px !important;  /* Same height as generate button */
  font-size: 13px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;     /* Remove any default margins */
  padding: 0 8px !important;/* Add some padding for text */
  line-height: 1 !important;
}

/* Container styling */
.fixed.bottom-4.right-4 {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.winxp-label.text-white {
    font-family: 'Lucida Console', Monaco, monospace;  /* Classic command prompt font */
    font-size: 18px;
    color: white;
    display: flex;
    align-items: center;
    height: 24px;       /* Match button height */
    margin-right: 8px;  /* Space between text and logout button */
    background: none;   /* Remove all backgrounds */
    border: none;       /* Remove all borders */
    padding: 0;         /* Remove padding */
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);  /* Subtle shadow for readability */
}

.space-y-2 {
    margin-bottom: 12px;
}

.winxp-titlebar .classic-xp-button {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
}

.tab-container {
  background: #ECE9D8;
  width: 100%;
}

.winxp-tabs {
  display: flex;
  gap: 6px;
  padding-left: 6px;
  background: #ECE9D8;
  border-bottom: 1px solid #C0C0C0;  /* Much softer bottom border */
  font-family: 'Press Start 2P', monospace;
  image-rendering: pixelated;
  margin-top: 2px;
}

.winxp-tab {
  font-size: 10px;
  color: #333;  /* Softer text color */
  background: #DFDFDF;  /* Lighter background */
  padding: 8px 12px 6px 12px;
  border: 1px solid #999;  /* Softer border */
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  box-shadow: 1px -1px 0 #AAA;  /* Much softer shadow */
  cursor: pointer;
  transition: all 0.1s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 0;
  margin-top: 2px;
}gin-top: 2px;
}

.winxp-tab:hover {
  background: #F0F0F0;  /* Even lighter on hover */
  border-color: #666;   /* Slightly darker border on hover */
  z-index: 2;
}

.winxp-tab.active {
  background: #0E68F1;
  color: #fff;
  border-color: #0A5BC4;
   /* hides the bottom edge */
  box-shadow: none;
  z-index: 3;
}

.tab-icon {
  width: 16px;
  height: 16px;
}

.tab-content {
  display: none;
}

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

//quizzy
#quizzy-mascot-container {
  position: fixed;               /* Always stick to screen */
  bottom: 1.5rem;                /* Distance from bottom */
  left: 1.5rem;                  /* Distance from left */
  z-index: 50;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  image-rendering: pixelated;
  pointer-events: none;         /* Don't block clicks behind */
}


#quizzy-mascot {
  width: 96px;
  height: auto;
  filter: drop-shadow(2px 2px 0 #000);
  image-rendering: pixelated;
  pointer-events: none;
}

#quizzy-text-bubble {
  background: repeating-linear-gradient(
    0deg,
    #0E68F1,
    #0E68F1 1px,
    #0C5CD2 1px,
    #0C5CD2 2px
  );
  color: #fff;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  padding: 10px 12px;
  border: 2px solid #003C74;
  box-shadow: 2px 2px 0 #000;
  max-width: 200px;
  line-height: 1.5;
  border-radius: 4px;
  image-rendering: pixelated;
  position: relative;
}

/* 🗯️ Speech Bubble Tail */
#quizzy-text-bubble::after {
  content: "";
  position: absolute;
  left: -6px;
  bottom: 8px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-right: 6px solid #003C74;
  border-bottom: 6px solid transparent;
}


@keyframes floaty {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-5px); }
  100% { transform: translateY(0px); }
}

.xp-container {
  background: #000;
  border: 2px solid #0e68f1;
  padding: 8px;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #00ff00;
  box-shadow: 0 0 10px #0e68f1 inset;
  width: 300px;
  margin: 10px auto;
}

.xp-bar-outer {
  background: #333;
  border: 2px solid #666;
  height: 12px;
  margin-top: 4px;
}

.xp-bar-inner {
  background: repeating-linear-gradient(
    45deg,
    #0f0 0px,
    #0f0 2px,
    #090 2px,
    #090 4px
  );
  height: 100%;
  width: 0%;
  transition: width 0.4s ease-in-out;
}

.xp-points {
  text-align: right;
  margin-top: 4px;
}

#xp-bar {
  position: static;
  
}

/* 🎯 TEST TYPE CHOICE BOXES */
/* CLEAN TEST TYPE OPTIONS - MATCHING YOUR THEME */
.test-type-option {
  background: #ECE9D8;
  border: 2px outset #C0C0C0;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  color: #333;
  border-radius: 2px;
}

.test-type-option:hover {
  background: #F0F0F0;
  border: 2px outset #DFDFDF;
  transform: translateY(-1px);
}

.test-type-option:active {
  border: 2px inset #C0C0C0;
  transform: translateY(0);
}

.test-type-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #0E68F1;
}

.test-type-option label {
  margin: 0;
  cursor: pointer;
  font-family: var(--modern-font) !important;
  font-size: 12px;
  font-weight: 500;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.test-type-option label svg {
  color: #666;
  width: 16px;
  height: 16px;
  transition: color 0.2s ease;
}

.test-type-option:hover label svg {
  color: #0E68F1;
}

.question-count-option {
  background: #ECE9D8;
  border: 1px outset #C0C0C0;
  padding: 8px;
  text-align: center;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  color: #333;
  transition: all 0.1s ease;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.question-count-option:hover {
  background: #DFDFDF;
  border: 1px outset #DFDFDF;
}

.question-count-option.selected {
  background: #0E68F1;
  color: #FFFFFF;
  border: 1px inset #0E68F1;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.test-summary-box {
  background: #ECE9D8;
  border: 2px solid #003C74;
  padding: 20px;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  margin-bottom: 10px;
  box-shadow: 2px 2px 0 #333;
  image-rendering: pixelated;
}

.test-summary-box h3 {
  font-size: 13px;
  margin-bottom: 4px;
  color: #0e68f1;
}

.test-summary-box p {
  margin: 2px 0;
  color: #000;
}

.test-summary-box .score {
  color: #00ff00;
  font-weight: bold;
}

.test-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.test-actions button {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  background: #c0c0c0;
  border: 2px outset #fff;
  padding: 4px 8px;
  cursor: pointer;
  box-shadow: inset -1px -1px 0 #808080;
  image-rendering: pixelated;
}

.test-actions button:hover {
  background: #e0e0e0;
}

.test-actions button:active {
  border-style: inset;
}

.winxp-welcome {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: #FFFFFF;
  background: #0E68F1;
  padding: 6px 10px;
  border: 2px solid #003C74;
  box-shadow: 2px 2px 0 #000;
  image-rendering: pixelated;
  text-transform: uppercase;
}



@keyframes slideUpIn {
  0% {
    transform: translate(-50%, 100vh);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

#graded-results-window .classic-xp-button {
  min-width: 100px; /* Ensure consistent button widths */
  white-space: nowrap; /* Prevent text wrapping */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px; /* Space between emoji and text */
}

/* Specific styling for export buttons to make them stand out */
.generate-similar-btn {
  background: repeating-linear-gradient(
    45deg,
    #00FF00,
    #00FF00 3px,
    #00CC00 3px,
    #00CC00 6px
  ) !important;
  border: 2px solid #003C74 !important;
  color: #000 !important;
  font-weight: bold !important;
  box-shadow: 
    2px 2px 0 #333,
    inset 0 0 8px rgba(0, 255, 0, 0.3) !important;
  text-shadow: 0 0 2px rgba(0, 255, 0, 0.5) !important;
}

.generate-similar-btn:hover {
  background: repeating-linear-gradient(
    45deg,
    #33FF33,
    #33FF33 3px,
    #00FF00 3px,
    #00FF00 6px
  ) !important;
  transform: translateY(-1px);
  box-shadow: 
    3px 3px 0 #333,
    inset 0 0 10px rgba(0, 255, 0, 0.5) !important;
}

.generate-similar-btn:active {
  transform: translateY(1px);
  box-shadow: 
    1px 1px 0 #333,
    inset 2px 2px 4px rgba(0, 0, 0, 0.3) !important;
}

/* PDF Export Button - Retro Gold/Orange Theme */
.export-btn[onclick*="pdf"] {
  background: repeating-linear-gradient(
    45deg,
    #FFD700,
    #FFD700 3px,
    #FF9F1C 3px,
    #FF9F1C 6px
  ) !important;
  border: 2px solid #003C74 !important;
  color: #000 !important;
  font-weight: bold !important;
  box-shadow: 2px 2px 0 #333 !important;
}

.export-btn[onclick*="pdf"]:hover {
  background: repeating-linear-gradient(
    45deg,
    #FFED4A,
    #FFED4A 3px,
    #FFD700 3px,
    #FFD700 6px
  ) !important;
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 #333 !important;
}

.export-btn[onclick*="pdf"]:active {
  transform: translateY(1px);
  box-shadow: 1px 1px 0 #333 inset !important;
}

/* DOCX Export Button - XP Blue Theme */
.export-btn[onclick*="docx"] {
  background: repeating-linear-gradient(
    45deg,
    #0E68F1,
    #0E68F1 3px,
    #003C74 3px,
    #003C74 6px
  ) !important;
  border: 2px solid #003C74 !important;
  color: #fff !important;
  font-weight: bold !important;
  box-shadow: 2px 2px 0 #333 !important;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5) !important;
}

.export-btn[onclick*="docx"]:hover {
  background: repeating-linear-gradient(
    45deg,
    #1E7FFF,
    #1E7FFF 3px,
    #0E68F1 3px,
    #0E68F1 6px
  ) !important;
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 #333 !important;
}

.export-btn[onclick*="docx"]:active {
  transform: translateY(1px);
  box-shadow: 1px 1px 0 #333 inset !important;
}

/* General export button improvements */
.export-btn {
  font-family: 'Press Start 2P', monospace !important;
  font-size: 10px !important;
  image-rendering: pixelated !important;
  transition: all 0.1s ease !important;
}

/* Results window button improvements */
#graded-results-window .classic-xp-button {
  min-width: 100px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  image-rendering: pixelated;
}

/* Retry button - Keep it neutral grey XP style */
#graded-results-window button[onclick*="generateTestAgain"] {
  background: #C0C0C0 !important;
  border: 2px outset #fff !important;
  color: #000 !important;
  box-shadow: 2px 2px 0 #333 !important;
}

#graded-results-window button[onclick*="generateTestAgain"]:hover {
  background: #E0E0E0 !important;
  transform: translateY(-1px);
}

/* Close button - Keep it standard XP grey */
#graded-results-window button[onclick*="remove"] {
  background: #C0C0C0 !important;
  border: 2px outset #fff !important;
  color: #000 !important;
  box-shadow: 2px 2px 0 #333 !important;
}

#graded-results-window button[onclick*="remove"]:hover {
  background: #E0E0E0 !important;
  transform: translateY(-1px);
}

/* Add scanline effect to all special buttons for extra CRT vibes */
.generate-similar-btn::before,
.export-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 1px,
    rgba(0, 0, 0, 0.05) 1px,
    rgba(0, 0, 0, 0.05) 2px
  );
  pointer-events: none;
  z-index: 1;
}

/* Make sure button text is above the scanlines */
.generate-similar-btn,
.export-btn {
  position: relative;
  z-index: 2;
}

/* CLEAN HINT BUTTON */
.hint-button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.hint-button:hover {
    opacity: 1;
    background: rgba(255, 215, 0, 0.1);
    transform: scale(1.1);
}

.hint-button:active {
    transform: scale(0.95);
}

/* Subtle pulse animation to draw attention */
@keyframes pulse {
  0% { box-shadow: 2px 2px 0 #333, 0 0 0 0 rgba(255, 215, 0, 0.4); }
  50% { box-shadow: 2px 2px 0 #333, 0 0 0 6px rgba(255, 215, 0, 0.1); }
  100% { box-shadow: 2px 2px 0 #333, 0 0 0 0 rgba(255, 215, 0, 0); }
}

/* 🗨️ HINT DISPLAY - CRT/Gameboy Style Speech Bubble */
/* BEAUTIFUL HINT DISPLAY */
.hint-display {
    margin-top: 16px;
    animation: hintSlideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hint-display.hidden {
    display: none;
}

.hint-bubble {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
}

.hint-bubble::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 24px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
    filter: drop-shadow(0 -2px 2px rgba(0, 0, 0, 0.1));
}

.hint-bubble.success {
    background: linear-gradient(135deg, #ECFDF5 0%, #F0FDF4 100%);
    border-color: #A7F3D0;
}

.hint-bubble.success::before {
    border-bottom-color: #ECFDF5;
}

.hint-bubble.error {
    background: linear-gradient(135deg, #FEF2F2 0%, #FEF7F7 100%);
    border-color: #FECACA;
}

.hint-bubble.error::before {
    border-bottom-color: #FEF2F2;
}

.hint-bubble.loading {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF9E7 100%);
    border-color: #FED7AA;
}

.hint-bubble.loading::before {
    border-bottom-color: #FFFBEB;
}

@keyframes hintSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Hint header */
.hint-header {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hint-bubble.success .hint-header {
    color: #065F46;
}

.hint-bubble.error .hint-header {
    color: #991B1B;
}

.hint-bubble.loading .hint-header {
    color: #92400E;
}

/* Hint text */
.hint-text {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Close button */
.hint-close {
    background: #F3F4F6;
    border: 1px solid #D1D5DB;
    color: #374151;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 500;
    padding: 8px 16px;
    cursor: pointer;
    float: right;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.hint-close:hover {
    background: #E5E7EB;
    border-color: #9CA3AF;
}

.hint-close:active {
    transform: translateY(1px);
}

/* Loading animation */
.loading-dots {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: 12px 0;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    background: #F59E0B;
    border-radius: 50%;
    animation: bounce 1.5s infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes xpBounce {
    0%, 80%, 100% {
        transform: scale(1);
        background: #FF9F1C;
    }
    40% {
        transform: scale(1.2);
        background: #FFD700;
    }
}

/* Mobile responsive */
@media (max-width: 640px) {
  .hint-button {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .hint-bubble {
    font-size: 9px;
    padding: 10px;
  }

  .hint-text {
    padding: 6px;
  }
}

/* Simple Matching Question Styles */
.simple-matching-container {
    background: #F8F9FA;
    border: 2px solid #E9ECEF;
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
    font-family: 'Outfit', sans-serif;
}

.matching-instruction {
    font-size: 14px;
    font-weight: bold;
    color: #495057;
    margin-bottom: 16px;
    text-align: center;
}

.matching-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    padding: 12px;
    background: white;
    border: 1px solid #DEE2E6;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.matching-row:hover {
    border-color: #0066CC;
    background: #F0F8FF;
}

.matching-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.item-number {
    color: #0066CC;
    font-weight: bold;
    min-width: 20px;
}

.item-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.4;
    color: #333;
}

.matching-arrow {
    font-size: 18px;
    color: #6C757D;
    font-weight: bold;
}

.matching-item-right {
    display: flex;
    justify-content: center;
}

.matching-select {
    background: white;
    border: 2px solid #CED4DA;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 13px;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 200px;
    max-width: 300px;
}

.matching-select:focus {
    outline: none;
    border-color: #0066CC;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}

.matching-select:hover {
    border-color: #0066CC;
}

.matching-select option {
    padding: 8px;
    font-size: 13px;
    line-height: 1.4;
}

/* Reference section */
.matching-reference {
    margin-top: 20px;
    padding: 16px;
    background: #E9ECEF;
    border-radius: 6px;
}

.reference-title {
    font-size: 12px;
    font-weight: bold;
    color: #495057;
    margin-bottom: 8px;
}

.reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}

.reference-item {
    font-size: 11px;
    color: #6C757D;
    padding: 4px 8px;
    background: white;
    border-radius: 4px;
    border-left: 3px solid #0066CC;
}

.reference-item strong {
    color: #0066CC;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .matching-row {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: center;
    }

    .matching-arrow {
        transform: rotate(90deg);
        justify-self: center;
    }

    .matching-select {
        width: 100%;
        max-width: none;
    }

    .reference-grid {
        grid-template-columns: 1fr;
    }

    .simple-matching-container {
        padding: 16px;
    }
} 

/* Responsive design for mobile */
@media (max-width: 768px) {
    .matching-row {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
        padding: 12px;
    }

    .matching-prompt {
        flex: 1 1 auto;
        text-align: left;
        font-size: 14px;
    }

    .matching-arrow {
        transform: rotate(90deg);
        flex: 0 0 20px;
        align-self: center;
        margin: 4px 0;
    }

    .matching-select {
        flex: 1 1 auto;
        max-width: none;
        min-width: 0;
        width: 100%;
    }

    .matching-header {
        flex-direction: column;
        gap: 4px;
        text-align: center;
        border-bottom: none;
        padding-bottom: 8px;
    }

    .header-left,
    .header-right {
        flex: 1;
        text-align: center;
    }

    .answer-choices-list {
        grid-template-columns: 1fr;
    }
}

/* Small screen adjustments */
@media (max-width: 480px) {
    .matching-container {
        padding: 12px;
        margin: 8px 0;
    }

    .matching-row {
        padding: 10px 8px;
        margin-bottom: 8px;
    }

    .matching-prompt {
        font-size: 13px;
    }

    .matching-select {
        font-size: 13px;
        padding: 8px;
    }
}

/* Processing Animation Styles */
.result-item.processing {
    background: linear-gradient(135deg, #ECE9D8 0%, #F0F0F0 100%);
    border: 2px solid #666;
    position: relative;
    overflow: hidden;
}

.result-item.processing::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.2), transparent);
    animation: scanLine 2s infinite;
}

.processing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #003C74;
    color: #00FF00;
    border: 2px solid #00FF00;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    margin-top: 8px;
}

.pixel-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
    filter: hue-rotate(0deg);
}

.processing-text {
    color: #00FF00;
    text-shadow: 0 0 10px #00FF00;
}

.loading-dots {
    display: flex;
    gap: 2px;
}

.loading-dots span {
    animation: blink 1.4s infinite both;
    color: #FFD700;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Animations */
@keyframes scanLine {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes blink {
    0%, 80%, 100% { 
        opacity: 0; 
        transform: scale(0.8);
    }
    40% { 
        opacity: 1; 
        transform: scale(1.2);
    }
}

@keyframes pulse {
    0% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% { 
        transform: scale(1.02); 
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
    100% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@keyframes expandBar {
    from { 
        width: 0%; 
        background: linear-gradient(90deg, #666, #666);
    }
    to { 
        background: linear-gradient(90deg, #00FF00, #22C55E);
    }
}

/* Enhanced result items for better retro feel */
.result-item {
    margin-bottom: 12px;
    padding: 12px;
    border: 2px solid #003C74;
    background: white;
    box-shadow: 4px 4px 0 #333;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    line-height: 1.6;
    position: relative;
    image-rendering: pixelated;
}

.result-item.correct {
    border-color: #22C55E;
    background: linear-gradient(135deg, #F0FDF4 0%, #E6FFFA 100%);
}

.result-item.incorrect {
    border-color: #EF4444;
    background: linear-gradient(135deg, #FEF2F2 0%, #FFF1F1 100%);
}

.result-item.correct::after {
    content: '✅';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 16px;
    animation: bounce 0.5s ease-in-out;
}

.result-item.incorrect::after {
    content: '❌';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 16px;
    animation: shake 0.5s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
    40%, 43% { transform: translate3d(0,-8px,0); }
    70% { transform: translate3d(0,-4px,0); }
    90% { transform: translate3d(0,-2px,0); }
}

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

/* 🎯 SIMPLIFIED FEEDBACK BUTTON */

.feedback-btn:active {
  transform: translateY(1px);
  box-shadow: 1px 1px 0 #333;
}

.feedback-btn i {
  font-size: 16px;
  margin-bottom: 4px;
}

.feedback-btn span {
  font-size: 7px;
  line-height: 1;
  text-align: center;
}

.feedback-popup.hidden {
  display: none;
}

@keyframes popup-fade {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* 🧾 FORM ELEMENTS */
.feedback-popup .winxp-input,
.feedback-popup .winxp-select {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  background: #fff;
  border: 2px solid #000;
  padding: 6px;
  width: 100%;
}

.feedback-popup .winxp-label {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: bold;
  color: #000;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.feedback-popup .classic-xp-button {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  background: #C0C0C0;
  border: 2px outset #fff;
  padding: 6px 12px;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.feedback-popup .classic-xp-button:hover {
  background: #E0E0E0;
  transform: translateY(-1px);
}

.feedback-popup .classic-xp-button:active {
  border-style: inset;
  transform: translateY(1px);
}

.feedback-popup .classic-xp-button.bg-\[#0E68F1\] {
  background: linear-gradient(180deg, #0E68F1, #003C74);
  color: white;
  border: 2px outset #0E68F1;
}

#char-count {
  font-weight: bold;
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  color: #333;
  text-align: right;
}


@media (max-width: 640px) {
  .feedback-btn {
      width: 70px;
      height: 70px;
      font-size: 7px;
  }

  .feedback-icon {
      font-size: 18px;
  }

  .feedback-text {
      font-size: 6px;
  }
}

/* Mobile Typography Fixes */
@media (max-width: 768px) {
  .winxp-label {
    font-size: 8px;
    line-height: 1.4;
  }

  .winxp-window {
    margin: 0.5rem;
    max-width: calc(100vw - 1rem);
  }

  .winxp-input {
    font-size: 8px;
    padding: 8px;
  }

  .classic-xp-button {
    font-size: 8px;
    padding: 8px 12px;
  }

  /* Make header text slightly larger on mobile for readability */
  .winxp-titlebar .winxp-label {
    font-size: 9px;
  }
}

@media (max-width: 480px) {
  .winxp-label {
    font-size: 7px;
  }
}

/* Hide XP bar on mobile and reorganize layout */
@media (max-width: 768px) {
  #left-toolbar {
    display: none !important;
  }

  .mobile-my-tests {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 60;
    background: #C0C0C0;
    border: 2px outset #fff;
    padding: 8px 12px;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    color: #000;
    cursor: pointer;
    box-shadow: 2px 2px 0 #333;
    image-rendering: pixelated;
  }

  .mobile-my-tests:hover {
    background: #E0E0E0;
    transform: translateY(-1px);
  }

  .mobile-my-tests:active {
    border-style: inset;
    transform: translateY(1px);
  }

  #xp-bar {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .winxp-tabs {
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
  }

  .winxp-tab {
    font-size: 8px !important;
    padding: 6px 8px 4px 8px !important;
    flex: 1;
    min-width: 80px;
    justify-content: center;
  }

  .winxp-tab svg {
    width: 12px !important;
    height: 12px !important;
  }
}

/* Make dropdowns taller and more touch-friendly */
.winxp-select {
  min-height: 45px !important;
  padding: 12px 10px !important;
  font-size: 11px !important;
}

.winxp-input {
  min-height: 45px !important;
  padding: 12px 10px !important;
  font-size: 11px !important;
}

@media (max-width: 768px) {
  .winxp-select {
    min-height: 50px !important;
    padding: 15px 12px !important;
    font-size: 12px !important;
  }

  .winxp-input {
    min-height: 40px !important;
    padding: 15px 12px !important;
    font-size: 12px !important;
  }

  /* Make test type options taller and more touch-friendly */
  #test-types .test-type-option {
    padding: 12px 15px !important;
    min-height: 50px !important;
  }

  .question-count-option {
    padding: 12px 15px !important;
    min-height: 30px !important;
    font-size: 10px !important;
  }
}

@media (max-width: 480px) {
  .winxp-select, .winxp-input {
    min-height: 55px !important;
    padding: 18px 15px !important;
    font-size: 13px !important;
  }
}

@media (max-width: 768px) {
  /* Move main window below the login/signup buttons */
  /* Move ONLY the homepage main window below the login/signup buttons */
  .min-h-screen:has(.winxp-tabs) .winxp-window {
    margin-top: 3rem !important; /* Push down only if it has tabs */
    margin-bottom: 2rem;
  }

  /* Keep login/signup windows normal */
  .min-h-screen:not(:has(.winxp-tabs)) .winxp-window {
    margin-top: -1rem !important; /* Normal position */
  }

  /* Target ONLY the login/signup button container - be more specific */
  .fixed.bottom-4.right-4:has(.winxp-label.text-white) {
    position: fixed !important;
    top: 1rem !important;
    bottom: auto !important;
    right: 1rem !important;
    flex-direction: row !important;
    gap: 0.5rem !important;
  }

  /* Make login/signup buttons smaller on mobile */
  .fixed.bottom-4.right-4:has(.winxp-label.text-white) .classic-xp-button {
    font-size: 8px !important;
    padding: 8px 12px !important;
    min-width: auto !important;
  }
}
.winxp-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  font-weight: normal;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .winxp-title {
    font-size: 8px;
    letter-spacing: 0.25px;
  }
}

/* Mobile Test Mode Container Fixes */
@media (max-width: 768px) {
    .test-mode-slide-in {
        position: static !important;
        margin: 1rem auto !important;
        max-width: calc(100vw - 2rem) !important;
        width: calc(100vw - 1rem) !important;
        max-height: calc(100vh - 4rem) !important;
        overflow-y: auto !important;
        transform: none !important;
        animation: none !important;
    }

  /* Fix action buttons on mobile */
      .test-mode-slide-in .action-buttons {
          position: static !important;
          bottom: auto !important;
          left: auto !important;
          right: auto !important;
          transform: none !important;
          width: 100% !important;
          padding: 1rem !important;
          background: #ECE9D8 !important;
          border-top: 2px solid #003C74 !important;
          margin-top: 1rem !important;
          display: flex !important;
          flex-wrap: wrap !important;
          gap: 8px !important;
          justify-content: center !important;
      }

      .test-mode-slide-in .action-button {
          font-size: 10px !important;
          padding: 8px 12px !important;
          min-width: 100px !important;
          flex: 0 1 auto !important;
      }
  }

    #test-questions-wrapper {
        max-height: calc(100vh - 200px) !important;
        overflow-y: auto !important;
        padding: 0.5rem !important;
    }

    /* Fix matching questions on mobile */
    .matching-container {
        padding: 8px !important;
        margin: 8px 0 !important;
    }

    .matching-row {
        flex-direction: column !important;
        gap: 8px !important;
        padding: 8px !important;
        margin-bottom: 12px !important;
    }

    .matching-prompt {
        font-size: 13px !important;
        text-align: left !important;
    }

    .matching-arrow {
        transform: rotate(90deg) !important;
        margin: 4px 0 !important;
    }

    .matching-select {
        width: 100% !important;
        font-size: 13px !important;
        padding: 8px !important;
    }
}

/* Ensure proper container sizing */
@media (max-width: 480px) {
    .test-mode-slide-in {
        margin: 0.5rem !important;
        width: calc(100vw - 1rem) !important;
        max-width: calc(100vw - 1rem) !important;
    }
}

/* Make test mode container match main window exactly */
.test-mode-slide-in {
    background: #ECE9D8 !important;
    border: 1px solid #0A246A !important;
    border-radius: 8px 8px 0 0 !important;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3) !important;
    padding: 0 !important; /* Remove padding so titlebar fills completely */
    margin: 0 !important;
    overflow: hidden !important; /* Prevent content from spilling out */
}

/* Ensure the content area has proper padding */
.test-mode-slide-in > *:not(.winxp-titlebar) {
    padding: 1rem !important;
}

/* Make sure titlebar has no margins and fills completely */
.test-mode-slide-in .winxp-titlebar {
    margin: 0 !important;
    border-radius: 8px 8px 0 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Move action buttons closer to test content */
.test-mode-slide-in .action-buttons {
  margin-top: 1rem !important;
  margin-bottom: 1rem !important;
}

#test-questions-wrapper {
  margin-bottom: 0.5rem !important;
}

.test-mode-integrated {
  position: static;
  margin: 2rem auto;
  max-width: 700px;
  width: 90%;
  background: #ECE9D8;
  border: 2px solid #0A246A;
  box-shadow: 8px 8px 0 #333;
  image-rendering: pixelated;
  font-family: 'Press Start 2P', monospace;
  color: #000;
  animation: slideInFromRight 0.5s ease-out;
  padding: 0; /* Remove padding so titlebar fits properly */
}

.test-mode-integrated #test-questions-wrapper {
  max-height: none !important; /* Remove height restriction */
  overflow-y: visible !important; /* Allow natural scrolling */
  padding: 1rem;
}

/* Add this new class for results window */
.test-results-window {
  position: static;
  margin: 2rem auto 0 auto;
  max-width: 700px;
  width: 90%;
  background: #ECE9D8;
  border: 2px solid #0A246A;
  box-shadow: 8px 8px 0 #333;
  image-rendering: pixelated;
  font-family: 'Press Start 2P', monospace;
  color: #000;
  animation: slideInFromRight 0.5s ease-out;
  border-radius: 8px 8px 0 0;
  max-height: none !important; /* Remove height restrictions */
  overflow: visible !important; /* Allow all content to show */
}

/* Ensure results body can expand */
#results-body {
  max-height: none !important;
  overflow: visible !important;
  padding-bottom: 2rem; /* Add space for action buttons */
}

/* Make sure question results container can show all questions */
#question-results {
  max-height: none !important;
  overflow: visible !important;
}

/* Streaming Progress Styles */
#questions-preview {
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    line-height: 1.3;
    max-height: 160px;
    overflow-y: auto;
    background: #fff;
    border: 2px inset #C0C0C0;
    padding: 8px;
    margin-top: 8px;
}

#questions-preview::-webkit-scrollbar {
    width: 12px;
}

#questions-preview::-webkit-scrollbar-track {
    background: #C0C0C0;
    border: 1px inset #C0C0C0;
}

#questions-preview::-webkit-scrollbar-thumb {
    background: #808080;
    border: 1px outset #808080;
}

#questions-preview .question-preview {
    border-bottom: 1px solid #E0E0E0;
    padding-bottom: 4px;
    margin-bottom: 4px;
    color: #000;
}

#questions-preview .question-preview:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Enhanced progress bar for streaming */
.progress-bar-container {
    position: relative;
    overflow: hidden;
}

/* Streaming Test Styles */
.streaming-question,
.question-container {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.streaming-question:hover,
.question-container:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #D1D5DB;
}box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.question-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #F3F4F6;
}

.question-number {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #0E68F1;
  margin-right: 8px;
}

.question-text {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  color: #1F2937;
  line-height: 1.5;
  flex: 1;
}

/* Input styling in tests */
.streaming-question input[type="text"],
.streaming-question textarea,
.streaming-question select,
.question-container input[type="text"],
.question-container textarea,
.question-container select {
  font-family: 'Outfit', sans-serif !important;
  font-size: 16px !important;
  padding: 12px 16px !important;
  border: 2px solid #E5E7EB !important;
  border-radius: 6px !important;
  background: #FFFFFF !important;
  color: #1F2937 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease !important;
}

.streaming-question input[type="text"]:focus,
.streaming-question textarea:focus,
.streaming-question select:focus,
.question-container input[type="text"]:focus,
.question-container textarea:focus,
.question-container select:focus {
  border-color: #0E68F1 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(14, 104, 241, 0.1) !important;
}

/* Radio button and checkbox styling */
.streaming-question input[type="radio"],
.streaming-question input[type="checkbox"],
.question-container input[type="radio"],
.question-container input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  margin-right: 10px !important;
  accent-color: #0E68F1 !important;
}

/* Multiple choice options */
.streaming-question label,
.question-container label {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  transition: background-color 0.2s ease;
}

.streaming-question label:hover,
.question-container label:hover {
  background: #F9FAFB;
}

/* Pulse animation for new questions */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* Mobile responsiveness for streaming */
@media (max-width: 768px) {
    .streaming-question {
        margin-bottom: 1rem;
        padding: 1rem;
    }

    .streaming-question .question-content label {
        padding: 0.75rem;
        margin: 0.5rem 0;
    }
}

/* Loading Button States */
.classic-xp-button.loading {
    background: repeating-linear-gradient(
        45deg,
        #FFD700,
        #FFD700 4px,
        #FF9F1C 4px,
        #FF9F1C 8px
    ) !important;
    animation: loadingPulse 1s ease-in-out infinite !important;
    cursor: wait !important;
}

@keyframes loadingPulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* Disabled button state */
.classic-xp-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.classic-xp-button:disabled:hover {
    background: #C0C0C0 !important;
    transform: none !important;
}

/* Add this to your styles.css file */

/* User status bar responsiveness */
@media (max-width: 768px) {
    .user-status-bar {
        flex-direction: column !important;
        gap: 8px !important;
        text-align: center !important;
    }

    .user-status-bar > div {
        flex-direction: column !important;
        gap: 4px !important;
    }
}

/* Upgrade modal responsiveness */
#upgradeModal > div {
    margin: 10px !important;
    max-width: 90% !important;
}

@media (max-width: 480px) {
    #upgradeModal > div {
        margin: 5px !important;
        padding: 15px !important;
    }
}

/* Premium badge styles */
.premium-indicator {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 8px;
    font-weight: bold;
    text-shadow: none;
}

.free-indicator {
    background: #6c757d;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 8px;
    font-weight: bold;
}

/* Clean input styling for forms */
.winxp-input::placeholder,
.winxp-select::placeholder {
  color: #6b7280 !important;
  opacity: 1 !important;
  font-size: 12px !important;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  font-weight: 400 !important;
}

.winxp-input:focus::placeholder {
  opacity: 0.6 !important;
}
/* Clean form labels */
.form-label-clean {
  font-family: Outfit, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  margin-bottom: 6px;
  display: block;
}

/* Helper text styling */
.helper-text {
  font-family: Outfit, sans-serif;
  font-size: 10px;
  color: #888;
  margin-top: 4px;
}

/* Clean link styling */
.clean-link {
  font-family: Outfit, sans-serif;
  color: #0066CC;
  text-decoration: none;
  font-size: 11px;
}

.clean-link:hover {
  color: #004499;
  text-decoration: underline;
}

#saved-tests-container {
  background: #ECE9D8 !important;
}

.winxp-window {
  background: #ECE9D8 !important;
}

.winxp-window > div:not(.winxp-titlebar) {
  background: #ECE9D8 !important;
}

/* Desktop/Mobile visibility utilities */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }
}

/* Compact status badge */
.status-badge-compact {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #ECE9D8;
    border: 2px outset #C0C0C0;
    padding: 4px 8px;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    box-shadow: 1px 1px 0 #333;
}

.badge-premium {
    color: #FFD700;
    text-shadow: 1px 1px 0 #000;
}

.badge-free {
    color: #666;
}

.badge-text {
    color: #000;
    font-size: 7px;
}

@media (max-width: 768px) {
    .status-badge-compact {
        padding: 3px 6px;
        font-size: 7px;
    }

    .badge-text {
        font-size: 6px;
    }
}

/* Mobile hamburger menu */
.hamburger-btn {
    background: #ECE9D8;
    border: 2px outset #C0C0C0;
    width: 32px;
    height: 32px;
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    cursor: pointer;
    position: relative;
    box-shadow: 1px 1px 0 #333;
}

.hamburger-btn:hover {
    background: #F0F0F0;
}

.hamburger-btn:active {
    border: 2px inset #C0C0C0;
}

.mobile-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ECE9D8;
    border: 2px outset #C0C0C0;
    box-shadow: 4px 4px 0 #333;
    min-width: 120px;
    z-index: 1000;
    margin-top: 4px;
}

.mobile-menu-item {
    display: block;
    padding: 8px 12px;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    color: #000;
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.mobile-menu-item:hover {
    background: #C0C0C0;
}

.mobile-menu-item:active {
    background: #A0A0A0;
}

/* Fix modal layering - add or update these z-index values */
.mobile-menu-dropdown {
    z-index: 1000 !important;
}

/* Update existing modal z-index */
.winxp-window {
    z-index: 100;
}

/* Pricing and account modals should be higher */
.pricing-modal, .account-modal, .upgrade-modal {
    z-index: 2000 !important;
}

/* User auth buttons should be lower than modals */
#user-auth {
    z-index: 50;
}

/* Mobile menu should be highest in header area */
#mobile-menu {
    z-index: 1000;
}

/* Show/hide text based on screen size */
.desktop-text {
    display: inline;
}

.mobile-text {
    display: none;
}

@media (max-width: 768px) {
    .desktop-text {
        display: none;
    }

    .mobile-text {
        display: inline;
    }

    /* Make mobile buttons more compact */
    .classic-xp-button {
        padding: 6px 8px !important;
        font-size: 12px !important;
        min-width: auto !important;
    }

    /* Hide the lucide icons on mobile, keep only emoji */
    #user-auth .classic-xp-button i {
        display: none;
    }
}

/* Clean status bar */
.clean-status-bar {
    background: #F0F0F0;
    border-bottom: 1px solid #C0C0C0;
    padding: 6px 12px;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
}

.status-indicator {
    font-weight: bold;
}

.status-indicator.premium {
    color: #28a745;
}

.status-indicator.free {
    color: #495057;
}

@media (max-width: 768px) {
    .clean-status-bar {
        padding: 4px 8px;
        font-size: 9px;
    }
}

@media (max-width: 768px) {
    /* Update the auth button container */
    #user-auth {
        position: fixed !important;
        top: 1rem !important;
        right: 1rem !important;
        flex-direction: row !important;
        gap: 0.25rem !important;
        z-index: 60;
    }

    /* Make buttons more compact */
    #user-auth .classic-xp-button {
        font-size: 10px !important;
        padding: 6px 8px !important;
        min-width: auto !important;
        white-space: nowrap;
    }
}

/* FORM SECTION SEPARATORS */
.form-section {
  position: relative;
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.form-section:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #C0C0C0 20%, #C0C0C0 80%, transparent 100%);
}

/* FIX TAB CONTENT SPACING ISSUE */
.tab-content {
  display: none;
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.tab-content.active {
  display: block;
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Ensure consistent spacing for all tab content containers */
#test-form {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#test-form .space-y-4 > .tab-content:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* FIX: Make window content same width as titlebar */
.daily-limit-modal {
    background: transparent; /* Remove background here */
    border: none; /* Remove border here */
    border-radius: 0;
    max-width: 360px;
    width: 90%;
    margin: 20px;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
    /* Remove box-shadow from here */
}

/* WinXP Titlebar for modal */
.modal-titlebar {
    background: linear-gradient(180deg, #0E68F1 0%, #1961DD 50%, #026AFE 100%);
    box-shadow: inset 0px 1.8px 1.2px #3291FF;
    border-radius: 8px 8px 0 0;
    height: 30px;
    padding: 2px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    position: relative;
    border: 1px solid #0A246A;
    border-bottom: none;
}

/* Modal content - SAME width as titlebar */
.modal-content {
    padding: 16px;
    background: #ECE9D8;
    border: 1px solid #0A246A;
    border-top: none; /* Connect to titlebar */
    border-radius: 0 0 8px 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3), 8px 8px 0px #444;
    image-rendering: pixelated;
}

.modal-title-icon {
    font-size: 12px;
}

.modal-title-text {
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    font-weight: normal;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.modal-window-controls {
    display: flex;
    gap: 1px;
}

.modal-control-btn {
    background: #c0c0c0;
    border: 2px outset #fff;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    color: black;
    cursor: pointer;
    image-rendering: pixelated;
    box-shadow: inset -1px -1px 0 #808080;
    transition: transform 0.1s ease;
    width: 18px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-control-btn:hover {
    background: #e0e0e0;
    transform: scale(1.02);
}

.modal-control-btn:active {
    background: #a0a0a0;
    border-style: inset;
    transform: scale(0.98);
}

.modal-control-btn.close-btn {
    background: #C24F3D;
    color: white;
    border: 2px outset #C24F3D;
}

.modal-control-btn.close-btn:hover {
    background: #B33C2C;
}

.modal-control-btn.close-btn:active {
    background: #A32B1B;
}

/* Modal content - smaller and more compact */
.modal-content {
    padding: 16px;
    background: #ECE9D8;
}

.limit-info {
    text-align: center;
    margin-bottom: 12px;
}

.limit-stats {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
    margin-bottom: 6px;
}

.used-count {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #EF4444;
}

.limit-separator {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    color: #9CA3AF;
}

.total-count {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #6B7280;
}

.limit-label {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    color: #6B7280;
    margin-left: 6px;
}

.reset-info {
    background: #F3F4F6;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 16px;
    text-align: center;
}

.reset-info p {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    color: #6B7280;
    margin: 0;
    line-height: 1.3;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-button {
    border: none;
    border-radius: 4px;
    padding: 10px 12px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.modal-button:hover {
    transform: translateY(-1px);
}

.watch-ad-btn {
    background: #8B5CF6;
    color: white;
    border: 1px solid #8B5CF6;
}

.watch-ad-btn:hover {
    background: #7C3AED;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.upgrade-btn {
    background: #10B981;
    color: white;
    border: 1px solid #10B981;
}

.upgrade-btn:hover {
    background: #059669;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.cancel-btn {
    background: #F9FAFB;
    color: #6B7280;
    border: 1px solid #E5E7EB;
    padding: 8px 12px;
    font-size: 11px;
}

.cancel-btn:hover {
    background: #F3F4F6;
    color: #374151;
}

.button-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.button-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.button-text strong {
    font-size: 12px;
    font-weight: 600;
}

.button-text small {
    font-size: 10px;
    opacity: 0.8;
    font-weight: 400;
    margin-top: 1px;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .daily-limit-modal {
        width: 95%;
        margin: 10px;
        max-width: 320px;
    }

    .modal-content {
        padding: 14px;
    }

    .used-count, .total-count {
        font-size: 18px;
    }

    .limit-separator {
        font-size: 14px;
    }

    .modal-button {
        padding: 9px 10px;
    }

    .button-text strong {
        font-size: 11px;
    }

    .button-text small {
        font-size: 9px;
    }

    .reset-info p {
        font-size: 11px;
    }
}

.action-button-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.button-group {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.primary-actions .classic-xp-button {
  background: #0E68F1;
  color: white;
}

.secondary-actions .classic-xp-button {
  background: #6B7280;
  color: white;
}

.close-actions .classic-xp-button {
  background: #EF4444;
  color: white;
}

/* Bigger input text in test fields */
.streaming-question input[type="text"],
.streaming-question textarea,
.streaming-question select {
    font-size: 16px !important;
    padding: 12px !important;
    font-family: 'Outfit', sans-serif !important;
}

/* For mobile, make it even bigger */
@media (max-width: 768px) {
    .streaming-question input[type="text"],
    .streaming-question textarea,
    .streaming-question select {
        font-size: 18px !important;
        padding: 14px !important;
    }
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    40% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

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

@keyframes bounce {
  0%, 80%, 100% {
      transform: translateY(0);
      opacity: 0.5;
  }
  40% {
      transform: translateY(-6px);
      opacity: 1;
  }
}

@keyframes expandBar {
  from { width: 0%; }
  to { width: var(--final-width); }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

/* ADMIN THEME CONSISTENCY */
.admin-container {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Outfit', sans-serif;
}

.admin-table th {
    background: #F9FAFB;
    color: #374151;
    font-weight: 600;
    font-size: 14px;
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
}

.admin-table td {
    padding: 12px;
    border-bottom: 1px solid #F3F4F6;
    font-size: 14px;
    color: #6B7280;
}

.admin-table tr:hover {
    background: #F9FAFB;
}

.admin-button {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.admin-button.primary {
    background: #3B82F6;
    color: white;
}

.admin-button.primary:hover {
    background: #2563EB;
}

.admin-button.secondary {
    background: #F3F4F6;
    color: #374151;
}

.admin-button.secondary:hover {
    background: #E5E7EB;
}

.admin-button.danger {
    background: #EF4444;
    color: white;
}

.admin-button.danger:hover {
    background: #DC2626;
}

