/* Add these styles to your existing CSS */

.file-upload-section {
    margin-bottom: .5rem;
    width: 100%;
    text-align: center;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background-color: #f0f0f0;
    border: 2px dashed #ccc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-label:hover {
    background-color: #e0e0e0;
    border-color: #999;
}

.upload-icon {
    font-size: 1rem;
}

#loading-message {
    margin-top: 1rem;
    color: #666;
    font-style: italic;
}

.text-input-section {
    width: 100%;
}

/* Separator between upload and manual input */
.text-input-section::before {
    content: 'OR';
    display: block;
    text-align: center;
    color: #666;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Rest of your existing CSS remains the same */

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  text-align: center;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  color: #333;
}

#settings-container {
  max-width: 800px;
  margin: .5rem auto;
  padding: .5rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

#text-input {
  width: 80%;
  max-width: 600px;
  padding: 1rem;
  margin: 1rem 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  resize: vertical;
  font-family: inherit;
}

#text-input:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.color-controls {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin: 1rem 0;
}

.color-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

input[type="color"] {
  width: 50px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#start-button {
  background-color: #4a90e2;
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 1rem;
}

#start-button:hover {
  background-color: #357abd;
}

#full-screen-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  box-sizing: border-box;
}

#flash-container {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

#flash-word {
  font-size: 4.5rem;
  font-weight: 500;
  line-height: 1.2;
  transition: all 0.3s ease;  /* Smooth transition for size changes */
}

#speed-control {
  background: rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  width: 80%;
  max-width: 600px;
  transition: visibility 0.3s;
}

#wpm {
  width: 80%;
  margin: 0.5rem 0;
}

#pause-button,
#reload-button {
  background-color: #f0f0f0;
  border: none;
  padding: 0.8rem 1.5rem;
  margin: 0 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s;
}

#pause-button:hover,
#reload-button:hover {
  background-color: #e0e0e0;
}

/* Label styling */
label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #settings-container {
    margin: 1rem;
    padding: 1rem;
  }

  #text-input {
    width: 90%;
  }

  #flash-word {
    font-size: 3rem;
  }

  #speed-control {
    width: 90%;
    padding: 1rem;
  }
}

/* Responsive text input adjustments */
@media (max-width: 768px) {
  #settings-container {
    margin: 0.5rem;
    padding: 0.5rem;
    width: calc(100% - 1rem);
    box-sizing: border-box;
  }

  .text-input-section {
    width: 100%;
  }

  #text-input {
    width: 100%;
    max-width: none;
    margin: 0.5rem 0;
    padding: 0.75rem;
    font-size: 16px; /* Prevents iOS zoom on focus */
    min-height: 120px; /* Smaller height on mobile */
    box-sizing: border-box;
  }

  .file-upload-label {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
  }

  .color-controls {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin: 0.5rem 0;
  }

  .color-control {
    justify-content: space-between;
    padding: 0 1rem;
  }

  #flash-word {
    font-size: 2.5rem; /* Smaller font size for mobile */
  }

  #speed-control {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
  }

  #wpm {
    width: 100%;
  }

  /* Adjust button sizing for better touch targets */
  #start-button,
  #pause-button,
  #reload-button {
    padding: 0.75rem 1.25rem;
    min-height: 44px; /* Minimum touch target size */
    width: 100%;
    margin: 0.5rem 0;
    font-size: 1rem;
  }
}

/* Additional adjustments for very small screens */
@media (max-width: 380px) {
  #flash-word {
    font-size: 2rem;
  }

  .file-upload-label {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }

  #text-input {
    font-size: 14px;
    min-height: 100px;
  }
}