/* TOEFL iBT Mock Test Styles */

:root {
  /* TOEFL Official Colors */
  --toefl-blue: hsl(208, 75%, 25%);
  --toefl-orange: hsl(25, 100%, 55%);
  --toefl-light-blue: hsl(208, 75%, 95%);
  --toefl-light-orange: hsl(25, 100%, 95%);
  
  /* Base Colors */
  --background: hsl(210, 40%, 98%);
  --foreground: hsl(222.2, 84%, 4.9%);
  --card-background: hsl(0, 0%, 100%);
  --border: hsl(214.3, 31.8%, 91.4%);
  
  /* Primary Colors (TOEFL Blue) */
  --primary: var(--toefl-blue);
  --primary-foreground: hsl(210, 40%, 98%);
  
  /* Accent Colors (TOEFL Orange) */
  --accent: var(--toefl-orange);
  --accent-foreground: hsl(210, 40%, 98%);
  
  /* Semantic Colors */
  --success: hsl(142, 76%, 36%);
  --warning: hsl(38, 92%, 50%);
  --error: hsl(0, 84.2%, 60.2%);
  
  /* Text Colors */
  --text-muted: hsl(215.4, 16.3%, 46.9%);
  --text-light: hsl(210, 40%, 96%);
  
  /* Font Variables */
  --font-family: 'Inter', system-ui, sans-serif;
  
  /* Spacing */
  --radius: 0.75rem;
  --container-width: 1200px;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1rem; }

.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
  background: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: hsl(208, 75%, 20%);
  border-color: hsl(208, 75%, 20%);
}

.btn-accent {
  background-color: var(--accent);
  color: var(--accent-foreground);
  border-color: var(--accent);
}

.btn-accent:hover {
  background-color: hsl(25, 100%, 50%);
  border-color: hsl(25, 100%, 50%);
}

.btn-outline {
  background-color: transparent;
  color: var(--foreground);
  border-color: var(--border);
}

.btn-outline:hover {
  background-color: var(--text-light);
  border-color: var(--primary);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn i {
  font-size: 0.875rem;
}

/* Cards */
.card {
  background-color: var(--card-background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.card-header h2,
.card-header h3 {
  margin-bottom: 0.25rem;
}

.card-content {
  padding: 1.5rem;
}

.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Header */
.main-header {
  background-color: var(--card-background);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo h1 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0;
}

.logo i {
  margin-right: 0.5rem;
}

.main-nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--primary);
}

/* Hero Section */
.hero {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--toefl-light-blue) 0%, var(--toefl-light-orange) 100%);
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--foreground);
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.test-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 2rem;
  max-width: 600px;
  margin: 0 auto;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Integration Section */
.integration-section {
  padding: 3rem 0;
  background-color: var(--text-light);
}

.integration-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.integration-card .card {
  height: 100%;
}

.integration-icon {
  width: 3rem;
  height: 3rem;
  background-color: var(--toefl-light-blue);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.25rem;
}

.integration-icon.accent {
  background-color: var(--toefl-light-orange);
  color: var(--accent);
}

.evaluation-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Test Sections */
.test-sections {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.test-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.test-card {
  background-color: var(--card-background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.test-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.test-icon {
  width: 4rem;
  height: 4rem;
  background-color: var(--toefl-light-blue);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.5rem;
}

.test-icon.accent {
  background-color: var(--toefl-light-orange);
  color: var(--accent);
}

.test-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.test-duration {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.test-card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.test-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.detail {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.detail span:last-child {
  font-weight: 500;
  color: var(--foreground);
}

/* Full Test CTA */
.full-test-cta {
  display: flex;
  justify-content: center;
}

.cta-card {
  background-color: var(--card-background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  max-width: 600px;
}

.cta-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.cta-card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Features Section */
.features {
  padding: 4rem 0;
  background-color: var(--text-light);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature {
  text-align: center;
  padding: 2rem;
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  background-color: var(--toefl-light-blue);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.25rem;
}

.feature h3 {
  margin-bottom: 1rem;
  color: var(--foreground);
}

.feature p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Test Interface Styles */
.test-interface {
  min-height: 100vh;
  background-color: var(--text-light);
}

.test-header {
  background-color: var(--primary);
  color: var(--primary-foreground);
  padding: 1rem 0;
}

.test-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.test-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.test-info h1 {
  font-size: 1.25rem;
  margin-bottom: 0;
}

.test-badge {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--primary-foreground);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.test-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.timer-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timer {
  font-size: 1.125rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}

.timer-toggle {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--primary-foreground);
  padding: 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
}

.timer-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.timer-label {
  font-size: 0.875rem;
  color: var(--primary-foreground);
  opacity: 0.8;
}

.preparation-badge {
  background-color: var(--warning);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.progress-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.progress-bar-container {
  width: 100px;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--accent);
  transition: width 0.3s ease;
}

.word-count-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.word-count-badge {
  background-color: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-weight: 500;
}

/* Test Content */
.test-content {
  padding: 2rem 0;
}

.test-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.reading-layout {
  grid-template-columns: 1.2fr 0.8fr;
}

.passage-panel,
.instructions-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.questions-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.passage-content {
  max-height: 70vh;
  overflow-y: auto;
  padding: 1rem;
  line-height: 1.8;
  font-size: 1rem;
}

.passage-nav {
  padding: 1rem !important;
}

.passage-nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.passage-buttons {
  display: flex;
  gap: 0.5rem;
}

.passage-btn {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
}

.passage-btn.active {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.passage-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.passage-header i {
  color: var(--primary);
}

.questions-container {
  max-height: 60vh;
  overflow-y: auto;
  padding: 1rem 0;
}

.question {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.question:last-child {
  border-bottom: none;
}

.question-text {
  font-weight: 500;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.question-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.option:hover {
  background-color: var(--text-light);
  border-color: var(--primary);
}

.option input[type="radio"],
.option input[type="checkbox"] {
  margin-top: 0.25rem;
}

.option.selected {
  background-color: var(--toefl-light-blue);
  border-color: var(--primary);
}

.fill-in-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
}

.fill-in-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(33, 96, 153, 0.1);
}

.question-navigation {
  padding: 1rem;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.question-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  background-color: white;
  border-radius: var(--radius);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.question-btn:hover {
  border-color: var(--primary);
}

.question-btn.answered {
  background-color: var(--success);
  color: white;
  border-color: var(--success);
}

.question-btn.flagged {
  background-color: var(--warning);
  color: white;
  border-color: var(--warning);
}

.question-btn.current {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.nav-legend {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.legend-color.answered {
  background-color: var(--success);
}

.legend-color.flagged {
  background-color: var(--warning);
}

.legend-color.current {
  background-color: var(--primary);
}

.navigation-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  background-color: var(--text-light);
  border-radius: var(--radius);
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-left,
.nav-center,
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.answer-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.stat-item.accent {
  color: var(--accent);
}

/* Audio Player */
.audio-player {
  padding: 1rem;
  background-color: var(--text-light);
  border-radius: var(--radius);
}

.audio-player audio {
  width: 100%;
  margin-bottom: 1rem;
}

.audio-info {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.audio-subtitle {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.audio-status {
  color: var(--primary);
}

.warning-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background-color: var(--toefl-light-orange);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--accent);
  margin-top: 1rem;
}

.warning-box i {
  color: var(--accent);
}

/* Notes Area */
#notesArea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  resize: vertical;
  min-height: 200px;
}

#notesArea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Speaking Layout */
.speaking-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.task-overview .card-header {
  background-color: var(--toefl-light-blue);
}

.task-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.task-header i {
  color: var(--primary);
  font-size: 1.5rem;
}

.preparation-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background-color: var(--toefl-light-orange);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--accent);
  margin-top: 1rem;
}

.task-content {
  padding: 1.5rem;
  background-color: var(--text-light);
  border-radius: var(--radius);
  font-size: 1.1rem;
  line-height: 1.6;
}

.recording-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.recording-tips h4,
.assessment-options h4 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.recording-tips ul {
  list-style: none;
  padding: 0;
}

.recording-tips li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.recording-tips li:before {
  content: "✓";
  color: var(--success);
  font-weight: bold;
  margin-right: 0.5rem;
}

.assessment-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.recording-controls {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: var(--text-light);
  border-radius: var(--radius);
  text-align: center;
}

.recording-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.recording-status.recording {
  color: var(--error);
  animation: pulse 1.5s infinite;
}

.recording-status.recording i {
  color: var(--error);
}

.recording-status.ready {
  color: var(--success);
}

.recording-status.ready i {
  color: var(--success);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.recording-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.recording-btn {
  min-width: 140px;
}

.audio-player-container {
  margin: 1.5rem 0;
  padding: 1rem;
  background-color: var(--card-background);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.audio-player-container audio {
  width: 100%;
}

.recording-info {
  margin-top: 1rem;
}

.browser-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.permission-note {
  font-size: 0.875rem;
  color: var(--warning);
  background-color: var(--toefl-light-orange);
  padding: 0.75rem;
  border-radius: var(--radius);
  margin: 0;
}

.navigation-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.task-info {
  display: flex;
  gap: 1rem;
}

.info-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.info-badge.warning {
  background-color: var(--warning);
  color: white;
}

.nav-buttons {
  display: flex;
  gap: 1rem;
}

/* Academic Discussion Styles */
.discussion-context {
  margin-bottom: 2rem;
}

.professor-post {
  background: linear-gradient(135deg, var(--primary) 0%, hsl(208, 75%, 35%) 100%);
  color: var(--primary-foreground);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.student-post {
  background-color: var(--text-light);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.post-header strong {
  color: var(--foreground);
}

.professor-post .post-header strong {
  color: var(--primary-foreground);
}

.post-content {
  line-height: 1.6;
  font-size: 1rem;
}

.post-content p {
  margin-bottom: 1rem;
}

.post-content p:last-child {
  margin-bottom: 0;
}

.student-responses {
  margin: 2rem 0;
}

.student-responses h4 {
  color: var(--primary);
  margin-bottom: 1rem;
}

/* Writing Layout */
.writing-tabs {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tab-nav {
  display: flex;
  border-bottom: 1px solid var(--border);
  background-color: var(--card-background);
  border-radius: var(--radius) var(--radius) 0 0;
}

.tab-btn {
  flex: 1;
  padding: 1rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--primary);
  background-color: var(--text-light);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background-color: var(--card-background);
}

.tab-content {
  display: none;
  background-color: var(--card-background);
  border-radius: 0 0 var(--radius) var(--radius);
}

.tab-content.active {
  display: block;
}

.task-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem;
}

.task-instructions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.writing-area {
  display: flex;
  flex-direction: column;
}

.writing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.word-counter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.word-count {
  font-weight: 600;
  color: var(--primary);
}

.word-status {
  color: var(--text-muted);
}

.word-status.success {
  color: var(--success);
}

.word-status.warning {
  color: var(--warning);
}

.writing-textarea {
  width: 100%;
  min-height: 400px;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  resize: vertical;
}

.writing-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(33, 96, 153, 0.1);
}

.reading-passage {
  margin-bottom: 2rem;
}

.passage-text {
  padding: 1.5rem;
  background-color: var(--text-light);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  line-height: 1.8;
}

.passage-text p {
  margin-bottom: 1rem;
}

.passage-text p:last-child {
  margin-bottom: 0;
}

.audio-section {
  margin-bottom: 2rem;
}

.audio-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.task-prompt {
  padding: 1.5rem;
  background-color: var(--toefl-light-blue);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
}

.task-prompt h4 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.essay-question {
  padding: 1.5rem;
  background-color: var(--text-light);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.question-text {
  font-size: 1.1rem;
  font-weight: 500;
  font-style: italic;
  color: var(--primary);
  padding: 1rem;
  background-color: var(--card-background);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  margin: 1rem 0;
}

.task-tip {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background-color: var(--toefl-light-blue);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--primary);
  margin-top: 1rem;
}

.task-tip.success {
  background-color: hsl(142, 76%, 96%);
  border-color: var(--success);
  color: var(--success);
}

.task-tip i {
  margin-top: 0.125rem;
}

.actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background-color: var(--text-light);
  border-top: 1px solid var(--border);
  gap: 2rem;
  flex-wrap: wrap;
}

.action-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.action-buttons {
  display: flex;
  gap: 1rem;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background-color: var(--card-background);
  border-radius: var(--radius);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content.large {
  max-width: 800px;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
  color: var(--primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius);
}

.modal-close:hover {
  background-color: var(--text-light);
  color: var(--foreground);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.score-display {
  text-align: center;
  margin: 1.5rem 0;
}

.score-badge {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0 0.5rem;
}

.score-badge.accent {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.word-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--text-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin: 0 0.25rem;
}

.word-summary {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.performance-summary {
  margin: 1rem 0;
}

.performance-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.performance-item:last-child {
  border-bottom: none;
}

.modal-nav {
  display: flex;
  gap: 1rem;
}

.assessment-reminder,
.evaluation-reminder {
  padding: 1rem;
  background-color: var(--toefl-light-orange);
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-top: 1rem;
}

.assessment-reminder a,
.evaluation-reminder a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.assessment-reminder a:hover,
.evaluation-reminder a:hover {
  text-decoration: underline;
}

/* Results Page */
.results-page {
  padding: 2rem 0;
  min-height: calc(100vh - 200px);
}

.results-container {
  max-width: 1000px;
  margin: 0 auto;
}

.results-header {
  text-align: center;
  margin-bottom: 3rem;
}

.results-header h1 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.results-header p {
  font-size: 1.125rem;
  color: var(--text-muted);
}

.overall-score-card {
  margin-bottom: 3rem;
}

.overall-score-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.overall-score-icon i {
  font-size: 3rem;
  color: var(--accent);
}

.total-score-display {
  font-size: 4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.score-breakdown {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.proficiency-level {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  padding: 0.5rem 1rem;
  background-color: var(--toefl-light-orange);
  border-radius: var(--radius);
  display: inline-block;
}

.evaluation-reminder-card {
  margin-bottom: 3rem;
}

.evaluation-reminder-card .card-header {
  background-color: var(--toefl-light-orange);
  color: var(--accent);
}

.evaluation-reminder-card i {
  color: var(--accent);
  margin-right: 0.5rem;
}

.section-results {
  margin-bottom: 3rem;
}

.section-results h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--primary);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.result-card .card {
  height: 100%;
}

.section-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.section-icon.reading {
  background-color: var(--toefl-light-blue);
  color: var(--primary);
}

.section-icon.listening {
  background-color: var(--toefl-light-orange);
  color: var(--accent);
}

.section-icon.speaking {
  background-color: var(--toefl-light-blue);
  color: var(--primary);
}

.section-icon.writing {
  background-color: var(--toefl-light-orange);
  color: var(--accent);
}

.section-details h3 {
  margin-bottom: 0.25rem;
}

.section-status {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.completion-badge {
  background-color: var(--success);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.score-row:last-child {
  border-bottom: none;
}

.score-value,
.correct-count {
  font-weight: 600;
  color: var(--primary);
}

.time-spent {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}

.not-started-content {
  text-align: center;
  padding: 2rem 1rem;
}

.not-started-content p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.writing-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 1.5rem;
}

.word-stat {
  text-align: center;
}

.word-stat .word-count {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
}

.word-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.download-btn {
  width: 100%;
  margin-bottom: 1rem;
}

.assessment-options {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.task-completion {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.results-actions {
  text-align: center;
  margin-bottom: 3rem;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.practice-section {
  margin-bottom: 2rem;
}

/* Footer */
.main-footer {
  background-color: var(--foreground);
  color: var(--text-light);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--primary-foreground);
  margin-bottom: 1rem;
}

.footer-section p {
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary-foreground);
}

.footer-note {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .test-layout {
    grid-template-columns: 1fr;
  }
  
  .reading-layout {
    grid-template-columns: 1fr;
  }
  
  .task-layout {
    grid-template-columns: 1fr;
  }
  
  .recording-layout {
    grid-template-columns: 1fr;
  }
  
  .navigation-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .nav-left,
  .nav-center,
  .nav-right {
    justify-content: center;
  }
  
  .test-header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .test-controls {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }
  
  .timer-container {
    justify-content: center;
  }
  
  .progress-info {
    justify-content: center;
  }
  
  .actions-bar {
    flex-direction: column;
    gap: 1rem;
  }
  
  .action-stats {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .evaluation-buttons {
    flex-direction: column;
  }
  
  .assessment-buttons {
    flex-direction: column;
  }
  
  .modal-footer {
    flex-direction: column;
  }
  
  .modal-nav {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .hero {
    padding: 2rem 0;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .test-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .test-grid {
    grid-template-columns: 1fr;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .results-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}