/* Pro Clubs World Theme - Dark Esports with Cyan Accent */

:root {
    --pcw-bg: #0b0f14;
    --pcw-surface: #141a22;
    --pcw-surface2: #10161e;
    --pcw-text: #ffffff;
    --pcw-text-muted: #a7b0be;
    --pcw-accent: #0087b3;
    --pcw-accent-2: #00a0cc;
    --pcw-border: rgba(255,255,255,0.08);
    --pcw-shadow: rgba(0, 135, 179, 0.15);
}

body {
    background-color: var(--pcw-bg);
    color: var(--pcw-text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.pcw-card {
    background-color: var(--pcw-surface);
    border: 1px solid var(--pcw-border);
    border-bottom: 3px solid var(--pcw-accent);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    overflow: hidden;
    max-width: 100%;
}

.pcw-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--pcw-shadow);
    border-bottom-color: var(--pcw-accent-2);
}

.pcw-card-large {
    min-height: 200px;
}

.pcw-card-small {
    min-height: 120px;
}

.pcw-hero {
    background: linear-gradient(135deg, var(--pcw-surface2) 0%, var(--pcw-bg) 100%);
    border-bottom: 2px solid var(--pcw-accent);
    padding: 4rem 2rem;
    text-align: center;
}

.pcw-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--pcw-text) 0%, var(--pcw-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pcw-hero p {
    font-size: 1.25rem;
    color: var(--pcw-text-muted);
    margin-bottom: 2rem;
}

.pcw-btn {
    background-color: var(--pcw-accent);
    color: var(--pcw-bg);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.pcw-btn:hover {
    background-color: var(--pcw-accent-2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--pcw-shadow);
}

.pcw-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.pcw-feature-card {
    background-color: var(--pcw-surface);
    border: 1px solid var(--pcw-border);
    border-bottom: 3px solid var(--pcw-accent);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pcw-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px var(--pcw-shadow);
    border-bottom-color: var(--pcw-accent-2);
}

.pcw-feature-card .icon {
    font-size: 3rem;
    color: var(--pcw-accent);
    margin-bottom: 1rem;
}

.pcw-feature-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pcw-feature-card p {
    color: var(--pcw-text-muted);
    font-size: 0.95rem;
}

.pcw-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.pcw-status-upcoming {
    background-color: rgba(0, 200, 255, 0.2);
    color: var(--pcw-accent);
    border: 1px solid var(--pcw-accent);
}

.pcw-status-active {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid #4caf50;
}

.pcw-status-finished {
    background-color: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
    border: 1px solid #9e9e9e;
}

.pcw-rule-bullet {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.pcw-rule-bullet::before {
    content: "▸";
    color: var(--pcw-accent);
    font-size: 1.5rem;
    margin-right: 0.75rem;
    font-weight: bold;
}

.pcw-section-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 2rem 0 1rem 0;
    border-left: 4px solid var(--pcw-accent);
    padding-left: 1rem;
}

@media (max-width: 768px) {
    .pcw-hero h1 {
        font-size: 2.5rem;
    }

    .pcw-feature-grid {
        grid-template-columns: 1fr;
    }
}

/* Lineup Builder Styles */
.lineup-builder-page {
    min-height: 100vh;
    padding: 1rem;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--pcw-surface);
    border: 1px solid var(--pcw-border);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.layout-root {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1.5rem;
    margin-top: 1.5rem;
    max-height: calc(100vh - 200px);
}

.pitch-container {
    background-color: var(--pcw-surface);
    border: 1px solid var(--pcw-border);
    border-radius: 8px;
    padding: 1rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pitch {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 2/3;
    max-height: calc(100vh - 250px);
    background: linear-gradient(to bottom, #1a5f1a 0%, #2d8f2d 50%, #1a5f1a 100%);
    border-radius: 8px;
    border: 4px solid #fff;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.3);
}

/* Pitch markings */
.pitch-center-circle {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 3px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pitch-center-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pitch-penalty-top,
.pitch-penalty-bottom {
    position: absolute;
    width: 50%;
    height: 80px;
    border: 3px solid rgba(255, 255, 255, 0.7);
    left: 50%;
    transform: translateX(-50%);
}

.pitch-penalty-top {
    top: 0;
    border-top: none;
}

.pitch-penalty-bottom {
    bottom: 0;
    border-bottom: none;
}

.pitch-goal-area-top,
.pitch-goal-area-bottom {
    position: absolute;
    width: 30%;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.7);
    left: 50%;
    transform: translateX(-50%);
}

.pitch-goal-area-top {
    top: 0;
    border-top: none;
}

.pitch-goal-area-bottom {
    bottom: 0;
    border-bottom: none;
}

/* Player cards */
.player-slot {
    position: absolute;
    z-index: 10;
}

.player-card {
    width: 80px;
    height: 110px;
    background: linear-gradient(135deg, var(--pcw-surface) 0%, var(--pcw-surface2) 100%);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
    padding: 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid var(--pcw-accent);
    border-bottom: 3px solid var(--pcw-accent);
}

.player-card:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 24px var(--pcw-shadow);
    border-color: var(--pcw-accent-2);
}

.player-rating {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--pcw-accent);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}

.player-position {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--pcw-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.player-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--pcw-accent);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
}

.player-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--pcw-text);
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
}

/* Side panel */
.side-panel {
    background-color: var(--pcw-surface);
    border: 1px solid var(--pcw-border);
    border-radius: 8px;
    padding: 1.5rem;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.slot-list-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.slot-list-row label {
    min-width: 50px;
    font-weight: 600;
    font-size: 0.9rem;
}

.slot-list-row select {
    flex: 1;
    padding: 0.5rem;
    background-color: var(--pcw-bg);
    color: var(--pcw-text);
    border: 1px solid var(--pcw-border);
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .layout-root {
        grid-template-columns: 1fr;
    }

    .side-panel {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .top-bar-left,
    .top-bar-right {
        justify-content: center;
    }

    .player-card {
        width: 60px;
        height: 85px;
        padding: 4px;
    }

    .player-rating {
        font-size: 1.2rem;
    }

    .player-number {
        font-size: 1rem;
    }

    .player-name {
        font-size: 0.55rem;
    }
}

/* Lineup Viewer Styles */
.lineup-viewer {
    width: 100%;
}

.pitch-container-viewer {
    display: flex;
    justify-content: center;
    padding: 1rem;
    background-color: var(--pcw-surface);
    border-radius: 8px;
}

.lineup-viewer .player-card {
    width: 60px;
    height: 80px;
    padding: 4px;
}

.lineup-viewer .player-position {
    font-size: 0.65rem;
}

.lineup-viewer .player-name {
    font-size: 0.6rem;
}

/* ── Shared PCW Tabs (used by Club, Home, Tournaments) ───── */

.pcw-tabs.mud-tabs {
    background: transparent;
}

.pcw-tabs .mud-tabs-toolbar {
    background: #161d27;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px 10px 0 0;
    padding: 0 8px;
}

.pcw-tabs .mud-tabs-panels {
    background: #111720;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 20px;
    min-height: 200px;
}

.pcw-tabs .mud-tab-active {
    color: #42a5f5 !important;
}

/* Legacy alias — keep ClubTabs working unchanged */
.club-tabs.mud-tabs { background: transparent; }
.club-tabs .mud-tabs-toolbar { background: #161d27; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px 10px 0 0; padding: 0 8px; }
.club-tabs .mud-tabs-panels { background: #111720; border: 1px solid rgba(255,255,255,0.08); border-top: none; border-radius: 0 0 10px 10px; min-height: 200px; padding: 20px; }

/* -- Body Modifier range cards (lightweight, no MudBlazor components in hot loop) --- */
.bm-range-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; }
.bm-range-header { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.bm-bounds-row { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; }
.bm-field { display: flex; flex-direction: column; gap: 3px; }
.bm-label { font-size: 0.68rem; font-weight: 600; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.4px; }
.bm-input { width: 110px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 5px; color: #fff; padding: 5px 8px; font-size: 0.85rem; font-family: monospace; outline: none; transition: border-color 0.15s; }
.bm-input:focus { border-color: rgba(0,200,255,0.5); background: rgba(0,200,255,0.06); }
.bm-range-actions { display: flex; align-items: center; gap: 6px; padding-bottom: 2px; }
.bm-row-count { font-size: 0.72rem; font-weight: 700; color: rgba(0,200,255,0.8); background: rgba(0,200,255,0.1); border: 1px solid rgba(0,200,255,0.25); border-radius: 10px; padding: 2px 9px; white-space: nowrap; }
.bm-note-input { width: 100%; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: 5px; color: rgba(255,255,255,0.7); padding: 5px 10px; font-size: 0.82rem; outline: none; margin-bottom: 10px; transition: border-color 0.15s; }
.bm-note-input:focus { border-color: rgba(0,200,255,0.4); }
.bm-mods-label { font-size: 0.68rem; font-weight: 700; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.bm-mods-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bm-btn { display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 5px; cursor: pointer; transition: background 0.15s, opacity 0.15s; padding: 0; }
.bm-btn:hover { opacity: 0.85; }
.bm-btn-secondary { width: 32px; height: 32px; background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.7); }
.bm-btn-secondary:hover { background: rgba(255,255,255,0.13); }
.bm-btn-danger { width: 32px; height: 32px; background: rgba(244,67,54,0.15); color: #f44336; }
.bm-btn-danger:hover { background: rgba(244,67,54,0.28); }
.bm-btn-xs { width: 18px; height: 18px; font-size: 0.65rem; border-radius: 3px; }
.bm-btn-add { background: rgba(100,181,246,0.12); color: rgba(100,181,246,0.9); border: 1px solid rgba(100,181,246,0.2); border-radius: 5px; padding: 4px 10px; font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.bm-btn-add:hover { background: rgba(100,181,246,0.22); }
.club-tabs .club-tab-panel { padding: 24px !important; }
.club-tabs .club-tab-active { color: #42a5f5 !important; }

/* ── LineupBuilder Mobile — PitchView size overrides ──────────────────────────*/
.lbm-pitch-area:not(.lbm-exporting) .pitch-container {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
}
.lbm-pitch-area:not(.lbm-exporting) .pitch-export-area {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    padding-bottom: 0 !important;
}
.lbm-pitch-area:not(.lbm-exporting) .pitch-scene {

    max-height: 100% !important;
    max-width: min(100%, calc((100dvh - 134px) * 0.75)) !important;
    margin: 0 auto !important;
}

/* ── Top Nav: Dropdown Popovers (rendered at document root, not reachable by CSS isolation) ── */

.pcw-nav-popover .mud-list {
    background: #141a22 !important;
    border: 1px solid rgba(0, 135, 179, 0.2) !important;
    border-radius: 8px !important;
    padding: 6px 0 !important;
    min-width: 220px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 200, 255, 0.06) !important;
}

.pcw-nav-popover .mud-list-item {
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: 13px !important;
    transition: background 0.15s ease, color 0.15s ease !important;
}

.pcw-nav-popover .mud-list-item:hover {
    background: rgba(0, 200, 255, 0.08) !important;
    color: #00c8ff !important;
}

.pcw-nav-popover-inner {
    padding: 4px 0;
}

.pcw-pop-label {
    padding: 6px 16px 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(0, 200, 255, 0.5);
    margin: 0;
    pointer-events: none;
}

/* ── Page Content AppBar Clearance ──────────────────── */
/* MudMainContent.pcw-main-content handles AppBar + DevWarningBanner offset.
   pcw-page-wrap only needs consistent breathing room on all viewports. */
.pcw-page-wrap {
    padding-top: 20px !important;
}

/* -- Archetype Workspace section styles (shared) --------------------------- */
.apc-table { width:100%; border-collapse:collapse; font-size:0.83rem; }
.apc-table th { text-align:left; padding:6px 10px; color:rgba(255,255,255,0.4); font-weight:700; font-size:0.7rem; text-transform:uppercase; letter-spacing:0.6px; border-bottom:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.02); }
.apc-table td { padding:3px 6px; border-bottom:1px solid rgba(255,255,255,0.04); vertical-align:middle; }
.apc-table tr:last-child td { border-bottom:none; }
.apc-row-num { color:rgba(255,255,255,0.25); font-size:0.72rem; width:28px; text-align:right; padding-right:8px !important; }
.apc-cell { width:90px; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.1); border-radius:5px; color:#fff; padding:4px 7px; font-size:0.83rem; font-family:monospace; outline:none; transition:border-color 0.15s, background 0.15s; }
.apc-cell:focus { border-color:rgba(0,200,255,0.55); background:rgba(0,200,255,0.07); }
.apc-curve-header { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; cursor:pointer; background:rgba(255,255,255,0.025); transition:background 0.15s; }
.apc-curve-header:hover { background:rgba(255,255,255,0.05); }
.sc-stat-cell { display:inline-flex; align-items:center; gap:5px; background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.09); border-radius:6px; padding:5px 7px; }
.sc-stat-key { font-size:0.7rem; font-weight:700; color:rgba(255,255,255,0.45); text-transform:uppercase; letter-spacing:0.4px; min-width:34px; }
.sc-key-input { font-size:0.7rem !important; font-weight:700; text-transform:uppercase; }
.sc-stat-input { width:54px !important; }
