/* ==========================
   RESET & BASE
========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background: #f4f5f7;
  color: #1f2937;
  -webkit-font-smoothing: antialiased;
}

/* ==========================
   APP CONTAINER
========================== */
.app {
  max-width: 1200px;
  margin: auto;
  padding: 40px 20px;
}

/* ==========================
   HEADER
========================== */
#main-header {
  text-align: center;
  margin-bottom: 45px;
}

#main-header h1 {
  font-size: 2.7rem;
  font-weight: 700;
  color: #111827;
}

.subtitle {
  margin-top: 10px;
  color: #6b7280;
  font-size: 1.05rem;
}

.ielts {
  color: #dc2626;
}

/* ==========================
   LAYOUT
========================== */
.content {
  display: flex;
  gap: 30px;
  align-items: stretch; /* Ensures both columns match in height */
}

/* Width ratios: Task Card is 2x wider than Timer Section */
.task-card {
  flex: 2;
  background: white;
  border-radius: 16px;
  padding: 40px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.timer-section {
  flex: 1;
  background: white;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  padding: 30px;
  position: sticky;
  top: 30px;
  text-align: center;
}

/* ==========================
   TASK CARD
========================= */
.card-heading {
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 25px;
}

.prompt-title {
  font-size: 2rem;
  line-height: 1.4;
  margin-bottom: 30px;
  color: #111827;
}

.prompt-details {
  color: #4b5563;
  font-size: 1.1rem;
  margin-bottom: 15px;
}

.cue-points {
  margin-left: 25px;
  margin-bottom: 30px;
  line-height: 2;
  color: #374151;
  font-size: 1.08rem;
}

.ending-prompt {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
}

#note {
  font-size: smaller;
}

/* ==========================
   TIMER PANEL & STATUS
========================== */
#timer-label {
  color: #6b7280;
  font-size: 1rem;
  margin-bottom: 15px;
}

#timer {
  font-size: 4rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 30px;
}

.status-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-weight: 600;
  color: #374151;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* States */
.ready {
  background: #22c55e;
}
.preparing {
  background: #f59e0b;
}
.speaking {
  background: #ef4444;
}
.finished {
  background: #3b82f6;
}

/* Pulse animation for recording */
@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

.recording-pulse {
  animation: pulse 1.5s infinite;
  background-color: #ef4444 !important;
}

/* ==========================
   PLAYBACK CONTAINER
========================== */
#playback-container {
  display: none;
  margin: 20px 0;
  text-align: left;
}

.playback-label {
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #374151;
}

#audio-playback {
  width: 100%;
}

/* ==========================
   BUTTONS
========================== */
button {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.1s ease;
}

button:not(:disabled):hover {
  transform: translateY(-2px);
}
button:not(:disabled):active {
  transform: translateY(0);
}

#start-btn {
  background: #111827;
  color: white;
}

#start-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

#next-btn {
  margin-top: 15px;
  background: #dc2626;
  color: white;
  display: none;
}

/* ==========================
   RESPONSIVE LAYOUT
========================== */
@media (max-width: 900px) {
  .content {
    flex-direction: column;
  }
  .task-card,
  .timer-section {
    width: 100%;
  }
  .timer-section {
    position: static;
  }
}
