/* Mobile-first big, clear UI style */

/* Dark mode styles */
.dark-mode {
  background-color: #1a1a1a; /* Dark background */
  color: #e0e0e0; /* Light text */
}

.dark-mode h1 {
  color: #8a2be2; /* Purple accent for heading in dark mode */
}

.dark-mode .large-button {
  background-color: #8a2be2; /* Purple accent for buttons in dark mode */
  color: #fff; /* White text for contrast in dark mode */
}

.dark-mode .large-button:focus,
.dark-mode .large-button:hover {
  background-color: #9370db; /* Lighter purple for hover in dark mode */
  outline: none;
}


body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: white; /* Light background */
  color: black; /* Dark text */
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
  animation: fadeIn 1s ease-out forwards; /* Fade-in animation */
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

body {
  transition: background-color 0.5s ease, color 0.5s ease;
}

main {
  max-width: 480px;
  width: 100%;
  text-align: center;
  padding-bottom: 70px; /* space for bottom nav */
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: black; /* Dark text for heading */
}

/* Welcome section styles */
.welcome-section {
  text-align: center;
  margin-bottom: 3rem;
}

.logo-container {
  margin-bottom: 1.5rem;
}

.app-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.welcome-title {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: #ff8d21;
  font-weight: bold;
}

.welcome-subtitle {
  font-size: 1.4rem;
  color: #666;
  margin-bottom: 0;
}

.dark-mode .welcome-subtitle {
  color: #ccc;
}

/* Quick access section */
.quick-access-section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #333;
  text-align: center;
}

.dark-mode .section-title {
  color: #e0e0e0;
}

.quick-access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 400px;
  margin: 0 auto;
}

.quick-access-btn {
  background: linear-gradient(135deg, #ff8d21, #ffcc99);
  border: none;
  border-radius: 16px;
  padding: 1.5rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 141, 33, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  min-height: 120px;
}

.quick-access-btn:hover,
.quick-access-btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 141, 33, 0.4);
  outline: none;
}

.dark-mode .quick-access-btn {
  background: linear-gradient(135deg, #8a2be2, #9370db);
  box-shadow: 0 4px 12px rgba(138, 43, 226, 0.3);
}

.dark-mode .quick-access-btn:hover,
.dark-mode .quick-access-btn:focus {
  box-shadow: 0 6px 20px rgba(138, 43, 226, 0.4);
}

.btn-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.btn-text {
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
  text-align: center;
}

.dark-mode .btn-text {
  color: #fff;
}

/* Info section */
.info-section {
  margin-top: 2rem;
}

.info-card {
  background: #f9f9f9;
  border-radius: 16px;
  padding: 1.5rem;
  border: 2px solid #ff8d21;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dark-mode .info-card {
  background: #2a2a2a;
  border-color: #8a2be2;
}

.info-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: #ff8d21;
  text-align: center;
}

.dark-mode .info-card h3 {
  color: #8a2be2;
}

.info-card p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #555;
  margin: 0;
  text-align: center;
}

.dark-mode .info-card p {
  color: #ccc;
}

.button-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.large-button {
  font-size: 2rem;
  padding: 1.2rem;
  border: none;
  border-radius: 12px;
  background-color: #ff8d21; /* Orange accent */
  color: black; /* Black text for contrast */
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
  outline-offset: 4px;
  margin-top: 1.5rem; /* Add some top margin */
}

/* Light mode button hover */
.large-button:focus,
.large-button:hover {
  background-color: #ffcc99; /* Light orange for hover */
  outline: none;
}

/* Style labels for better visibility */
label {
  font-size: 1.4rem; /* Larger font size for labels */
  font-weight: bold; /* Make labels bold */
  display: block; /* Ensure labels are block elements */
  margin-bottom: 0.5rem; /* Add some bottom margin */
  text-align: left; /* Ensure labels are left-aligned within their containers */
}

/* Ensure main content is centered and has appropriate font sizes */
main {
  text-align: center; /* Center align content within main */
}

/* Adjustments for select and input elements if needed for centering or specific spacing */
body:not(.dark-mode) select {
  border-color: #ff8d21; /* Orange border for light mode */
}

/* Adjustments for select and input elements if needed for centering or specific spacing */
select,
input[type="text"],
textarea {
  /* Center block elements */
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Styles for larger, rounded inputs and selects for accessibility */
select,
input[type="text"],
textarea {
  font-size: 1.4rem; /* Larger font size */
  padding: 1.2rem; /* More padding */
  border-radius: 15px; /* Rounded corners */
  border: 2px solid #9370db; /* Default/Dark mode border */
  box-sizing: border-box; /* Ensure padding and border are included in the element's total width and height */
  margin-bottom: 1rem; /* Add some spacing below */
}
body:not(.dark-mode) input[type="text"] {
body:not(.dark-mode) textarea {
  border-color: #ff8d21; /* Orange border for light mode textareas */
}

body:not(.dark-mode) #speech-textarea {
  color: #ff8d21; /* Orange text for speech-to-text output in light mode */
}

  border-color: #ff8d21; /* Orange border for light mode text inputs */
}


/* Specific style for light mode select border */
body:not(.dark-mode) select {
  border-color: #ff8d21; /* Orange border for light mode */
}

/* Adjustments for textarea specifically if needed, but keeping it general for now */
textarea {
  resize: vertical; /* Allow vertical resizing */
}
#etaListBus {
  border: 2px solid #ff8d21; /* Orange border */
  border-radius: 15px; /* Rounded corners */
  padding: 1.2rem; /* Padding inside the box */
  margin-bottom: 1rem; /* Spacing below the box */
  background-color: #f9f9f9; /* Light background */
  text-align: left; /* Align text within the box */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

/* Adjustments for dark mode */
.dark-mode #etaListBus {
  border-color: #9370db; /* Purple border in dark mode */
  background-color: #2a2a2a; /* Darker background */
  color: #e0e0e0; /* Light text */
}

/* Ensure list items within the bus ETA box are styled appropriately */
#etaListBus ul {
  list-style-type: none; /* Remove default list bullets */
  padding: 0;
  margin: 0;
}

#etaListBus li {
  margin-bottom: 0.8rem; /* Spacing between list items */
  font-size: 1.2rem; /* Slightly smaller font for list items */
  line-height: 1.5;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 20px;
  height: 60px;
  background: #fff;
  border-top: 1.5px solid #eee;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
}

.dark-mode .bottom-nav {
  background: #1a1a1a;
  border-top: 1.5px solid #333;
}

.nav-btn {
  background: none;
  border: none;
  font-size: 2rem;
  color: #ff8d21;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.nav-btn:active, .nav-btn:focus {
  background: #ffcc99;
  outline: none;
}

.nav-btn.active {
  background: #ff8d21;
  color: white;
}

.dark-mode .nav-btn {
  color: #8a2be2;
}

.dark-mode .nav-btn.active {
  background: #8a2be2;
  color: white;
}

/* Settings icon theme switching */
.settings-icon-light {
  display: block;
}

.settings-icon-dark {
  display: none;
}

.dark-mode .settings-icon-light {
  display: none;
}

.dark-mode .settings-icon-dark {
  display: block;
}

body.lang-zh-HK .lang-zh { display: inline; }
body.lang-zh-HK .lang-en { display: none; }
body.lang-en .lang-zh { display: none; }
body.lang-en .lang-en { display: inline; }

/* Modal styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}
.modal {
  background: #fff;
  color: #000;
  width: 100%;
  max-width: 420px;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  text-align: center;
}
.modal h2 {
  margin: 0 0 0.75rem 0;
  font-size: 1.6rem;
}
.modal p {
  margin: 0 0 1rem 0;
}
.modal .modal-actions {
  display: flex;
  gap: 0.7rem;
  margin-top: 1rem;
}
.modal .btn-primary {
  flex: 1;
  background: #ff8d21;
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font-weight: bold;
  cursor: pointer;
}
.modal .btn-secondary {
  flex: 1;
  background: #eee;
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font-weight: bold;
  cursor: pointer;
}
.dark-mode .modal {
  background: #2a2a2a;
  color: #e0e0e0;
}
.dark-mode .modal .btn-primary {
  background: #8a2be2;
  color: #fff;
}
.dark-mode .modal .btn-secondary {
  background: #3a3a3a;
  color: #e0e0e0;
}
