html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

body {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Reusable blue-to-violet gradient — matches .modal-header */
.avedo-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.app-content {
    flex: 1 1 auto; /* fill space between header and footer */
    display: flex; /* allow main to stretch */
}

.app-main {
    flex: 1 1 auto; /* main fills available height */
    min-height: 0; /* important: prevents flex overflow issues */
}

.footer {
    position: static;
    width: 100%;
    white-space: nowrap;
    line-height: 60px;
    flex: 0 0 auto;
}

.text-grey {
    color: #575757;
}



/*Assessment */
@keyframes fadeInRise {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#testContent.animate-in {
    animation: fadeInRise .35s ease-out;
}

/* Custom styles for Speech Learning App */
.feature-icon {
  margin-bottom: 1rem;
}

/* Blinking indication for required (unique) name input not yet valid */
@keyframes lt-blink-border {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220,53,69,0);
        border-color: #dc3545;
    }

    50% {
        box-shadow: 0 0 0 .25rem rgba(220,53,69,.35);
        border-color: #ff6b6b;
    }
}

.blink-pending {
    animation: lt-blink-border 1.2s ease-in-out infinite;
}
/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .blink-pending {
        animation: none;
    }
}

/* Username shake feedback (moved from Quiz.cshtml) */
@keyframes lt-shake {
    0%, 100% {
        transform: translateX(0);
    }

    15%, 45%, 75% {
        transform: translateX(-6px);
    }

    30%, 60%, 90% {
        transform: translateX(6px);
    }
}

/* Limit shake animation helper classes (added) */
.shake-once {
    animation-name: lt-shake;
    animation-duration: .6s;
    animation-timing-function: ease;
    animation-iteration-count: 1;
}

.shake-limited {
    animation-name: lt-shake;
    animation-duration: .6s;
    animation-timing-function: ease;
    animation-iteration-count: 3; /* exactly 3 shakes */
}

/* (unchanged existing @keyframes lt-shake remains above) */

/* (Optional) reduce-motion respect */
@media (prefers-reduced-motion: reduce) {
    .shake-once {
        animation: none;
    }
}

.score-card {
  padding: 1.5rem;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 1rem;
  transition: transform 0.2s;
}

.score-card:hover {
  transform: translateY(-2px);
}

.score-value {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.score-label {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.score-category {
  font-size: 0.8rem;
  opacity: 0.8;
}

.score-excellent {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
}

.score-good {
  background: linear-gradient(135deg, #cce7ff, #b3d9ff);
  color: #004085;
}

.score-average {
  background: linear-gradient(135deg, #fff3cd, #ffe69c);
  color: #856404;
}

.score-needs-improvement {
  background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
  color: #8b4513;
}

.score-poor {
  background: linear-gradient(135deg, #f8d7da, #f1b0b7);
  color: #721c24;
}

.recording-section {
  margin: 1rem 0;
}

.recording-status {
  padding: 0.5rem;
  border-radius: 5px;
  margin-top: 0.5rem;
}

.recording-active {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ef5350;
}

.recording-inactive {
  background-color: #e8f5e8;
  color: #2e7d32;
  border: 1px solid #66bb6a;
}

.pulse {
  animation: pulse 1s infinite;
}

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

.navbar-brand {
  font-weight: bold;
}

.card {
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
}

.table th {
  background-color: #f8f9fa;
  border-top: none;
}

.badge {
  font-size: 0.8rem;
}

/* Quiz Page Styles */
.quiz-container {
  margin-top: 2rem;
}

.hero-section {
  padding: 3rem 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 15px;
  margin-bottom: 3rem;
}

.hero-features .badge {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  margin: 0.25rem;
}

.feature-card {
  transition: all 0.3s ease;
  background-color: #f8f9fa;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.advantage-card {
  transition: all 0.3s ease;
  background-color: #ffffff;
}

.advantage-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.test-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

.test-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.quiz-progress .progress {
  height: 8px;
  border-radius: 4px;
}

.question-container {
  padding: 1rem 0;
}

.answers .form-check {
  padding: 1.25rem;  /* Increased padding to make form-check bigger */
  border: 1px solid #dee2e6;
  border-radius: 5px;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 60px;  /* Minimum height for larger clickable area */
}

.answers .form-check:hover {
  background-color: #f8f9fa;
  border-color: #007bff;
}

.answers .form-check-input {
  position: absolute;
  left: 1.25rem;  /* Move radio button to the left */
  top: 50%;
  transform: translateY(-50%);
  margin: 0;  /* Remove default margin */
}

.answers .form-check-label {
  flex: 1;
  padding-left: 3rem;  /* Add space for the radio button */
  cursor: pointer;
  margin: 0;  /* Remove default margin */
  display: flex;
  align-items: center;
  min-height: 2rem;
}

.answers .form-check-input:checked + .form-check-label {
  color: #007bff;
  font-weight: 500;
}

.feedback-container {
  padding: 2rem;
}

.feedback-icon {
  animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.results-container {
  padding: 1rem;
}

.stat-card {
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.recommendation-card {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border: none;
}

.detailed-results {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 5px;
  padding: 1rem;
}

/* Level-specific colors */
.level-a1 { color: #28a745; }
.level-a2 { color: #17a2b8; }
.level-b1 { color: #007bff; }
.level-b2 { color: #ffc107; }
.level-c1 { color: #dc3545; }
.level-c2 { color: #343a40; }

/* Accordion customization */
.accordion-button:not(.collapsed) {
  background-color: #e7f3ff;
  color: #0c63e4;
}

.accordion-button:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Modal customization */
.modal-lg {
  max-width: 800px;
}

.modal-content {
  border: none;
  border-radius: 15px;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 15px 15px 0 0;
}

.modal-header .btn-close {
  filter: invert(1);
}

/* Responsive design */
@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 1rem;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .hero-features .badge {
    display: block;
    margin: 0.5rem 0;
  }
  
  .quiz-container {
    margin-top: 1rem;
  }
}

/* Level Selection Modal Styles */
.level-btn {
  padding: 1rem;
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  height: auto;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.level-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.level-btn strong {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.level-btn small {
  font-size: 0.85rem;
  opacity: 0.8;
}

.level-btn[data-level="auto"] {
  background: linear-gradient(45deg, #007bff, #6c757d);
  color: white;
  border-color: #007bff;
}

.level-btn[data-level="auto"]:hover {
  background: linear-gradient(45deg, #0056b3, #545b62);
  color: white;
}

:root {
    --avedo-accent: #5eaadb;
    --avedo-orange: #ff5a10;
    --avedo-gray-900: #1f2937;
    --avedo-gray-700: #4b5563;
    --avedo-gray-200: #e5e7eb;
    --avedo-bg: #f7fafc;
    /* Gradient palette — matches .avedo-gradient and .modal-header */
    --avedo-grad-blue: rgba(102, 126, 234, 1);
    --avedo-grad-violet: rgba(118, 75, 162, 1);
}

.avedo-page {
    background: radial-gradient(ellipse 65% 40% at 8% 0%, rgba(102, 126, 234, 0.16) 0%, transparent 70%), radial-gradient(ellipse 55% 45% at 92% 100%, rgba(118, 75, 162, 0.13) 0%, transparent 70%), var(--avedo-bg);
    min-height: 100%;
}

/* Landing / intro page (Index) — steeper violet corner */
.avedo-page-intro {
    background: radial-gradient(ellipse 80% 55% at 0% 0%, rgba(102, 126, 234, 0.22) 0%, transparent 65%), radial-gradient(ellipse 80% 65% at 105% 105%, rgba(118, 75, 162, 0.38) 0%, transparent 55%), var(--avedo-bg);
    border-radius: 0.75rem;
    min-height: 100%;
}

.avedo-title {
    color: var(--avedo-gray-900);
}

.avedo-accent-blue {
  color: var(--avedo-accent);
}

.avedo-accent-orange {
  color: var(--avedo-orange);
}

.avedo-card {
  border: 1px solid rgba(17, 24, 39, 0.10);
  border-radius: 16px;
}

.avedo-card-header {
  background: linear-gradient(90deg, var(--avedo-accent), #4c9ed3);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.avedo-badge {
  background: rgba(94, 170, 219, 0.16);
  color: #155a7a;
  border: 1px solid rgba(94, 170, 219, 0.28);
}

.avedo-btn-primary {
  background-color: var(--avedo-accent);
  border-color: var(--avedo-accent);
  color: #ffffff;
}

.avedo-btn-primary:hover,
.avedo-btn-primary:focus {
  background-color: #4c9ed3;
  border-color: #4c9ed3;
  color: #ffffff;
}

.avedo-btn-secondary {
  background-color: #ffffff;
  border-color: rgba(17, 24, 39, 0.18);
  color: var(--avedo-gray-900);
}

.avedo-btn-secondary:hover,
.avedo-btn-secondary:focus {
  background-color: #f8fafc;
  border-color: rgba(17, 24, 39, 0.26);
  color: var(--avedo-gray-900);
}

.avedo-progress {
  background-color: #eef2f7;
}

.avedo-progress > .progress-bar {
  background-color: var(--avedo-accent);
}

.avedo-step-number {
  width: 52px;
  height: 52px;
  line-height: 52px;
  font-weight: 700;
  background: var(--avedo-accent);
  color: #ffffff;
}

.avedo-alert {
    padding: 1rem;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.10);
    /*border-left: 6px solid var(--avedo-accent);*/
    border-radius: 16px;
    color: var(--avedo-gray-900);
}

.avedo-alert--orange {
  border-left-color: var(--avedo-orange);
}

.avedo-result-header {
  background: linear-gradient(90deg, var(--avedo-accent), #4c9ed3);
  color: #ffffff;
}
