/* ── Mahjong France — Global Styles ───────────────────────────────────────── */

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0d2016; }
::-webkit-scrollbar-thumb { background: #2a5a3a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #c9a84c; }

/* ── Body & background ────────────────────────────────────────────────────── */
body {
    font-family: 'Nunito', 'Roboto', sans-serif;
    background-color: #1a3a2a;
    background-image:
        radial-gradient(ellipse at 15% 85%, rgba(201, 168, 76, 0.04) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 15%, rgba(139, 26, 26, 0.04) 0%, transparent 45%);
    min-height: 100vh;
}

/* Override MudBlazor default Roboto with Nunito */
.mud-typography,
.mud-input,
.mud-select,
.mud-nav-link,
.mud-list-item,
.mud-table-cell,
.mud-button-root,
.mud-chip-text {
    font-family: 'Nunito', 'Roboto', sans-serif !important;
}

/* ── Brand title ──────────────────────────────────────────────────────────── */
.brand-title {
    font-family: 'Cinzel', Georgia, serif !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em;
    color: #c9a84c !important;
}

/* ── MudBlazor overrides ──────────────────────────────────────────────────── */

/* Appbar border */
.mud-appbar {
    border-bottom: 1px solid rgba(201, 168, 76, 0.2) !important;
}

/* Drawer border */
.mud-drawer {
    border-right: 1px solid rgba(201, 168, 76, 0.15) !important;
}

/* Drawer content: column from top, scrollable */
.mud-drawer-content {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    overflow: hidden !important;
}

/* NavMenu active item */
.mud-nav-link.active {
    background: rgba(201, 168, 76, 0.12) !important;
    border-left: 3px solid #c9a84c;
    color: #c9a84c !important;
}

.mud-nav-link:hover {
    background: rgba(201, 168, 76, 0.06) !important;
}

/* Cards */
.mud-card {
    border: 1px solid rgba(201, 168, 76, 0.12) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.mud-card:hover {
    transform: translateY(-2px);
    border-color: rgba(201, 168, 76, 0.3) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

/* Paper */
.mud-paper {
    border: 1px solid rgba(201, 168, 76, 0.1) !important;
}

/* Tables */
.mud-table-mahjong .mud-table-head th {
    background: #0d2016 !important;
    color: #c9a84c !important;
    font-family: 'Nunito', 'Roboto', sans-serif !important;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(201, 168, 76, 0.3) !important;
}

.mud-table-mahjong .mud-table-row:hover td {
    background: rgba(201, 168, 76, 0.05) !important;
}

/* Chips */
.mud-chip {
    font-family: 'Nunito', 'Roboto', sans-serif !important;
    font-size: 0.75rem !important;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Buttons */
.mud-button-filled {
    letter-spacing: 0.08em;
}

/* Inputs */
.mud-input-outlined .mud-input-outlined-border {
    border-color: rgba(201, 168, 76, 0.3) !important;
}

.mud-input-outlined:hover .mud-input-outlined-border {
    border-color: rgba(201, 168, 76, 0.6) !important;
}

.mud-input-outlined.mud-input-root-focused .mud-input-outlined-border {
    border-color: #c9a84c !important;
}

/* ── Hero section (landing page) ─────────────────────────────────────────── */
.hero-section {
    padding: 60px 20px 80px;
    text-align: center;
    max-width: 960px;
    margin: 0 auto;
}

.hero-title {
    font-family: 'Cinzel', serif !important;
    font-weight: 700 !important;
    font-size: clamp(2rem, 5vw, 3.5rem) !important;
    color: #c9a84c !important;
    letter-spacing: 0.1em;
    text-shadow: 0 2px 20px rgba(201, 168, 76, 0.3);
    margin-bottom: 16px;
}

.hero-subtitle {
    font-family: 'Nunito', 'Roboto', sans-serif !important;
    color: #a9c5b5 !important;
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

.hero-btn {
    min-width: 180px;
    font-family: 'Cinzel', serif !important;
    letter-spacing: 0.08em;
}

.hero-tiles {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
    font-size: 2.5rem;
    opacity: 0.25;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}

.tile-deco {
    display: inline-block;
    animation: floatItem 3s ease-in-out infinite;
}
.tile-deco:nth-child(2) { animation-delay: 0.4s; }
.tile-deco:nth-child(3) { animation-delay: 0.8s; }
.tile-deco:nth-child(4) { animation-delay: 1.2s; }

@keyframes floatItem {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

/* ── Feature cards ────────────────────────────────────────────────────────── */
.feature-card {
    background: rgba(31, 74, 48, 0.6);
    border: 1px solid rgba(201, 168, 76, 0.15);
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
    border-color: rgba(201, 168, 76, 0.4);
    transform: translateY(-3px);
}

/* ── Stat cards ───────────────────────────────────────────────────────────── */
.stat-card {
    background: linear-gradient(135deg, #1f4a30 0%, #152e22 100%) !important;
    border: 1px solid rgba(201, 168, 76, 0.2) !important;
    border-radius: 10px !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

/* ── Club cards ───────────────────────────────────────────────────────────── */
.club-card {
    background: linear-gradient(135deg, #1f4a30 0%, #152e22 100%) !important;
}

/* ── Blazor error UI ──────────────────────────────────────────────────────── */
#blazor-error-ui {
    background: rgba(139, 26, 26, 0.95);
    border-top: 2px solid #c9a84c;
    bottom: 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: #f5f0e8;
    font-family: 'Nunito', 'Roboto', sans-serif;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ── Validation states ────────────────────────────────────────────────────── */
.valid.modified:not([type=checkbox]) { outline: 1px solid #4caf50; border-radius: 6px; }
.invalid { outline: 1px solid #ef5350; border-radius: 6px; }
.validation-message { color: #ef9a9a; font-size: 0.82rem; margin-top: 4px; }

/* ── Mahjong tile decorative dividers ────────────────────────────────────── */
.tile-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    opacity: 0.3;
}
.tile-divider::before,
.tile-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c9a84c, transparent);
}
.tile-divider-icon { font-size: 1.2rem; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .hero-tiles { font-size: 1.8rem; }
    .hero-section { padding: 40px 16px 60px; }
}
