/* General Styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: black; /* Black background for the entire page */
  color: white; /* Default text color */
}

/* Top Section */
.top-section {
  background-image: url('kids-background.jpg'); /* Add a kid-friendly image */
  background-size: cover;
  color: white; /* Black font color for welcome and instruction */
  text-align: center;
  padding: 20px;
}

/* Main Content */
.main-content {
  display: flex;
  padding: 20px;
}

/* Input Section */
.input-section {
  flex: 1;
  background-color: #f0f0f0; /* Light grey background */
  padding: 20px;
  border-radius: 10px;
  margin-right: 10px;
  border-right: 2px dotted #ccc; /* Dotted line separator */
  color: #333; /* Dark text for better readability */
}

.input-section textarea,
.input-section input {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: white; /* White input fields */
  color: #333; /* Dark text in input fields */
}

.input-section button {
  padding: 10px 20px;
  background-color: #2196f3;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 10px;
}

.input-section button:hover {
  background-color: #1976d2;
}

/* CSV Buttons */
.csv-buttons {
  margin-top: 20px;
}

.csv-buttons h3 {
  margin-bottom: 10px;
  color: #333; /* Dark text for headings */
}

.csv-button {
  display: block;
  width: 100%;
  padding: 10px;
  margin-bottom: 5px;
  background-color: #ddd; /* Light grey buttons */
  color: #333; /* Dark text */
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.csv-button:hover {
  background-color: #ccc; /* Slightly darker on hover */
}

/* Output Section */
.output-section {
  flex: 1;
  background-color: #F8F4E1; /* Light grey background */
  padding: 20px;
  border-radius: 10px;
  color: #333; /* Dark text for better readability */
}

#wordList {
  list-style-type: none;
  padding: 0;
}

#wordList li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #ccc;
  color: #333; /* Dark text for list items */
}

#wordList li:last-child {
  border-bottom: none;
}

.speaker-icon {
  cursor: pointer;
  width: 20px;
  height: 20px;
}

#autoDictation {
  padding: 10px 20px;
  background-color: #ff9800;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 20px;
}

#autoDictation:hover {
  background-color: #f57c00;
}

#stopDictation {
  padding: 10px 20px;
  background-color: #ff4444; /* Red background */
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 20px;
  margin-left: 0px; /* Add some space between the buttons */
}

#stopDictation:hover {
  background-color: #cc0000; /* Darker red on hover */
}

/* Loading Spinner */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  background-color: #ddd; /* Light grey background */
  color: #333; /* Dark text */
  border-radius: 5px;
  margin-top: 10px;
}

/* Word Counter */
#wordCount {
  color: #333; /* Dark text for word counter */
}


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

/* Current word highlighting */
.current-word {
  background-color: #4682B4; /* Steel blue background */
  color: white !important;
  font-weight: bold;
  border-radius: 5px;
  padding: 5px !important;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  position: relative;
  animation: pulse 1s infinite;
}

/* Pulse animation for current word */
@keyframes pulse {
  0% {
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 10px rgba(70, 130, 180, 0.8);
  }
  100% {
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  }
}

/* Speaker icon in current word */
.current-word .speaker-icon {
  filter: brightness(1.5);
}

/* Style for the repeat count input */
#repeatCount {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: white;
  color: #333;
}

/* Additional styling for split input sections */
.input-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px; /* spacing between sections */
  margin-right: 15px;
}

.input-section.input-user {
  background-color: #7dbe82; /* Light cyan #FFA55D */
  max-height: 280px;
//  overflow-y: auto;
}

.input-section.input-predefined {
  background-color: #F4F8D3; /* Light pink #FFDF88*/
  max-height: 250px;
//  overflow-y: auto;
}

.input-section.input-settings {
  background-color: #A6D6D6; /* Light green #ACC572*/
  max-height: 250px;
//  overflow-y: auto;
}

.input-section {
  padding: 15px;
  border-radius: 10px;
  border: 1px solid #ccc;
}

/* Ensure textarea stays within section */
.input-section textarea {
  width: 100%;
  height: 110px;
  box-sizing: border-box;
  resize: vertical;
  max-width: 100%;
}

.input-section input {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  max-width: 100%;
}


.back-button {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #74512D;
  color: white;
  padding: 8px 14px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 14px;
  z-index: 9999;
}

.back-button:hover {
  background-color: #455a64;
}