/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --ink: #1e1a17;
    --muted-ink: #4a4139;
    --canvas: #f4efe5;
    --card: #fffaf3;
    --border: #d6c6a3;
    --accent: #b47b37;
    --accent-strong: #8f5d26;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--ink);
    background: var(--canvas);
    min-height: 100vh;
}

a {
    color: inherit;
}

/* Layout */
.container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #1b1916;
    color: #f8f4ec;
    padding: 1rem 0;
    border-bottom: 1px solid #2c2823;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.logo .subtitle {
    font-size: 1rem;
    color: #d6c6a3;
    margin-left: 0.4rem;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.2rem;
}

.main-nav a {
    color: #f8f4ec;
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: 10px;
    transition: background 0.2s ease, color 0.2s ease;
    font-weight: 600;
}

.main-nav a:hover,
.main-nav a.active {
    background: rgba(214, 198, 163, 0.18);
    color: #fdfaf5;
}

/* Events Section */
.events-section {
    padding: 2rem 0 3rem;
}

.events-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.events-header h2 {
    font-size: 2.2rem;
    margin-bottom: 0.35rem;
    color: var(--ink);
    font-weight: 700;
}

.events-header .emoji {
    display: none;
}

.events-subtitle {
    font-size: 1.05rem;
    color: var(--muted-ink);
}

/* Game Navigation */
.game-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.8rem;
    border-radius: 10px;
    border: 1px solid #d2c2a2;
    background: #e8dcc3;
    color: var(--ink);
    font-weight: 600;
    cursor: pointer;
}

.nav-toggle-icon {
    font-size: 1.05rem;
}

.game-nav {
    background: var(--card);
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(24, 20, 17, 0.06);
    overflow-x: auto;
    border: 1px solid var(--border);
    flex: 1;
}

.game-nav-container {
    display: flex;
    padding: 0.45rem 0.65rem;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.game-link {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    background: #b47b37;
    color: #ffffff;
    text-decoration: none;
    border-radius: 9px;
    border: 1px solid #b47b37;
    transition: all 0.18s ease;
    white-space: nowrap;
    font-size: 0.86rem;
    font-weight: 600;
}

.game-link:hover,
.game-link.active {
    background: #8f5d26;
    border-color: #8f5d26;
    color: #ffffff;
}

/* Calendar Container */
.calendar-container {
    background: var(--card);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(24, 20, 17, 0.08);
    padding: 1.25rem 1.5rem 1.5rem;
    margin-bottom: 1.75rem;
    overflow-x: auto;
    border: 1px solid var(--border);
}

/* FullCalendar Overrides */
#calendar {
    max-width: 100%;
}

.fc {
    font-family: inherit;
}

.fc .fc-view-harness {
    min-height: 760px;
}

.fc-button {
    background: #e8dcc3 !important;
    border: 1px solid #d2c2a2 !important;
    color: var(--ink) !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.fc-button:hover {
    background: #dccaab !important;
    border-color: var(--accent) !important;
}

.fc-toolbar-title {
    color: var(--ink);
    font-weight: 700;
}

.fc-day-today {
    background-color: #f5ead3 !important;
}

.fc-daygrid-day-number {
    color: var(--muted-ink);
    font-weight: 600;
}

.fc-daygrid-event {
    margin: 1px 0;
}

.fc-event {
    border-radius: 7px;
    border: 1px solid rgba(24, 20, 17, 0.08) !important;
    padding: 2px 4px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #1a1613;
    box-shadow: 0 3px 8px rgba(24, 20, 17, 0.08);
    overflow: hidden;
}

.fc-event-main {
    color: inherit;
}

.fc-event.special-event {
    background: #fff3d6 !important;
    border-color: #f0c46b !important;
    box-shadow: 0 4px 10px rgba(240, 196, 107, 0.35);
}

.fc-event.special-event .event-game-tag {
    background: #f0c46b !important;
    border-color: #f0c46b !important;
    color: #4a3410 !important;
}

.fc-event-inner {
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
}

.event-game-tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 0.7rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #ffffff;
    line-height: 1.1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-title {
    font-weight: 700;
    line-height: 1.1;
    font-size: 0.86rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-time {
    font-size: 0.76rem;
    color: var(--muted-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Today's Events */
.todays-events {
    background: var(--card);
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(24, 20, 17, 0.08);
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    margin-bottom: 1.25rem;
}

.todays-events h3 {
    color: var(--ink);
    margin-bottom: 0.6rem;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
}

.events-list {
    min-height: 80px;
}

.no-events {
    color: var(--muted-ink);
    font-style: italic;
    text-align: center;
    padding: 1rem 0;
}

.event-item {
    background-color: #f6f0e3;
    padding: 0.75rem;
    margin-bottom: 0.65rem;
    border-radius: 8px;
    border: 1px solid #e3d6bf;
}

.event-item h4 {
    margin-bottom: 0.25rem;
    color: var(--ink);
    font-size: 1rem;
}

.event-item p {
    margin-bottom: 0.2rem;
    color: var(--muted-ink);
    font-size: 0.88rem;
}

.event-date {
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
}

.event-item i {
    color: var(--accent-strong);
}

.signup-link {
    display: inline-block;
    margin-top: 0.35rem;
    color: var(--accent-strong);
    font-weight: 700;
    text-decoration: none;
}

.signup-link:hover {
    text-decoration: underline;
}

/* Tooltip */
.event-tooltip {
    position: absolute;
    z-index: 9999;
    background: #ffffff;
    border: 1px solid #d9c9a9;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    box-shadow: 0 12px 32px rgba(24, 20, 17, 0.18);
    max-width: 280px;
    min-width: 220px;
    color: var(--ink);
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.event-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.event-tooltip h4 {
    margin-bottom: 0.35rem;
    font-size: 1rem;
    font-weight: 700;
}

.event-tooltip p {
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    color: var(--muted-ink);
}

.event-tooltip .tooltip-link {
    color: var(--accent-strong);
    font-weight: 700;
    text-decoration: none;
}

.event-tooltip .tooltip-link:hover {
    text-decoration: underline;
}

/* Special Events */
.special-mobile {
    display: block;
    background: var(--card);
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(24, 20, 17, 0.08);
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border);
    margin: 1.25rem 0 0;
}

.special-mobile h3 {
    color: var(--ink);
    margin-bottom: 0.75rem;
    font-size: 1.35rem;
    font-weight: 700;
}

.special-list .event-item {
    margin-bottom: 0.75rem;
}

/* Footer */
.footer {
    background: #1b1916;
    color: #f8f4ec;
    padding: 2rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.footer-section h4 {
    margin-bottom: 0.6rem;
    font-size: 1.05rem;
    color: #fdfaf5;
}

.footer-section p,
.footer-section ul {
    color: #d6c6a3;
    font-size: 0.95rem;
}

.footer-section ul {
    list-style: none;
    padding-left: 0;
}

.footer-section li {
    margin-bottom: 0.35rem;
}

.footer-section a {
    color: #fdfaf5;
    text-decoration: none;
}

.footer-section a:hover {
    color: #d6c6a3;
}

.footer-bottom {
    text-align: center;
    margin-top: 1.5rem;
    color: #c7b89b;
    font-size: 0.9rem;
}

.footer .mission {
    margin-top: 0.35rem;
    color: #bba984;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav ul {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .game-nav-wrapper {
        position: relative;
    }

    .events-header h2 {
        font-size: 2rem;
    }

    .game-nav-container {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .game-link {
        padding: 0.45rem 0.8rem;
        font-size: 0.85rem;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .game-nav {
        display: none;
        width: 100%;
        max-height: 60vh;
        overflow-y: auto;
        padding: 0.4rem;
    }

    .game-nav.open {
        display: block;
    }

    .game-nav-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 0.35rem;
    }

    .game-link {
        width: 100%;
        text-align: center;
        padding: 0.5rem 0.65rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .calendar-container {
        display: none;
    }

    .todays-events {
        display: block;
        margin-bottom: 1.25rem;
        padding: 1.25rem 1.1rem;
    }

    .todays-events h3 {
        text-align: left;
        margin-bottom: 0.8rem;
    }

    .events-list .event-item:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
    }

    .main-nav li {
        text-align: center;
    }

    .game-nav-container {
        flex-direction: column;
        align-items: center;
    }

    .game-link {
        width: 100%;
        text-align: center;
        max-width: 220px;
    }

    .calendar-container {
        padding: 0.75rem;
    }
}
