@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&family=Space+Mono&display=swap');

:root {
  --nerd-bg: #0f172a;
  --nerd-card: #1e293b;
  --nerd-blue: #3b82f6;
  --nerd-green: #10b981;
  --nerd-red: #ef4444;
  --nerd-yellow: #facc15;
  --text-light: #cbd5e1;
  --radius: 12px;
  --shadow: 0 6px 18px rgba(0,0,0,0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Roboto Mono', monospace;
  background: var(--nerd-bg);
  color: var(--text-light);
  font-size: 1rem; /* basis font-size */
}

header {
  text-align: center;
  padding: 2rem 1rem;
}

header h1 {
  font-family: 'Space Mono', monospace;
  font-size: clamp(1.8rem, 5vw, 2.5rem); /* dynamisch schalen */
  color: var(--nerd-blue);
  margin: 0;
}

header p {
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  color: var(--text-light);
  margin-top: 0.5rem;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
}

h2 {
  color: var(--nerd-blue);
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: clamp(1.2rem, 4vw, 1.5rem);
}

/* CARD STYLING */
.card {
  background: var(--nerd-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

/* INPUTS */
input, textarea {
  width: 100%;
  padding: 0.7rem;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #1e293b;
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

input:focus, textarea:focus {
  border-color: var(--nerd-blue);
  outline: none;
}

textarea {
  resize: vertical;
}

/* BUTTONS */
button {
  font-family: 'Roboto Mono', monospace;
  transition: all 0.2s ease;
}

button.btn-primary {
  background: var(--nerd-blue);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.8rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
}

button.btn-primary:hover {
  background: #2563eb;
  box-shadow: 0 0 8px var(--nerd-blue);
}

button.btn-join {
  background: var(--nerd-green);
  color: #0f172a;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}

button.btn-join:hover {
  background: #059669;
  box-shadow: 0 0 8px var(--nerd-green);
}

/* GRID */
.ride-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.ride-card {
  border-left: 4px solid var(--nerd-blue);
  padding-left: 1rem;
}

.ride-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.ride-header h3 {
  margin: 0;
  font-family: 'Space Mono', monospace;
  font-size: clamp(1rem, 3vw, 1.2rem);
  color: var(--text-light);
}

.time-tag {
  background: #1e293b;
  color: var(--nerd-yellow);
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 0 6px var(--nerd-yellow);
}

.remarks {
  background: #0f172a;
  border: 1px solid #334155;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  margin: 0.6rem 0;
  font-size: clamp(0.85rem, 2.5vw, 0.95rem);
}

.passengers ul {
  margin: 0.5rem 0 0 0;
  padding: 0;
  list-style: none;
}

.passengers li {
  display: inline-block;
  background: #1e293b;
  color: var(--nerd-blue);
  margin: 0.2rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-family: 'Space Mono', monospace;
  font-size: clamp(0.7rem, 2vw, 0.85rem);
  box-shadow: 0 0 4px var(--nerd-blue);
}

.btn-row {
  display: flex;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.btn-small {
  background: #1e293b;
  color: var(--nerd-blue);
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  font-size: clamp(0.7rem, 2vw, 0.85rem);
  text-decoration: none;
  text-align: center;
  box-shadow: 0 0 4px var(--nerd-blue);
}

.btn-small:hover {
  background: #0f172a;
  box-shadow: 0 0 6px var(--nerd-blue);
}

.btn-small.delete {
  background: var(--nerd-red);
  color: white;
  box-shadow: 0 0 4px var(--nerd-red);
}

.small-link {
  font-size: clamp(0.7rem, 2vw, 0.8rem);
  margin-left: 0.3rem;
  text-decoration: none;
  color: var(--nerd-blue);
}

.small-link.delete {
  color: var(--nerd-red);
}

/* FOOTER */
footer {
  text-align: center;
  padding: 1.5rem;
  font-size: clamp(0.8rem, 2.5vw, 0.9rem);
  color: var(--text-light);
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .ride-grid {
    grid-template-columns: 1fr;
  }
  .ride-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
  .btn-row {
    flex-direction: column;
  }
  input, textarea {
    font-size: 1rem;
  }
  button {
    font-size: 1rem;
    padding: 0.8rem 1rem;
  }
}
