*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

body {
  background: #00ACC1;
  color: #fff;
}

a {
  color: #fff;
  text-decoration: underline;
}

.container {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Topbar */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #00ACC1;
}

.topbar-inner {
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 18px 16px 10px;
  gap: 10px;
}

.btn-back {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-text {
  display: flex;
  flex-direction: column;
}

.topbar-title {
  font-size: 28px;
  font-weight: 300;
  line-height: 1.2;
}

.topbar-sub {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 1px;
  opacity: 0.8;
}

/* Stepper */
.stepper {
  position: fixed;
  top: 75px;
  left: 0;
  right: 0;
  z-index: 99;
  background: #00ACC1;
  padding: 10px 16px 14px;
}

.stepper-dots {
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding: 0 30px;
}

.stepper-dots::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 30px;
  right: 30px;
  height: 2px;
  background: rgba(255,255,255,0.3);
  transform: translateY(-50%);
}

.dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  position: relative;
  z-index: 1;
  transition: background 0.3s, transform 0.3s;
}

.dot.active {
  background: #fff;
  color: #00ACC1;
  transform: scale(1.15);
}

.dot.completed {
  background: rgba(255,255,255,0.7);
  color: #00ACC1;
}

.stepper-labels {
  max-width: 420px;
  margin: 6px auto 0;
  display: flex;
  justify-content: space-between;
  padding: 0 18px;
}

.stepper-labels span {
  font-size: 10px;
  font-weight: 300;
  opacity: 0.7;
  text-align: center;
  width: 60px;
}

/* Content */
.content {
  margin-top: 145px;
  padding: 0 0 80px;
  flex: 1;
}

/* Loading */
.loading {
  display: flex;
  justify-content: center;
  padding: 60px 0;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* View subtitle */
.view-subtitle {
  padding: 10px 28px 16px;
  font-size: 15px;
  font-weight: 400;
}

.view-subtitle strong {
  font-weight: 500;
}

/* City list */
.city-list {
  padding: 0 8%;
}

.city-btn {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: transparent;
  border: 1px solid #fff;
  border-radius: 10px;
  color: #fff;
  font-size: 17px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.city-btn:active {
  background: rgba(255,255,255,0.15);
}

/* Timetable */
.timetable {
  padding: 0 8%;
}

.timetable-header {
  padding: 0 0 16px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
}

.timetable-card {
  border: 1px solid #fff;
  border-radius: 10px;
  overflow: hidden;
}

.timetable-period {
  font-size: 13px;
  font-weight: 400;
  opacity: 0.85;
  padding: 0 0 12px;
  font-style: italic;
}

.timetable-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  min-height: 50px;
  cursor: pointer;
  transition: background 0.15s;
}

.timetable-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.timetable-days {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.8;
}

.timetable-row:not(:last-child) {
  border-bottom: 1px solid rgba(255,255,255,0.4);
}

.timetable-row:active {
  background: rgba(255,255,255,0.15);
}

.timetable-time {
  font-size: 20px;
  font-weight: 400;
  min-width: 60px;
}

.timetable-validity {
  font-size: 13px;
  font-weight: 400;
  opacity: 0.85;
  flex: 1;
  text-align: center;
  padding: 0 8px;
}

.timetable-info-btn {
  background: transparent;
  border: 1px solid #fff;
  border-radius: 8px;
  color: #fff;
  padding: 4px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}

.timetable-info-btn:active {
  background: rgba(255,255,255,0.2);
}

/* Stops detail */
.stops-detail {
  padding: 0 8%;
}

.stops-header {
  padding: 0 0 12px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.8;
}

.stops-header strong {
  font-weight: 500;
}

.stops-section-title {
  font-size: 15px;
  font-weight: 400;
  padding: 18px 0 10px;
}

.stops-card {
  border: 1px solid #fff;
  border-radius: 10px;
  overflow: hidden;
}

.stop-item {
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 400;
}

.stop-item:not(:last-child) {
  border-bottom: 1px solid rgba(255,255,255,0.4);
}

/* FAB */
.fab {
  position: fixed;
  bottom: 30px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 90;
  transition: transform 0.2s;
}

.fab:active {
  transform: scale(0.92);
}

.fab-home {
  background: #00ACC1;
  border: 2px solid #fff;
  right: auto;
  left: 20px;
}

/* Constrain FABs to container on wider screens */
@media screen and (min-width: 460px) {
  .fab {
    right: calc(50% - 210px + 20px);
  }
  .fab-home {
    right: auto;
    left: calc(50% - 210px + 20px);
  }
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-content {
  background: #00ACC1;
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 16px 16px 0 0;
  padding: 24px 24px 40px;
  position: relative;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 4px 8px;
}

.modal-content h2 {
  font-size: 24px;
  font-weight: 300;
  margin-bottom: 20px;
  text-align: center;
}

.modal-section {
  margin-bottom: 20px;
}

.modal-section h3 {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 1px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.4);
}

.modal-section p {
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 6px;
  line-height: 1.5;
}

.modal-section a {
  color: #fff;
}

.team-card {
  border: 1px solid #fff;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 400;
}

.small {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 8px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  font-size: 15px;
  font-weight: 400;
  opacity: 0.8;
}

/* Search bar */
.search-wrap {
  padding: 0 8% 12px;
}

.search-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #fff;
  border-radius: 10px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 15px;
  font-weight: 400;
  outline: none;
}

.search-input::placeholder {
  color: rgba(255,255,255,0.6);
}

.search-input:focus {
  background: rgba(255,255,255,0.25);
}

/* Animations */
.fade-in {
  animation: fadeIn 0.25s ease-out;
}

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