:root {
  --primary: #4ECDC4;
  --secondary: #FF6B6B;
  --bg: #F9FAFB;
  --card-bg: #FFFFFF;
  --text: #1F2937;
  --text-light: #6B7280;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  /* Removed flex centering to allow natural scrolling */
  display: block;
  padding: 16px;
}

.container {
  width: 100%;
  max-width: 480px; /* slightly wider for mobile */
  margin: 0 auto;   /* centers horizontally without flex */
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  min-height: calc(100vh - 32px); /* fill height minus padding */
}

h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  word-break: break-word;
}

.hero-image {
  width: 100%;
  height: 150px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  margin-bottom: 16px;
}

input,
button {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid #E5E7EB;
  font-size: 16px;
  margin-bottom: 12px;
  -webkit-appearance: none; /* prevents iOS styling */
  appearance: none;
}

button {
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.2s;
}

button:hover {
  opacity: 0.9;
}

button.secondary {
  background: var(--secondary);
}

.member-list {
  margin: 16px 0;
}

.member-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #F3F4F6;
  min-height: 44px; /* tap target */
}

.member-item.leader {
  font-weight: 700;
  color: var(--primary);
}

.group-id-box {
  background: #F3F4F6;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  margin-bottom: 16px;
  font-family: monospace;
  font-size: 1.1rem;
  word-break: break-all;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.route-card {
  border: 1px solid #E5E7EB;
  border-radius: var(--radius);
  padding: 10px;
  cursor: pointer;
  transition: transform 0.1s;
  background: #fff;
}

.route-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.route-card img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.route-card h3 {
  margin: 8px 0 4px;
  font-size: 0.95rem;
  word-break: break-word;
}

.route-card p {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.3;
}

/* Station list styles */
.page-title {
  text-align: center;
  border: 2px solid var(--text);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.station-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.station-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid var(--text);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  min-height: 52px;
}

.station-status {
  background: var(--text);
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.station-name {
  flex-grow: 1;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  padding: 0 8px;
}

.station-check {
  background: var(--text);
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.station-status.pending,
.station-check.pending {
  background: #fff;
  color: var(--text);
  border: 2px solid var(--text);
}

/* Smooth scrolling on iOS */
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  -webkit-overflow-scrolling: touch;
}
