/* Football Coaches Assistant Style Guide
   Colors:
   - Royal Blue: #4169e1
   - White: #ffffff
   - Text: #222222
   Font: Arial, sans-serif
*/
body { font-family: Arial, sans-serif; margin: 0; padding: 0; background: #fff; color: #222; }
header { background: #4169e1; color: #fff; padding: 1rem; text-align: center; position: relative; z-index: 3; }
nav {
    background: #4169e1;
    color: #fff;
    padding: 0.5rem;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    position: relative;
    z-index: 3;
}
nav a {
    color: #fff;
    margin: 0 0.5rem;
    text-decoration: none;
    font-weight: bold;
}
nav a:hover { text-decoration: underline; }
main {
    max-width: 800px;
    margin: 2rem auto;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(65,105,225,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}
section {
    margin-bottom: 2rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
h2 {
    color: #4169e1;
    text-align: center;
}
#style-guide { max-width:800px; margin:2rem auto; background:#f9f9f9; padding:2rem; border-radius:8px; box-shadow:0 2px 8px rgba(65,105,225,0.05); }
#style-guide h2 { color:#4169e1; }
#style-guide ul { list-style: disc inside; }
#style-guide button { background:#4169e1;color:#fff;border:none;padding:0.5rem 1rem;border-radius:4px;font-weight:bold; }
.main-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 600px;
    margin: 2rem auto 2.5rem auto;
}
.main-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    min-height: 120px;
    height: 140px;
    text-align: center;
    background: #4169e1;
    color: #fff;
    font-size: 1.3rem;
    font-weight: bold;
    padding: 1.2rem 2.2rem;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(65,105,225,0.18), 0 1.5px 0 #27408b;
    text-decoration: none;
    transition: transform 0.08s, box-shadow 0.08s;
    margin: 0.5rem 0;
}
.main-link-btn:hover, .main-link-btn:focus {
    background: #27408b;
    color: #fff;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 24px rgba(65,105,225,0.22), 0 2px 0 #27408b;
}
.game-schedule-table {
    margin: 0 auto;
    border-collapse: collapse;
    width: 100%;
    max-width: 600px;
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(65,105,225,0.08);
}
.game-schedule-table th, .game-schedule-table td {
    padding: 0.75rem 1rem;
    text-align: center;
}
.game-schedule-table th {
    background: #4169e1;
    color: #fff;
}
.game-schedule-table tr:nth-child(even) {
    background: #eaf0fa;
}

/* Background cycling spots */
.bg-container { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-spot { position: absolute; width: 140px; height: 140px; border-radius: 16px; transition: left 12s ease, top 12s ease, transform 3s ease, opacity 0.9s ease; opacity: 1; transform: translateY(0) scale(1); pointer-events: none; }
.bg-spot img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; display: block; }
@keyframes floaty {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
  100% { transform: translateY(0px); }
}
.bg-spot { animation: floaty 14s ease-in-out infinite; }

/* Ensure main site content sits above the background spots */
header { position: relative; z-index: 3; }
nav { position: relative; z-index: 3; }
main { position: relative; z-index: 2; }

/* Slightly dim spots on small screens and reduce size */
@media (max-width: 900px) {
  .bg-spot { width: 110px; height: 110px; opacity: 0.95; }
}
@media (max-width: 600px) {
  .bg-spot { width: 80px; height: 80px; opacity: 0.9; }
}

/* Calendar styles */
.calendar-wrapper { max-width: 760px; margin: 1.5rem auto; padding: 1rem; border-radius: 8px; background: #fff; box-shadow: 0 2px 8px rgba(65,105,225,0.06); }
.calendar { width: 100%; border-collapse: collapse; table-layout: fixed; }
.calendar th, .calendar td { border: 1px solid #e6eefc; padding: 0; vertical-align: top; width: calc(100% / 7); box-sizing: border-box; }
/* Use padding-top trick to force square cells; children are positioned inside */
.calendar td { background: #fbfdff; position: relative; }
.calendar td::before { content: ''; display: block; padding-top: 100%; }
/* Place date and event content absolutely within the square cell */
.calendar td > .date, .calendar td > .event { position: absolute; left: 8px; right: 8px; }
.calendar td > .date { top: 8px; display: block; font-weight: 700; color: #27408b; margin: 0 0 6px 0; }
.calendar td > .event { top: 36px; bottom: 8px; overflow: auto; display: flex; align-items: flex-start; gap: 8px; background: #4169e1; color: #fff; padding: 8px 10px; border-radius: 6px; font-size: 0.92rem; text-decoration: none; white-space: normal; line-height: 1.2; word-break: break-word; flex-wrap: wrap; }
.calendar td.empty { background: transparent; }
.calendar th { background: #4169e1; color: #fff; font-weight: 700; }

.calendar .event::before { content: ''; display: none; }

@media (max-width: 640px) {
  .calendar th, .calendar td { padding: 6px; }
  .calendar td::before { padding-top: 100%; }
  .calendar td > .event { font-size: 0.85rem; }
}

/* Ensure main headings are centered by default */
h1 {
  text-align: center;
}

/* Playbook link styles used for linked cards/buttons */
.link-container { display:flex; gap:0.75rem; justify-content:center; margin-top:1rem; }
.link-card { background:#f8fafc; border:1px solid #e6eefc; padding:0.75rem 1rem; border-radius:8px; font-weight:700; color:#2563eb; text-decoration:none; display:inline-block; }
.link-card:hover { background:#eef2ff; }

/* Primary variant: blue background with white text */
.link-card.primary { background: #27408b; color: #ffffff; border-color: #27408b; }
.link-card.primary a { color: #ffffff; text-decoration: none; }
.link-card.primary:hover { background: #1f3570; }
