@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
  --bg:      #FFFFFF;
  --surface: #F0F0F0;
  --text:    #000000;
  --muted:   #666666;
  --border:  #000000;
  --shadow:  rgba(0,0,0,0.12);
  --radius:  0px;
  --font:    'Courier Prime', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 16px;
  text-transform: lowercase;
}

a { color: inherit; text-decoration: none; }

h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p  { color: var(--muted); }

/* ─── Navigation ─────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.9rem 1.5rem;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
}

.nav-brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  white-space: nowrap;
}

.nav a {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.15s;
}

.nav a:hover,
.nav a.active { color: var(--text); }

/* ─── Page Layout ────────────────────────────────── */

.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header-text h1 { font-size: 2rem; }
.page-header-text p  { color: var(--muted); font-size: 0.95rem; margin-top: 0.2rem; }

.page-header-actions { display: flex; gap: 0.75rem; }

/* ─── Buttons ─────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}

.btn:hover { background: var(--text); color: var(--bg); }

.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: var(--muted); border-color: var(--muted); }

/* ─── Inputs ─────────────────────────────────────── */

.input {
  width: 100%;
  padding: 0.6rem 0.9rem;
  font-family: var(--font);
  font-size: 0.9rem;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.input:focus { outline: none; }
.input.error  { border-color: #cc0000; }

/* ─── Login ──────────────────────────────────────── */

.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-box {
  width: 100%;
  max-width: 360px;
  border: 2px solid var(--border);
  padding: 2rem;
}

.login-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.login-sub   { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.login-error { color: #cc0000; font-size: 0.85rem; margin-top: 0.75rem; min-height: 1.2em; }

/* ─── Home / GIF Tiles ───────────────────────────── */

.site-hero {
  padding: 3rem 0 2.5rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 2.5rem;
}

.site-hero h1 { font-size: 2.4rem; letter-spacing: -0.5px; }
.site-hero p  { color: var(--muted); font-size: 0.95rem; margin-top: 0.3rem; }

.gif-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

.gif-tile {
  display: block;
  text-decoration: none;
  color: var(--text);
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid var(--border);
}

.gif-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gif-tile-placeholder {
  width: 100%;
  height: 100%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
}

.gif-tile-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--bg);
  border-top: 2px solid var(--border);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
}

.gif-tile:hover .gif-tile-label {
  background: var(--text);
  color: var(--bg);
}

/* ─── Calendar ───────────────────────────────────── */

.fc { font-family: var(--font) !important; }
.fc .fc-button {
  font-family: var(--font) !important;
  border-radius: 0 !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
}
.fc .fc-scrollgrid         { border: 2px solid var(--border) !important; }
.fc .fc-scrollgrid-section > td { border: none !important; }
.fc td, .fc th             { border: 1px solid #ccc !important; }
.fc .fc-col-header-cell    { background: var(--surface) !important; }
.fc .fc-toolbar-title      { font-size: 1.1rem !important; font-weight: 700 !important; }
.fc .fc-button-primary     { background: var(--text) !important; border-color: var(--border) !important; }
.fc .fc-button-primary:hover { background: var(--muted) !important; }
.fc .fc-button-primary:not(:disabled).fc-button-active { background: var(--muted) !important; }
.fc .fc-event                    { border-radius: 0 !important; font-size: 0.78rem !important; }
.fc .fc-event.event-approved     { background: var(--text) !important; color: var(--bg) !important; border: none !important; }
.fc .fc-event.event-proposed     { background: #ee2a35 !important; color: #ffffff !important; border: none !important; }
.fc .fc-event.event-cancelled                  { background: var(--bg) !important; border: 1px solid var(--border) !important; --fc-event-text-color: #000000; }
.fc .fc-event.event-cancelled .fc-event-main   { color: #000000 !important; }
.fc .fc-event.event-cancelled .fc-event-title  { color: #000000 !important; text-decoration: line-through; }
.fc .fc-daygrid-day.fc-day-today { background: var(--surface) !important; }

/* ─── Modal ──────────────────────────────────────── */

.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg);
  border: 2px solid var(--border);
  padding: 2rem;
  width: 100%;
  max-width: 440px;
}

.modal h2 { font-size: 1.2rem; margin-bottom: 1.25rem; }

.form-group         { margin-bottom: 1rem; }
.form-group label   { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 0.3rem; }
.modal-actions      { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: flex-end; margin-top: 1.25rem; }

/* ─── Timeline ───────────────────────────────────── */

.timeline { position: relative; padding: 1rem 0; }

.timeline::before {
  content: '';
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 2px;
  background: var(--border);
  transform: translateX(-50%);
}

.tl-entry {
  display: flex;
  gap: 2rem;
  margin-bottom: 2.5rem;
  align-items: flex-start;
  position: relative;
}

.tl-entry:nth-child(odd)  { flex-direction: row; }
.tl-entry:nth-child(even) { flex-direction: row-reverse; }

.tl-side { flex: 1; }

.tl-dot {
  width: 14px; height: 14px;
  background: var(--text);
  border: 3px solid var(--bg);
  flex-shrink: 0;
  margin-top: 0.5rem;
  position: relative; z-index: 1;
  box-shadow: 0 0 0 2px var(--text);
}

.tl-card {
  padding: 1rem 1.1rem;
  border: 2px solid var(--border);
  background: var(--bg);
}

.tl-card .date  { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.3rem; }
.tl-card h3     { margin-bottom: 0.4rem; }
.tl-card p      { font-size: 0.9rem; margin-top: 0.5rem; }
.tl-card img    { margin-top: 0.75rem; width: 100%; object-fit: cover; max-height: 200px; display: block; }

/* ─── House Compact ──────────────────────────────── */

.compact-body { max-width: 680px; }

.compact-section { margin-bottom: 3rem; }
.compact-section h2    { font-size: 1.35rem; margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 1px solid #ccc; }
.compact-section p     { font-size: 1rem; line-height: 1.8; color: var(--text); margin-bottom: 0.75rem; }
.compact-section ul    { margin: 0.5rem 0 0.75rem 1.25rem; }
.compact-section ul li { font-size: 1rem; line-height: 1.8; color: var(--text); margin-bottom: 0.25rem; }

/* ─── Resources ──────────────────────────────────── */

.resource-group { margin-bottom: 2.5rem; }

.resource-group-heading {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.resource-card {
  border: 2px solid var(--border);
  padding: 1rem 1.25rem;
  margin-bottom: -2px;
  background: var(--bg);
  transition: background 0.15s;
}

.resource-card:hover { background: var(--surface); }
.resource-card a     { font-weight: 700; color: var(--text); text-decoration: underline; }
.resource-card p     { font-size: 0.9rem; color: var(--muted); margin-top: 0.25rem; }

/* ─── Requests ───────────────────────────────────── */

.requests-table {
  border: 2px solid var(--border);
  min-height: 60vh;
}

.req-header,
.req-row {
  display: grid;
  grid-template-columns: 1fr 230px 190px;
  align-items: center;
}

.req-header {
  padding: 0.75rem 1.25rem;
  border-bottom: 2px solid var(--border);
  background: var(--surface);
}

.req-header h2 { font-size: 0.95rem; font-weight: 700; }

.req-row {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid #e0e0e0;
  transition: background 0.12s;
}

.req-row:last-child { border-bottom: none; }
.req-row:hover      { background: var(--surface); }

.req-col-item { min-width: 0; }

.req-col-assigned {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.roommate-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  user-select: none;
}

.req-col-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}

.wishlist-empty {
  padding: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}

.wishlist-item-title { font-size: 0.9rem; font-weight: 700; }
.wishlist-item-desc  { font-size: 0.82rem; color: var(--muted); margin-top: 0.15rem; line-height: 1.4; }

.roommate-check {
  width: 16px;
  height: 16px;
  accent-color: var(--text);
  cursor: pointer;
}

.btn-reminder {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.wishlist-item-delete {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--muted);
  padding: 0;
  font-family: var(--font);
  transition: color 0.12s;
}

.wishlist-item-delete:hover { color: var(--text); }

.req-row--unassigned                          { background: #ee2a35; }
.req-row--unassigned:hover                    { background: #d4222d; }
.req-row--unassigned .wishlist-item-title     { color: #ffffff; }
.req-row--unassigned .wishlist-item-desc      { color: rgba(255,255,255,0.75); }
.req-row--unassigned .wishlist-item-delete    { color: rgba(255,255,255,0.6); }
.req-row--unassigned .wishlist-item-delete:hover { color: #ffffff; }
.req-row--unassigned .roommate-label          { color: #ffffff; }
.req-row--unassigned .roommate-check          { accent-color: #ffffff; }

/* ─── Pill / Tag ─────────────────────────────────── */

.pill {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.55rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ─── Utilities ──────────────────────────────────── */

.center { text-align: center; }
hr { border: none; border-top: 2px solid var(--border); margin: 2rem 0; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
.shake { animation: shake 0.4s ease; }

/* ─── Responsive ─────────────────────────────────── */

@media (max-width: 860px) {
  .gif-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 680px) {
  .nav { gap: 0.75rem; flex-wrap: wrap; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header h1 { font-size: 1.6rem; }
  .gif-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline::before { left: 1rem; }
  .tl-entry,
  .tl-entry:nth-child(even) { flex-direction: column; padding-left: 2.5rem; }
  .tl-dot { position: absolute; left: 0.3rem; margin-top: 0.35rem; }
  .tl-side { flex: none; width: 100%; }

  /* ── Requests: stacked card layout ── */
  .req-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .req-header .req-col-assigned { display: none; }
  .req-row {
    display: flex;
    flex-wrap: wrap;
    padding: 1rem;
  }
  .req-col-item { width: 100%; padding-bottom: 0.65rem; }
  .req-col-assigned { flex: 1; gap: 0.75rem; }
  .req-col-action { flex: 0 0 auto; }
}
