* { box-sizing: border-box; }

:root {
  --psu-blue: #041e42;
  --psu-light-blue: #1f3a8a;
  --psu-gray: #f3f4f6;
}

.site-header {
  background-color: var(--psu-blue);
  color: white;
  padding: 0;
}



body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  line-height: 1.5;
}


.content {
  padding: 24px;
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
}

.nav-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
}

.nav-links {
  grid-column: 2;
  justify-self: center;
  display: flex;
  gap: 32px;
}

.auth-links {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 16px;
}


.login-link {
  color: #e5edff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
}

.signup-btn {
  background: white;
  color: var(--psu-blue);
  text-decoration: none;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 1.05rem;
}

.signup-btn:hover {
  background: #e5edff;
}


@media (max-width: 700px) {
  .nav-bar {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .nav-links {
    grid-column: 1;
    justify-self: center;
  }

  .auth-links {
    grid-column: 1;
    justify-self: center;
  }
}




.logo {
  margin: 0;
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  gap: 32px;
  justify-content: center;
}


.nav-links a {
  color: #e5edff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.3rem;
}

.content.grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  align-items: stretch;

  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

/* Base panel styles */
.panel {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px 18px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.panel h1 {
  margin: 0 0 10px 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

.panel h3 {
  margin: 14px 0 6px;
}

/* Make it feel like a real landing page */
body {
  background: var(--psu-gray);
}

/* Layout “placements” */
.about {
  grid-column: 1 / -1; /* full width */
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 32px;
}

.top-issues {
  grid-column: 1 / -1; /* full width */
  min-height: 180px;
}

.vote {
  grid-column: 1 / 7; /* half (left) */
}

.add-issues {
  grid-column: 7 / -1; /* half (right) */
}

.representation {
  grid-column: 1 / -1; /* full width */
}

.leadership {
  grid-column: 1 / -1; /* full width */
}



/* Responsive: stack nicely on mobile */
@media (max-width: 900px) {
  .content.grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .about, .vote, .rules, .top-issues, .add-issues, .leadership, .representation {
    grid-column: span 6;
  }
}

@media (max-width: 520px) {
  .content.grid {
    grid-template-columns: 1fr;
  }
  .about, .vote, .rules, .top-issues, .add-issues, .leadership, .representation {
    grid-column: span 1;
  }
}

.vote-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.issues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.issue-card {
  display: block;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.issue-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

.issue-card h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.issue-card .votes {
  font-weight: 600;
  margin-bottom: 8px;
}

.sort-bar {
  background: white;
  border-bottom: 1px solid #e5e7eb;
}

.sort-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 24px;

  display: flex;
  justify-content: center; /* 👈 center horizontally */
  align-items: center;
  gap: 16px;
}

.sort-label {
  font-weight: 600;
  color: #374151;
}

.sort-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: #374151;
}

.sort-btn:hover {
  background: #f3f4f6;
}

.sort-btn.active {
  background: var(--psu-blue);
  color: white;
}

.leaderboard {
  grid-column: 1 / -1;
}



.leaderboard h1 {
  margin-bottom: 4px;
}

.subtitle {
  color: #6b7280;
  margin-bottom: 24px;
}

.leaderboard-table {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 80px 1fr 100px;
  padding: 14px 18px;
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
}

.leaderboard-row:last-child {
  border-bottom: none;
}

.leaderboard-row.header {
  background: #f9fafb;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.leaderboard-row span {
  padding-right: 12px;
}

.leaderboard-row span:not(:last-child) {
  border-right: 1px solid #e5e7eb;
}


.rank {
  font-weight: 700;
}

.issue {
  font-weight: 500;
}

.votes {
  text-align: right;
  font-weight: 700;
}


/* Auth pages (login/signup) */
.auth-panel {
  grid-column: 1 / -1;
  max-width: 520px;
  margin: 0 auto;
  padding: 26px 24px;
}

.auth-subtitle {
  color: #6b7280;
  margin-top: 6px;
  margin-bottom: 18px;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-label {
  font-weight: 600;
  margin-top: 10px;
}

.auth-input {
  width: 100%;
  padding: 12px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
}

.auth-input:focus {
  border-color: #cbd5e1;
  box-shadow: 0 0 0 4px rgba(31, 58, 138, 0.12);
}

.auth-hint {
  margin: 2px 0 8px;
  font-size: 0.92rem;
  color: #6b7280;
}

.auth-btn {
  margin-top: 14px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  background: var(--psu-blue);
  color: white;
  cursor: pointer;
}

.auth-btn:hover {
  filter: brightness(1.05);
}

.auth-footer {
  margin-top: 10px;
  color: #6b7280;
  font-size: 0.95rem;
}

.auth-footer a,
.auth-row a {
  color: var(--psu-blue);
  text-decoration: none;
  font-weight: 700;
}

.auth-row {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  gap: 12px;
}

.auth-note {
  margin-top: 16px;
  color: #6b7280;
  font-size: 0.92rem;
}

/* ---------------------------
   Vote page improvements
---------------------------- */

.vote-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 24px 34px;
}

.page-header {
  margin: 14px 0 18px;
}

.page-header h1 {
  margin: 0 0 6px;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

.page-header p {
  margin: 0;
  color: #6b7280;
  font-weight: 500;
}

/* Tighter grid spacing */
.issues-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
  padding: 24px;
}

/* Card layout */
.issue-card {
  display: flex;
  flex-direction: column;
  gap: 10px;

  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 18px;

  text-decoration: none;
  color: inherit;

  box-shadow: 0 10px 25px rgba(0,0,0,0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.issue-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.10);
  border-color: #dbe1ea;
}

.issue-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.issue-card h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.issue-tag {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.description {
  margin: 0;
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.45;
}

/* Bottom row with votes + button */
.issue-card__bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid #eef2f7;
}

.vote-count {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 800;
}

.vote-arrow {
  font-size: 1.05rem;
}

.vote-number {
  font-size: 1.05rem;
}

.vote-label {
  font-weight: 700;
  color: #6b7280;
  font-size: 0.9rem;
}

/* Vote button */
.vote-btn {
  border: none;
  cursor: pointer;
  font-family: inherit;

  padding: 10px 14px;
  border-radius: 999px;

  font-weight: 800;
  font-size: 0.95rem;

  background: var(--psu-blue);
  color: white;

  box-shadow: 0 10px 18px rgba(4, 30, 66, 0.18);
  transition: transform 0.12s ease, filter 0.12s ease, opacity 0.12s ease;
}

.vote-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.vote-btn:active {
  transform: translateY(0px);
}

.vote-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}

/* Make cards feel tappable on mobile */
@media (max-width: 520px) {
  .vote-page { padding: 18px 16px 28px; }
  .issues-grid { grid-template-columns: 1fr; }
}

/* ---------- Homepage enhancements ---------- */

.subtitle {
  color: #6b7280;
  font-size: 0.95rem;
  margin-top: 6px;
}

/* CTA buttons */
.cta-btn {
  display: inline-block;
  margin-top: 14px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  background: var(--psu-blue);
  color: white;
}

.cta-btn:hover {
  filter: brightness(1.06);
}

.cta-btn.secondary {
  background: white;
  color: var(--psu-blue);
  border: 2px solid var(--psu-blue);
}

/* Top issues preview cards */
.top-issues-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 35px;
}



/* Simple text link */
.panel-link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 700;
  color: var(--psu-blue);
  text-decoration: none;
}

/* Rules list */
.rules-list {
  margin: 10px 0 16px;
  padding-left: 18px;
}

.rules-list li {
  margin-bottom: 6px;
}

.faq {
  grid-column: 1 / 7;
}

.rules {
  grid-column: 7 / -1;
}

/* FAQ + Rules spacing */
.faq h3,
.rules h3 {
  margin-top: 18px;
  margin-bottom: 6px;
}

.faq p,
.rules p {
  margin: 0 0 12px;
}

.rules-list {
  margin: 10px 0 18px;
  padding-left: 18px;
}

.rules-list li {
  margin-bottom: 8px;
}

.faq h3 {
  border-top: 1px solid #eef2f7;
  padding-top: 14px;
}

.faq h3:first-of-type {
  border-top: none;
  padding-top: 0;
}

.top-issue-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.top-issue-card {
  position: relative; /* needed for badge positioning */
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 20px 20px 22px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
}

/* Top Issues vote count (homepage cards) */
.top-issue-card .vote-count {
  margin: 12px 0 14px;      /* more space above/below */
  font-size: 1rem;          /* bigger */
  font-weight: 800;         /* bolder */
  color: var(--psu-blue);   /* more visible */
  letter-spacing: 0.01em;
}

.rank-badge {
  position: absolute;
  top: 14px;
  right: 14px;

  width: 28px;
  height: 28px;
  border-radius: 999px;

  background: var(--psu-blue);
  color: #fff;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-weight: 800;
  font-size: 0.85rem;
}

.top-issue-card h3 {
  margin: 0 36px 8px 0; /* space so text doesn't run under badge */
  font-size: 1rem;
}

.top-issue-card p {
  margin: 0;
  color: #4b5563;
  font-size: 0.9rem;
}

.vote-count {
  margin: 0 0 10px 0;
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #6b7280;
}
