:root {
  --f1-red: #c40a2b;
  --neutral-grey: #444;
  --light-grey: #f5f5f5;
  --text-grey: #333;
  --card-radius: 12px;
}

html {
  font-size: 16px; /* Default for desktop */
}

@media (max-width: 768px) {
  html {
    font-size: 17px; /* Slightly bigger on smaller screens */
  }
}

@media (max-width: 480px) {
  html {
    font-size: 18px; /* Even bigger for narrow phones */
  }
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

/* Base Layout */

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  width: 100%;
  margin: 0;
  max-width: 100vw;
  overflow-x: hidden;
  background: #f7f7f7;
   font-size: 1rem; /* 16–18px depending on device */
  line-height: 1.6;
}

main {
  padding: 20px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden; /* prevents double scroll */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Top-level Page Headline */
h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 24px 0 16px;
  color: #111;
  position: relative;
  padding-left: 24px;
}

/* Burgundy > marker */
main.home h1::before,
main.predictions h1::before,
main.dashboard h1::before {
  content: ">";
  position: absolute;
  left: 0;
  color: #a2001d;
  font-size: 28px;
  font-weight: bold;
}
h2 {
  font-size: 1.3rem;
}

h4 {
  font-size: 1.1rem;
  font-weight: 600; /* semi-bold */
}

.table-scroll td,
.table-scroll th {
  font-size: 0.9rem;
}

/* General List Styling */
ul {
  padding-left: 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  list-style-type: disc;
}

li {
  margin-bottom: 0.4rem;
  font-size: 1rem;
  line-height: 1.6;
}



/* Responsive Mobile Optimizations */
@media (max-width: 768px) {
  main {
    padding: 12px;
    gap: 16px;
  }

  section.campaigns-container,
  section.news-container {
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 8px;
  }


/* Important: prevent min-width on tables from forcing scroll */
.dashboard-table,
.dashboard-table thead,
.dashboard-table tbody,
.dashboard-table tr,
.dashboard-table td,
.dashboard-table th {
  min-width: unset !important;
  max-width: 100%;
  word-break: break-word;
}


  .campaign-table,
  .dashboard-table,
  .leaderboard-table,
  .season-predictions-container table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .campaign-table th,
  .campaign-table td,
  .dashboard-table th,
  .dashboard-table td,
  .leaderboard-table th,
  .leaderboard-table td {
    font-size: 13px;
    padding: 8px;
  }
  
  @media (max-width: 600px) {
  .campaign-table th:nth-child(3),
  .campaign-table td:nth-child(3),
  .campaign-table th:nth-child(4),
  .campaign-table td:nth-child(4) {
    display: none;
  }
}


  .view-all-btn,
  .btn,
  .link-button,
  .btn-link {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 8px;
  }

  .header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  @media (max-width: 768px) {
  .auth-links form {
    flex-direction: column;
    width: 100%;
  }

  .auth-links input[type="email"],
  .auth-links input[type="password"],
  .auth-links button {
    width: 100%;
    margin-bottom: 8px;
  }
}


  nav ul {
    flex-direction: column;
    gap: 8px;
  }

  .header-right {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .countdown-container p {
    font-size: 13px;
  }
}

:root {
  --f1-red: #c40a2b;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

/* Base Layout */
body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background: #f7f7f7;
}

main {
  padding: 20px;
  max-width: 90vw;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Header */
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #222;
  padding: 15px 20px;
  font-size: 14px;
  color: white;
  width: 100%;
  position: relative;
}

.logo {
  font-family: 'Oswald', sans-serif;
  font-size: 26px;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

.logo:hover {
  color: #ccc;
  transition: color 0.2s ease-in-out;
}

/* Navigation (e.g. Predict F1) */
nav ul {
  list-style: none;
  display: flex;
  gap: 15px;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

nav ul li a:hover {
  color: var(--f1-red);
}

.predict-text {
  font-size: 16px;
  font-weight: bold;
  color: white;
  margin-left: 10px;
  vertical-align: bottom;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: flex-end;
  flex-grow: 1;
}



/* User Info */
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Auth Links */
.auth-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-links form {
  display: flex;
  gap: 10px;
}

.auth-links a {
  color: white;
  text-decoration: none;
  margin-left: 10px;
}

/* Countdown */
.countdown-container {
  width: 100%;
  background: linear-gradient(to right, var(--f1-red), #8b0018);
  padding: 15px;
  text-align: center;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  color: white;
}

.countdown p {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.countdown strong {
  font-weight: 700;
}

.countdown em {
  font-style: normal;
  font-weight: 500;
  opacity: 0.8;
}


/* Login Page Styling */
.login-container {
  max-width: 400px;
  margin: 60px 0 60px 80px; /* top right bottom left */
  padding: 30px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .login-container {
    margin: 40px auto; /* center again for mobile */
  }
}


.login-container h2 {
  font-size: 24px;
  font-weight: 700;
  color: #222;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--f1-red);
  padding-bottom: 10px;
  text-align: center;
}

.login-container form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.login-container input[type="email"],
.login-container input[type="password"] {
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 16px;
}

.login-container button {
  padding: 12px;
  background-color: var(--f1-red);
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease-in-out;
}

.login-container button:hover {
  background-color: #a30824;
}

.login-container .forgot-link {
  text-align: center;
  margin-top: 10px;
}

.login-container .forgot-link a {
  color: var(--f1-red);
  font-size: 14px;
  text-decoration: none;
}

.login-container .forgot-link a:hover {
  text-decoration: underline;
}



/* Standard section containers (used on home page) */
section.campaigns-container,
section.news-container {
  margin-bottom: 12px; /* ↓ reduced from 30px or more */
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

main section + section {
  margin-top: 10px; /* ↓ reduce or remove if unnecessary */
}

main > section {
  flex: unset;
  min-width: unset;
}



section {
  flex: 1 1 48%; /* Each section takes up roughly half the width on large screens */
  min-width: 300px;
  padding: 20px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Headings */
main h2 {
  font-size: 24px;
  font-weight: 700;
  color: #111;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--f1-red);
  padding-bottom: 4px;
}

/* Buttons */
button {
  background: #222;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}



button:hover:not(.toggle-replies) {
  background: #bb0000;
  color: white;
}

/* Footer */
footer {
  background-color: #111;
  color: #ccc;
  text-align: center;
  padding: 20px 10px;
  font-size: 14px;
  font-weight: 400;
  margin-top: 40px;
  border-top: 1px solid #333;
  box-shadow: inset 0 8px 8px -8px rgba(0,0,0,0.2);
}

footer a {
  color: var(--f1-red);
  text-decoration: none;
  margin-left: 10px;
  font-weight: bold;
  font-size: 13px;
}

footer a:hover {
  text-decoration: underline;
  color: white;
}

/* Table Styling */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

th, td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: left;
}

th {
  background-color: #222;
  color: white;
  font-weight: bold;
}

tr:nth-child(even) {
  background-color: #f8f8f8;
}

.race-link-button {
  background-color: #8b0018;         /* dark red */
  color: white;
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s ease;
  font-family: inherit;
}

.race-link-button:hover {
  background-color: #c40a2b;         /* F1 red */
  color: white;
}

.race-link-button:hover {
  background-color: #c40a2b;
  transform: scale(1.03);
}


 
/* Prediction Colors */
.correct { background-color: #4CAF50 !important; font-weight: bold; }
.close { background-color: #D3D3D3 !important; font-weight: bold; }
.incorrect { background-color: #FF4C4C !important; font-weight: bold; }

/* Total Row Styling */
.total-row td {
  font-weight: bold;
  background-color: #333;
  color: white;
}

/* Leaderboard Table */
.leaderboard-table {
  width: 100%;
  margin: 20px 0;
  text-align: left;
}

.leaderboard-table th, .leaderboard-table td {
  padding: 12px;
}

/* Status Colors */
.completed {
  color: green;
  font-weight: bold;
}

.upcoming {
  color: darkorange;
  font-weight: bold;
}

/* Predictions Page Enhancements */
select {
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ddd;
  background: white;
  font-size: 16px;
}

.campaign-link {
  font-size: 0.9em;
  color: var(--f1-red);
  text-decoration: none;
  font-weight: 600;
}

.campaign-link:hover {
  text-decoration: underline;
  color: #900;
}


/* Dashboard Enhancements */
.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  text-align: left;
}

.dashboard-table th,
.dashboard-table td {
  border: 1px solid #ddd;
  padding: 10px;
}

.dashboard-table th {
  background-color: #222;
  color: white;
  font-weight: bold;
}

.toggle-arrow {
  font-size: 14px;
  margin-left: 8px;
} 

/* Alternating Row Colors */
.dashboard-table tr:nth-child(even) {
  background-color: #f8f8f8;
}

.dashboard-table td a {
  color: var(--f1-red);
  font-weight: bold;
  text-decoration: none;
  font-size: 0.9em;
}

.dashboard-table td a:hover {
  text-decoration: underline;
}

.dashboard-content.collapsed {
  display: none;
}

.expired-countdown {
  background: #333;
  color: white;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  font-weight: bold;
}

.qualifying-actions,
.race-actions {
  margin-top: 24px;           /* space from table */
  display: flex;
  justify-content: center;    /* center buttons */
  gap: 12px;                  /* space between buttons */
  flex-wrap: wrap;            /* wrap on smaller screens */
}

.btn-link {
    background: none;
    border: none;
    color: var(--f1-red);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.95em;
}
.btn-link:hover {
    text-decoration:underline;
}

.btn-link {
  background: none;
  border: none;
  color: var(--f1-red);
  font-weight: bold;
  cursor: pointer;
  text-decoration: underline;
  font-size: 14px;
  padding: 0;
}

.link-button {
  color: var(--f1-red);
  text-decoration: none;
  font-weight: bold;
}
.link-button:hover {
  color: darkred;
}



/* Responsive Scaling */
@media (max-width: 1024px) {
  .sections-container {
    flex-direction: column;
    align-items: center;
  }
  section {
    width: 100%;
  }
}

@media (max-width: 768px) {
  main {
    flex-direction: column;
    align-items: center;
    padding: 10px;
  }
  section {
    width: 100%;
  }
}

/* User Info Styling */
.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* "My Account" Link */
.account-link {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.2);
}

.account-link:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

.season-predictions-container {
  max-width: 600px;
  margin: auto;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

.season-predictions-container form {
  display: flex;
  flex-direction: column;
}

.season-predictions-container input {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.season-predictions-container button {
  background: red;
  color: white;
  padding: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.success {
  color: green;
}

.error {
  color: red;
}
/* Style for Season Predictions link */
.season-predictions-title {
  font-size: 24px;
  font-weight: bold;
  color: black;
  text-decoration: none;
  display: block;
  padding: 10px 0;
  border-bottom: 3px solid red;
}

.season-predictions-title:hover {
  color: darkred;
}

.season-predictions-container table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.season-predictions-container th, .season-predictions-container td {
  padding: 10px;
  border: 1px solid #ddd;
  text-align: left;
}

.season-predictions-container th {
  background: red;
  color: white;
}

.season-predictions-container input {
  width: 100%;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.season-predictions-container input[disabled] {
  background: #eee;
  cursor: not-allowed;
}








/* Blog Container */
.blog-page {
  padding: 20px;
  max-width: 1000px;
  margin: auto;
}

/* Create Blog Post Section */
.create-blog {
  background: #fff;
  padding: 24px;
  margin-bottom: 30px;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
}

.create-blog h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--f1-red);
  padding-bottom: 6px;
}

.create-blog form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.create-blog input,
.create-blog select,
.create-blog textarea {
  padding: 10px;
  font-size: 15px;
  border-radius: 6px;
  border: 1px solid #ccc;
  width: 100%;
}

.create-blog textarea {
  resize: vertical;
  min-height: 100px;
}

/* Blog Entry */
.blog-entries {
  margin-top: 20px;
}

.blog-entry {
  background: #fff;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.blog-entry h3 {
  font-size: 20px;
  margin-bottom: 6px;
  font-weight: bold;
  color: #111;
  display: flex;
  align-items: center;
  gap: 10px;
}

.blog-meta {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
}

.blog-entry p {
  margin-bottom: 12px;
  line-height: 1.6;
}

/* Blog Actions */
.blog-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.blog-actions .btn-link {
  font-size: 14px;
  font-weight: bold;
  color: var(--f1-red);
  text-decoration: none;
}

.blog-actions .btn-link:hover {
  color: darkred;
  text-decoration: underline;
}

.view-all-btn {
  background: #222;
  color: white;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
}

.view-all-btn:hover {
  background: #444;
}

.topic-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
  margin-right: 10px;
}

/* Topic badge background colors */
.topic-badge.development-update {
  background-color: #007bff;
}

.topic-badge.stats {
  background-color: #28a745;
}

.topic-badge.f1-news {
  background-color: #dc3545;
}

/* Status Alerts */
.success {
  background: #dff0d8;
  color: #3c763d;
  padding: 10px 15px;
  margin-bottom: 15px;
  border-radius: 6px;
  font-weight: bold;
}

.error {
  background: #f2dede;
  color: #a94442;
  padding: 10px 15px;
  margin-bottom: 15px;
  border-radius: 6px;
  font-weight: bold;
}

.table-scroll {
  overflow-x: auto;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.table-scroll table {
  min-width: 400px; /* or 600px, based on your data */
  width: 100%;
}

/* Hide other-user columns by default when .collapsed-tables is set */
.collapsed-tables .other-user {
  display: none;
}

.invite-signup-container {
  max-width: 500px;
  margin: 2rem auto;
  padding: 0 16px;
}


/* Fit-All Columns Mode */
main.fit-all table {
  font-size: 10px;
  transform: scale(0.75);
  transform-origin: top left;
}

main.fit-all select {
  font-size: 10px;
  padding: 4px;
  max-width: 50px;
}

main.fit-all th,
main.fit-all td {
  padding: 4px;
}


main.fit-all {
  overflow-x: auto;
}

main.fit-all .table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* === DASHBOARD FIT MODE (Scoped to #race-weekends only) === */
main.dashboard-fit-all #race-weekends .table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100vw;
}

main.dashboard-fit-all #race-weekends .dashboard-table {
  table-layout: fixed;
  width: 100%;
}

main.dashboard-fit-all #race-weekends .dashboard-table th,
main.dashboard-fit-all #race-weekends .dashboard-table td {
  font-size: 9px; /* ⬅️ reduced slightly */
  padding: 2px 4px; /* ⬅️ tighter spacing */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

/* Optional: shrink dropdowns and buttons inside */
main.dashboard-fit-all #race-weekends select,
main.dashboard-fit-all #race-weekends .btn-link,
main.dashboard-fit-all #race-weekends .race-link-button {
  font-size: 10px;
  padding: 4px 6px;
  max-width: 80px;
}

/* Prevent affecting leaderboard or other sections */
main.dashboard-fit-all .leaderboard-table,
main.dashboard-fit-all .campaign-table,
main.dashboard-fit-all .season-predictions-container table {
  transform: none !important;
  font-size: inherit !important;
  padding: inherit !important;
}

/* Optional: squeeze buttons + select inputs even further */
main.dashboard-fit-all #race-weekends .btn-link,
main.dashboard-fit-all #race-weekends .race-link-button {
  font-size: 9px;
  padding: 2px 4px;
  max-width: 70px;
}

main.dashboard-fit-all #race-weekends select {
  font-size: 9px;
  padding: 2px;
  max-width: 70px;
}



.login-container input[type="text"],
.login-container input[type="email"],
.login-container input[type="password"] {
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 16px;
  width: 100%;
}

.register-wrapper {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  padding: 0 40px;
  margin-bottom: 20px;
}




/* Button consistency */
.btn-grey,
.campaign-action-btn {
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 16px;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  text-decoration: none;
  background-color: #444;
  color: white;
}



.btn-grey:hover {
  background-color: #222;
}


/* ===========================
   COMMENT SYSTEM STYLES
   =========================== */

.comment-thread {
  list-style: none;
  margin: 20px 0 0;
  padding-left: 0;
}

.comment-thread li {
  margin-bottom: 16px;
  padding-left: 16px;
  border-left: 1px solid #ccc;
}

.comment-box {
  background: #fff;
  border-left: 3px solid var(--f1-red);
  padding: 12px 16px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 8px;
  position: relative;
}

.comment-entry {
  margin-bottom: 6px;
}

.comment-entry strong {
  color: #111;
  font-weight: bold;
  font-size: 14px;
}

.comment-entry .comment-date {
  font-size: 12px;
  color: #666;
  margin-left: 8px;
}

.comment-entry p {
  margin: 5px 0 0;
  line-height: 1.5;
  font-size: 14px;
}

.comment-text {
  background: #fafafa;
  padding: 10px 14px;
  border-radius: 6px;
  margin: 6px 0;
  line-height: 1.6;
  font-size: 16px;
}

/* ACTION BUTTONS (Reply, Edit, Delete) */
.comment-entry .comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  justify-content: flex-start;
}

.comment-actions form,
.comment-actions button,
.comment-actions .btn-link {
  display: inline-block;
  width: auto;
}

.comment-actions button,
.comment-actions .btn-link {
  background-color: #fff;
  color: #222;
  border: 1px solid #444;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.comment-actions button:hover,
.comment-actions .btn-link:hover {
  background-color: #f2f2f2;
  color: #000;
}

.comment-actions form.inline-form {
  margin-right: 8px;
}

.comment-actions > *:last-child {
  margin-right: 0 !important;
}

/* TOGGLE REPLIES BUTTON */
.toggle-replies {
  all: unset;
  font-size: 12px;
  font-weight: normal;
  color: #666;
  margin-top: 6px;
  display: inline-block;
  cursor: pointer;
  transition: color 0.2s ease;
}

.toggle-replies:hover {
  color: #000;
  text-decoration: underline;
}

.comment-thread:empty {
  display: none;
}

/* COMMENT FORM */
.comment-form {
  max-width: 600px;
  margin: 0 0 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-form textarea {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
  resize: vertical;
}

.comment-form button {
  align-self: flex-start;
  background-color: #444;
  color: white;
  font-weight: bold;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease;
}

.comment-form button:hover {
  background-color: var(--f1-red);
  color: white;
}

/* CHILD / NESTED COMMENTS */
.comment-children {
  margin-top: 10px;
  padding-left: 16px;
  border-left: 1px solid #ccc;
}

.comment-thread.level-1 { padding-left: 16px; }
.comment-thread.level-2 { padding-left: 24px; }
.comment-thread.level-3 { padding-left: 32px; }
.comment-thread.level-4 { padding-left: 40px; }

/* LEGACY REPLY BUTTON (fallback) */
.reply-btn {
  font-size: 12px;
  color: #444;
  background: none;
  border: 1px solid #ccc;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
}

.reply-btn:hover {
  background-color: #f2f2f2;
  color: #000;
}

/* MOBILE OPTIMIZATION */
@media screen and (max-width: 600px) {
  .comment-box {
    padding: 10px 12px;
  }

  .comment-entry strong {
    font-size: 14px;
  }

  .comment-entry .comment-date {
    font-size: 11px;
    margin-left: 6px;
  }

  .comment-entry p,
  .comment-form textarea {
    font-size: 14px;
  }

  .comment-form button {
    font-size: 13px;
    padding: 6px 12px;
  }

  .toggle-replies {
    font-size: 11px;
  }

  .comment-thread.level-1,
  .comment-thread.level-2,
  .comment-thread.level-3,
  .comment-thread.level-4 {
    padding-left: 12px;
  }
}

/* OVERRIDE generic button spacing */
button:not(.comment-action-button):not(.toggle-replies):not(.btn) {
  font-size: 1rem;
  padding: 6px 14px;
}

/* ✅ Ensures spacing between comment action buttons */
.comment-entry .comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px; /* 🔥 This handles spacing between all buttons */
  margin-top: 6px;
  justify-content: flex-start;
}

/* 👇 Prevents last button from having extra margin */
.comment-actions > *:last-child {
  margin-right: 0 !important;
}

/* Ensure spacing between all buttons and forms inside .comment-actions */
.comment-actions > button,
.comment-actions > form {
  margin-right: 8px;
}

/* Remove extra margin on the last one */
.comment-actions > button:last-child,
.comment-actions > form:last-child {
  margin-right: 0;
}


/* Reusable button style for header + comment actions */
.btn-grey {
  background-color: #444;
  color: white;
  border: none;
  padding: 6px 14px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-grey:hover {
  background-color: var(--f1-red);
  color: white;
}

/* Optional: spacing fix for logout form */
.logout-form {
  display: inline;
  margin-left: 10px;
}


input[type="text"],
textarea {
  font-size: 1rem;
}

.table-scroll {
  overflow-x: auto;
}

.table-scroll table {
  font-size: 0.95rem;
}

.register-wrapper h2 {
  border-bottom: none !important;
  margin-bottom: 20px;
  font-size: 22px;
  color: #222;
}


/* Invite Section Label */
.invite-label {
  font-size: 12px;
  color: #555;
  font-weight: bold;
  margin-bottom: 4px;
  display: block;
}

/* Invite Link Wrapper */
.invite-link-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 6px;
}

/* Invite Input */
.invite-link {
  flex: 1;
  font-family: monospace;
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  min-width: 180px;
  line-height: 1.2;
  box-sizing: border-box;
}

/* Copy Button */
.invite-link-wrapper button {
  font-size: 13px;
  padding: 6px 12px;
  background-color: #fff;
  color: #555;
  border: 1px solid #333;
  border-radius: 4px;
  cursor: pointer;
}

.invite-link-wrapper button:hover {
  background-color: #000;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
  .invite-link-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }

  .invite-link {
    width: 100%;
    font-size: 12px;
  }

  .invite-link-wrapper button {
    width: 100%;
    font-size: 12px;
    padding: 5px 10px;
  }
}




.news-container h2 {
  font-size: 24px;
  font-weight: 700;
  color: #111;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--f1-red);
  padding-bottom: 4px;
}


/* Campaigns Section Container */
.campaigns-container {
  background-color: #fff;
  padding: 24px;
  margin: 30px 0;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.campaigns-container h2 {
  font-size: 24px;
  font-weight: 700;
  color: #111;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--f1-red);
  padding-bottom: 4px;
}

/* Campaign Grid */
.campaigns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

@media (max-width: 768px) {
  .campaigns-grid {
    grid-template-columns: 1fr;
  }
}

/* Campaign Card */
.campaign-card {
  background: white;
  border: 1px solid #eee;
  border-radius: var(--card-radius);
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 260px;
}

/* Campaign Header & Title */
.campaign-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.campaign-header a {
  color: var(--f1-red);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
}

.campaign-header a:hover {
  color: #a30824;
}

/* Campaign Tags */
.campaign-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.campaign-tag {
  background-color: var(--light-grey);
  color: #333;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 600;
  text-transform: uppercase;
}

.campaign-tag.owner    { background-color: #007bff; color: #fff; }
.campaign-tag.participant { background-color: #6c757d; color: #fff; }
.campaign-tag.public   { background-color: #28a745; color: #fff; }
.campaign-tag.private  { background-color: #dc3545; color: #fff; }

/* Campaign Info */
.campaign-details p {
  margin: 3px 0;
  font-size: 14px;
  color: var(--text-grey);
  line-height: 1.4;
}

/* Campaign Actions */
.campaign-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

/* Buttons */
.campaign-action-btn {
  background-color: var(--f1-red);
  color: white;
  font-weight: bold;
  padding: 10px 14px;
  border-radius: 8px;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 14px;
  text-decoration: none;
}

.campaign-action-btn:hover {
  background-color: #a30824;
}

.campaign-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.campaign-buttons .campaign-action-btn {
  background-color: #222;
  font-size: 15px;
  padding: 10px 20px;
  flex: 1 1 200px;
}

.campaign-buttons .campaign-action-btn:hover {
  background-color: var(--f1-red);
}

/* Create Campaign Form */
.create-campaign-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 400px;
  margin: 20px auto 0;
}

.create-campaign-form input,
.create-campaign-form select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
}

.create-campaign-form label {
  font-weight: bold;
  color: #333;
}

/* Login Prompt (for invite landing) */
.campaign-login-prompt {
  font-size: 16px;
  line-height: 1.5;
  padding: 10px 0;
  color: #333;
}

.campaign-login-prompt a {
  font-weight: bold;
  color: var(--f1-red);
  text-decoration: none;
}

.campaign-login-prompt a:hover {
  text-decoration: underline;
}


.success-message {
  background: #e6ffed;
  border: 1px solid #b2e7c6;
  color: #14532d;
  padding: 20px;
  margin-bottom: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.success-message ul {
  margin: 12px 0 16px 0;
  padding-left: 20px !important;
  list-style: disc !important;
  list-style-position: outside !important;
}

.success-message li {
  margin-bottom: 6px;
  padding-left: 0;
  line-height: 1.6;
  font-size: 15px;
}

.success-message li::marker {
  display: inline !important;	
  font-size: 16px;
  color: #444;
}


.dashboard-tooltip {
  background: #eef2f4;
  border-left: 4px solid #0b74de;
  padding: 16px;
  margin-bottom: 20px;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  cursor: default;
}

.dashboard-tooltip .tooltip-icon {
  cursor: pointer;
  flex-shrink: 0;
  color: #0b74de;
  z-index: 2;
}

.dashboard-tooltip .tooltip-text {
  flex-grow: 1;
}

.dashboard-tooltip.collapsed {
  padding: 6px 10px;
}

.dashboard-tooltip.collapsed .tooltip-text {
  display: none;
}

.dashboard-tooltip svg {
  pointer-events: all; /* Ensure SVG is clickable */
}



.tooltip-text p {
  margin: 0 0 8px;
  line-height: 1.5;
}

.tooltip-text p:last-child {
  margin-bottom: 0;
}

.tooltip-icon {
  color: var(--f1-red);
  min-width: 22px;
  margin-top: 2px;
    cursor: pointer;
  pointer-events: auto;
}

.prediction-tooltip {
  background: #eef2f4;
  border-left: 4px solid #0b74de;
  padding: 16px;
  margin-bottom: 20px;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  cursor: default;
}

.prediction-tooltip .tooltip-icon {
  cursor: pointer;
  flex-shrink: 0;
  color: #0b74de;
  z-index: 2;
}

.tooltip-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: none;
  font-size: 18px;
  font-weight: bold;
  color: #888;
  cursor: pointer;
}

.tooltip-close:hover {
  color: #000;
}

.prediction-tooltip.collapsed .tooltip-text {
  display: none;
}

.leave-campaign-btn {
  background-color: #b00020;
  color: white;
  font-weight: bold;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  margin-top: 20px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.leave-campaign-btn:hover {
  background-color: #7a0015;
}

.header-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.logout-form {
  margin: 0;
}

a.btn-grey,
button.btn-grey {
  all: unset; /* ← resets native styles */
  background-color: #444;
  color: white;
  font-size: 16px;
  font-weight: bold;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  border: none;
  transition: background 0.2s ease, color 0.2s ease;
}

a.btn-grey:hover,
button.btn-grey:hover {
  background-color: var(--f1-red);
  color: white;
}

.invite-link-wrapper .btn-grey {
  background-color: #fff !important;
  color: #555 !important;
  border: 1px solid #333;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 4px;
}

.invite-link-wrapper .btn-grey:hover {
  background-color: #000 !important;
  color: white !important;
}

.blog-snippet h2,
.blog-snippet h3 {
  font-size: 1.1rem;
  font-weight: bold;
  margin-top: 10px;
}

.blog-snippet p {
  margin-bottom: 8px;
  line-height: 1.5;
}

.blog-snippet ul,
.blog-snippet ol {
  padding-left: 20px;
  margin-bottom: 10px;
}

.blog-snippet li {
  margin-bottom: 4px;
}

.blog-content h2 {
  font-size: 1.4rem;
  color: #111;
  margin-top: 1.2rem;
  margin-bottom: 0.6rem;
  border-bottom: 2px solid var(--f1-red);
  padding-bottom: 4px;
  font-weight: 700;
}

.blog-content ul {
  margin: 1rem 0 1.5rem 1.5rem;
  padding-left: 1.2rem;
  list-style-type: disc;
}

.blog-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
  margin: 1rem 0;
}

.blog-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: #111;
}

.blog-content h3, .blog-content h4 {
  font-size: 1.3rem;
  font-weight: bold;
  color: #111;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.blog-content h2 {
  font-size: 1.3rem;
  font-weight: bold;
  color: #111;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Blog title container */
.blog-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Badge */
.blog-title .topic-badge {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 6px;
}

/* Blog title link */
.blog-title .blog-link {
  color: #222; /* or use your existing text color */
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.blog-title .blog-link:hover {
  color: #800000; /* your burgundy highlight */
  text-decoration: underline;
}

.blog-title .blog-link:focus {
  outline: 2px solid #800000;
  outline-offset: 2px;
}

.edit-blog form {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.edit-blog h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  border-bottom: 3px solid #a00;
  display: inline-block;
  padding-bottom: 0.3rem;
}

.edit-blog label {
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.edit-blog input[type="text"],
.edit-blog select,
.edit-blog textarea {
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
}

.edit-blog button {
  align-self: flex-start;
  padding: 0.5rem 1.25rem;
}

.edit-blog .btn-danger {
  background: #a00;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1.25rem;
}

.blog-snippet {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
  line-height: 1.6em;
  font-size: 0.95rem;
  padding-bottom: 1.2em;
}

/* Optional: Fade-out effect */
.blog-snippet::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 1.2em;
  width: 100%;
  background: linear-gradient(to bottom, transparent, white);
}

.btn-white-outline {
  font-size: 13px;
  padding: 6px 12px;
  background-color: #fff;
  color: #555;
  border: 1px solid #333;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-white-outline:hover {
  background-color: #000;
  color: #fff;
}
body.home .blog-title {
  border-bottom: none !important;
}

tr.gold    { background-color: #fff8dc !important; }  /* light gold */
tr.silver  { background-color: #f0f0f0 !important; }  /* light silver */
tr.bronze  { background-color: #fce8d5 !important; }  /* light bronze */

h1.blog-title {
  font-size: 1.8rem; /* ~35px */
  line-height: 1.3;
  margin: 28px 0 18px;
  border-bottom: 2px solid var(--f1-red);
  padding: 0px
}

.blog-content h4 {
  font-size: 1.1rem; /* currently too close to h2/h3 */
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.blog-snippet h2,
.blog-snippet h3,
.blog-snippet h4 {
  font-size: 1rem;
  font-weight: bold;
  margin-top: 10px;
}

.notification-wrapper {
  position: relative;
  display: inline-block;
}

.notification-wrapper .notification-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  width: 280px;
  z-index: 999;
}

.notification-wrapper:hover .notification-dropdown {
  display: block;
}

.notification-item.unread {
  font-weight: bold;
  background-color: #f9f9f9;
}

.notification-item.read {
  color: #666;
}

.notification-wrapper a i {
  display: inline-block;
  width: 18px;
  height: 18px;
}

