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

:root {
  --mrt-green: #007a4b;
  --mrt-green-dark: #005f3a;
  --bg-color: #f4f7f6;
  --card-bg: #ffffff;
  --text-main: #333333;
  --text-light: #666666;
  --badge-bg: #e0f2ec;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.app-container {
  width: 100%;
  max-width: 480px; /* Mobile first constraints */
  background-color: var(--bg-color);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

.line-badge {
  display: inline-block;
  background-color: var(--mrt-green);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

header p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.button-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

button {
  background-color: var(--mrt-green);
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 122, 75, 0.3);
  transition: transform 0.1s ease, background-color 0.2s ease;
  width: 100%;
}

button:active {
  transform: scale(0.97);
  background-color: var(--mrt-green-dark);
}

.result-card {
  background-color: var(--card-bg);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
  animation: slideUp 0.4s ease-out forwards;
}

.result-card.hidden {
  display: none;
}

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

.station-header {
  border-bottom: 2px solid var(--bg-color);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.station-code {
  background-color: var(--badge-bg);
  color: var(--mrt-green-dark);
  font-weight: 800;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 1.1rem;
}

#station-name {
  font-size: 1.4rem;
  font-weight: 800;
}

.places-container h3 {
  font-size: 1rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

#places-list {
  list-style: none;
}

#places-list li {
  margin-bottom: 1.5rem;
}

#places-list li:last-child {
  margin-bottom: 0;
}

.place-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.3rem;
}

.place-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-main);
}

.place-category {
  font-size: 0.75rem;
  background-color: #eee;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  color: var(--text-light);
  white-space: nowrap;
  margin-left: 0.5rem;
}

.place-category.food {
  background-color: #fff3cd;
  color: #856404;
}

.place-category.sightseeing {
  background-color: #d1ecf1;
  color: #0c5460;
}

.place-desc {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* NEW STYLES */
.secondary-btn {
  background-color: transparent;
  color: var(--mrt-green);
  border: 2px solid var(--mrt-green);
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  margin-top: 1rem;
  transition: all 0.2s ease;
  box-shadow: none;
}

.secondary-btn:active {
  background-color: var(--badge-bg);
  transform: scale(0.97);
}

.add-place-section {
  margin-top: 1.5rem;
  border-top: 1px solid #eee;
  padding-top: 1rem;
}

#add-place-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
  background-color: #f9f9f9;
  padding: 1rem;
  border-radius: 8px;
}

#add-place-form.hidden, #show-add-form-btn.hidden {
  display: none;
}

#add-place-form h4 {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

#add-place-form input,
#add-place-form select,
#add-place-form textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
}

#add-place-form textarea {
  resize: vertical;
  min-height: 60px;
}

.form-actions {
  display: flex;
  gap: 0.5rem;
}

.submit-btn {
  background-color: var(--mrt-green);
  padding: 0.6rem;
  font-size: 0.9rem;
  flex: 1;
}

.cancel-btn {
  background-color: #e0e0e0;
  color: #333;
  padding: 0.6rem;
  font-size: 0.9rem;
  flex: 1;
  box-shadow: none;
}
.cancel-btn:active {
  background-color: #d0d0d0;
  transform: scale(0.97);
}

header {
  position: relative;
}

.admin-link {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  text-decoration: none;
}

.admin-link:hover {
  color: var(--mrt-green);
  text-decoration: underline;
}

.all-stations-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #eee;
}

.all-stations-section h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-main);
  text-align: center;
}

#all-stations-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#all-stations-list li {
  background: #fff;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

#all-stations-list li:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.list-station-code {
  background-color: var(--badge-bg);
  color: var(--mrt-green-dark);
  font-weight: 800;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.list-station-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-main);
}