:root {
    --primary: #CC3300;
    --secondary: #445DA0;
    --bg: #000000;
    --text: #ffffff;
    --accent: #ff6600;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}
header {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 4px solid var(--primary);
}
.banner img {
    max-width: 90%;
    height: auto;
    margin: 1rem 0;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}
nav.fd-sidebar {
    flex: 0 0 220px;
    background: rgba(68, 93, 160, 0.2);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--secondary);
}
nav.fd-sidebar a {
    display: block;
    color: var(--text);
    text-decoration: none;
    padding: 0.8rem 1rem;
    margin: 0.5rem 0;
    border-radius: 6px;
    transition: all 0.3s;
}
nav.fd-sidebar a:hover,
nav.fd-sidebar a.active {
    background: var(--primary);
    color: white;
}
.fd-sidebar-rules {
    margin: 0.5rem 0;
    border-radius: 6px;
}
.fd-sidebar-rules summary {
    display: block;
    color: var(--text);
    padding: 0.8rem 1rem;
    margin: 0;
    border-radius: 6px;
    cursor: pointer;
    list-style: none;
    transition: all 0.3s;
    user-select: none;
}
.fd-sidebar-rules summary::-webkit-details-marker {
    display: none;
}
.fd-sidebar-rules summary::after {
    content: '▸';
    float: right;
    opacity: 0.75;
    transition: transform 0.2s;
}
.fd-sidebar-rules[open] summary::after {
    transform: rotate(90deg);
}
.fd-sidebar-rules summary:hover,
.fd-sidebar-rules--active summary {
    background: var(--primary);
    color: white;
}
.fd-sidebar-submenu {
    padding: 0.15rem 0 0.35rem;
}
.fd-sidebar-submenu a {
    padding: 0.55rem 1rem 0.55rem 1.35rem;
    margin: 0.2rem 0;
    font-size: 0.92rem;
}
main {
    flex: 1;
    min-width: 300px;
}
.welcome {
    background: rgba(204, 51, 0, 0.1);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}
.welcome h2 {
    color: var(--primary);
    margin-bottom: 1rem;
}
.welcome h3 {
    color: var(--accent);
    margin: 1.5rem 0 0.75rem;
}
.welcome ul,
.welcome ol {
    margin: 0.75rem 0 0.75rem 1.5rem;
}
.welcome li {
    margin: 0.4rem 0;
}
.variation-list {
    margin-top: 1.25rem;
}
.variation-list li {
    margin: 0.65rem 0;
    line-height: 1.5;
}
.sidebar {
    flex: 0 0 350px;
    background: rgba(68, 93, 160, 0.15);
    border: 1px solid var(--secondary);
    border-radius: 12px;
    padding: 1.5rem;
}
.sidebar h3 {
    color: var(--secondary);
    margin-bottom: 1rem;
    text-align: center;
}
.featured a {
    display: block;
}
.featured img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}
.featured p {
    text-align: center;
    font-style: italic;
    margin-top: 0.5rem;
}
.fd-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background 0.3s;
}
.fd-btn:hover {
    background: var(--accent);
    color: #fff;
}
.fd-btn--secondary {
    background: var(--secondary);
}
.fd-btn--secondary:hover {
    background: #5a75b8;
}
.fd-btn--small {
    margin-top: 0;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}
.fd-clubs-status {
    margin: 1rem 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.75);
}
.fd-clubs-status--error {
    color: #ff8888;
    font-style: normal;
}
.fd-club-list {
    display: grid;
    gap: 1.25rem;
    margin: 1.5rem 0;
}
.fd-club-card {
    background: rgba(68, 93, 160, 0.12);
    border: 1px solid var(--secondary);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
}
.fd-club-card-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.fd-club-badge {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.4);
}
.fd-club-card h3 {
    color: var(--accent);
    margin: 0;
}
.fd-club-meta {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}
.fd-club-desc {
    margin: 0.5rem 0 1rem;
    line-height: 1.5;
}
.fd-club-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.fd-clubs-footnote {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
}
.fd-club-card--joined {
    border-color: #3a9e3a;
    box-shadow: 0 0 0 1px rgba(58, 158, 58, 0.35);
}
.fd-club-joined {
    display: inline-block;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    background: rgba(58, 158, 58, 0.25);
    border: 1px solid #3a9e3a;
    color: #9fdf9f;
    font-weight: bold;
}
.fd-club-pending {
    color: var(--accent);
    font-style: italic;
    margin-right: 0.5rem;
}
.fd-club-note {
    color: rgba(255, 255, 255, 0.65);
    font-style: italic;
}
.fd-btn--disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.fd-btn--disabled:hover {
    background: var(--primary);
}
.fd-auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}
.fd-auth-overlay[hidden] {
    display: none;
}
body.fd-auth-open {
    overflow: hidden;
}
.fd-auth-modal {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: #111;
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 1.75rem;
    color: var(--text);
}
.fd-auth-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}
.fd-auth-title {
    margin: 0 0 1rem;
    color: var(--primary);
    text-align: center;
}
.fd-auth-hint {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin: -0.25rem 0 0.75rem;
}
.fd-auth-error {
    color: #ff8888;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}
.fd-auth-form input {
    width: 100%;
    padding: 0.65rem 0.75rem;
    margin: 0.4rem 0;
    border: 1px solid var(--secondary);
    border-radius: 6px;
    background: #000;
    color: var(--text);
    box-sizing: border-box;
}
.fd-auth-form .fd-btn {
    width: 100%;
    margin-top: 0.75rem;
    border: none;
    cursor: pointer;
}
.fd-auth-toggle {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.9rem;
}
.fd-auth-link {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
    font: inherit;
}
.fd-home-auth {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0;
}
.fd-home-auth .fd-btn {
    border: none;
    cursor: pointer;
}
.fd-user-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    width: 100%;
}
.fd-user-welcome {
    color: rgba(255, 255, 255, 0.9);
}
.fd-user-welcome strong {
    color: var(--accent);
}
.fd-user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.sidebar [data-fd-auth-nav] {
    margin: 0;
}
.fd-join-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0 1rem;
}
.fd-join-actions .fd-btn {
    margin-top: 0;
    border: none;
    cursor: pointer;
    font: inherit;
}
.fd-join-note {
    margin-top: 1.25rem;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.75);
}
.fd-about-lead {
    font-size: 1.05rem;
    line-height: 1.65;
}
.fd-about-story,
.fd-about-now,
.fd-about-feedback {
    margin-bottom: 1.5rem;
}
.fd-about-story h3,
.fd-about-now h3,
.fd-about-feedback h3 {
    margin-top: 0;
}
.fd-about-highlights {
    margin: 1rem 0 1.25rem 1.35rem;
}
.fd-about-highlights li {
    margin: 0.5rem 0;
    line-height: 1.5;
}
.fd-leagues-compare h3 {
    margin-top: 0;
}
.fd-compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin: 1.25rem 0;
}
.fd-compare-card {
    background: rgba(68, 93, 160, 0.12);
    border: 1px solid var(--secondary);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
}
.fd-compare-card h4 {
    color: var(--accent);
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
}
.fd-compare-tagline {
    font-style: italic;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 0.85rem;
    font-size: 0.92rem;
}
.fd-compare-card ul {
    margin: 0 0 1rem 1.15rem;
}
.fd-compare-card li {
    margin: 0.45rem 0;
    line-height: 1.5;
}
.fd-compare-note {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}
.fd-leagues-footnote {
    margin-top: 1.25rem;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.55;
}
.fd-history-lead {
    font-size: 1.05rem;
    line-height: 1.65;
}
.fd-history-grid {
    display: grid;
    gap: 1.75rem;
    margin-bottom: 2rem;
}
.fd-history-card {
    display: grid;
    grid-template-columns: minmax(200px, 280px) 1fr;
    gap: 1.5rem;
    background: rgba(68, 93, 160, 0.12);
    border: 1px solid var(--secondary);
    border-radius: 12px;
    overflow: hidden;
}
.fd-history-card-media {
    background: rgba(0, 0, 0, 0.45);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fd-history-card-media img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    display: block;
}
.fd-history-card-media a {
    display: block;
    transition: transform 0.2s;
}
.fd-history-card-media a:hover img {
    transform: scale(1.02);
}
.fd-history-card-body {
    padding: 1.5rem 1.5rem 1.5rem 0;
}
.fd-history-card-body h3 {
    color: var(--accent);
    margin: 0.35rem 0 0.5rem;
    font-size: 1.35rem;
}
.fd-history-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.fd-history-badge--closed {
    background: rgba(204, 51, 0, 0.25);
    border: 1px solid var(--primary);
    color: #ffaa88;
}
.fd-history-tagline {
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 0.75rem;
}
.fd-history-card-body p {
    margin: 0.5rem 0;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
}
.fd-history-meta {
    margin-top: 1rem !important;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.55) !important;
}
.fd-history-meta a {
    color: var(--accent);
}
nav.fd-sidebar a[data-fd-sidebar-login] {
    cursor: pointer;
}
.sidebar .fd-user-bar {
    flex-direction: column;
    align-items: flex-start;
}
footer {
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.8);
    border-top: 2px solid var(--primary);
    margin-top: auto;
    font-size: 0.9rem;
}
@media (max-width: 768px) {
    .container { flex-direction: column; }
    nav.fd-sidebar, .sidebar { flex: 1 1 auto; }
    .fd-history-card {
        grid-template-columns: 1fr;
    }
    .fd-history-card-body {
        padding: 0 1.25rem 1.25rem;
    }
}