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

/* Base Body Styling & Typography */
body {
  background-color: #faf8f5; /* Warm, soft cream background */
  color: #2d3748; /* Slate text for comfortable reading */
  line-height: 1.6;
  font-family:
    "Nunito",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
}

/* Bold display font for headings and hero titles */
h1,
h2,
h3,
.logo span {
  font-family:
    "Fredoka",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  letter-spacing: -0.02em;
}

/* Form controls inherit body font */
button,
input,
select,
textarea,
.btn {
  font-family: inherit;
}

/* Navigation Bar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #503090;
  color: white;
  padding: 1rem 2rem;
  border-bottom: 3px solid #d69e2e; /* Warm gold accent */
}

.navbar .logo {
  font-size: 1.25rem;
  font-weight: bold;
}

.navbar nav a {
  color: #e2e8f0;
  text-decoration: none;
  margin-left: 1.5rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.navbar nav a:hover {
  color: #d69e2e;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* Space between tile icon and text */
}

.nav-icon {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 6px;
  vertical-align: middle;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #c8b6e2, #503090);
  color: white;
  text-align: center;
  padding: 2rem 1rem;
}

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.hero p {
  color: #e2e8f0;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* Main Container & General Cards */
.container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

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

.card h2 {
  color: #503090;
  margin-bottom: 1rem;
  border-bottom: 2px solid #edf2f7;
  padding-bottom: 0.5rem;
}

.post {
  margin-bottom: 1.2rem;
}

.post:last-child {
  margin-bottom: 0;
}

.post .date {
  font-size: 0.85rem;
  color: #6b4693;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post h3 {
  font-size: 1.15rem;
  margin: 0.2rem 0;
  color: #1a202c;
}

/* Responsive Table Wrapper */
.table-container {
  overflow-x: auto;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
}

.schedule-table th {
  background-color: #f7fafc;
  color: #4a5568;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.schedule-table th,
.schedule-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #edf2f7;
}

/* Generic Badges & Buttons */
.badge {
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  display: inline-block;
}

.badge.active {
  background-color: #c6f6d5;
  color: #22543d;
}

.badge.pending {
  background-color: #feebc8;
  color: #744210;
}

.btn {
  display: inline-block;
  background-color: #503090;
  color: white;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 0.75rem;
  transition:
    background-color 0.2s ease,
    transform 0.1s ease;
}

.btn:hover {
  background-color: #3f2573;
  transform: translateY(-1px);
}

ul {
  padding-left: 1.2rem;
}

li {
  margin-bottom: 0.6rem;
}

footer {
  text-align: center;
  padding: 1.5rem 1rem;
  color: #4a5568;
  font-size: 0.9rem;
}

/* Email Anti-Spambot Reversal */
.email-reverse {
  unicode-bidi: bidi-override;
  direction: rtl;
  display: inline-block;
}

/* Schedule Container & Layout */
#schedule-display {
  max-width: 700px;
  margin: 2rem auto;
  text-align: left;
}

/* Month Cards (Current Month & Accordions) */
.month-block,
.month-accordion {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  overflow: hidden;
  transition: all 0.2s ease-in-out;
}

.month-block {
  padding: 1.25rem;
}

.month-title {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: #1e293b;
  border-bottom: 2px solid #edf2f7;
  padding-bottom: 0.5rem;
}

/* Accordion Specific Styling */
.month-accordion[open] {
  border-color: #cbd5e1;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.accordion-header {
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
  background-color: #f8fafc;
  display: flex;
  align-items: center;
  transition: background-color 0.15s ease;
}

.accordion-header:hover {
  background-color: #f1f5f9;
}

.accordion-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1e293b;
}

/* List Items Inside Schedule Cards */
.status-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.month-accordion .status-list {
  padding: 1rem 1.25rem;
}

.game-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.game-item:last-child {
  border-bottom: none;
}

.game-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.game-date {
  font-size: 1rem;
  color: #4a5568;
}

.game-host {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

/* Dynamic Schedule Status Badges */
.status-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 9999px;
  text-align: center;
  white-space: nowrap;
}

.badge-confirmed {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-host {
  background-color: #ffedd5;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.badge-pending {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.community-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .community-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.community-card h2 {
  margin-bottom: 0.35rem;
  font-size: 1.25rem;
  border-bottom: none;
  padding-bottom: 0;
}

.community-card p {
  color: #4a5568;
  font-size: 0.95rem;
  margin: 0;
}

.community-card .btn {
  margin-top: 0;
  white-space: nowrap;
}
