/* ==========================================================
   PAGE HEADER
========================================================== */

.page-header {
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--steel);
    font-size: 1rem;
}

/* ==========================================================
   DASHBOARD GRID
========================================================== */

.dashboard-grid {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));

    gap: 24px;

}

/* ==========================================================
   DASHBOARD CARDS
========================================================== */

.card {

    background: linear-gradient(
        180deg,
        rgba(42,42,46,1) 0%,
        rgba(30,30,34,1) 100%
    );

    border: 1px solid var(--gunmetal);

    border-radius: 14px;

    padding: 28px;

    min-height: 180px;

    transition: 0.25s ease;

}

.card:hover {

    transform: translateY(-4px);

    border-color: var(--forge-orange);

    box-shadow: 0 10px 30px rgba(0,0,0,.35);

}

.card h2 {

    font-size: 1.25rem;

    margin-bottom: 18px;

}

.card p {

    color: var(--steel);

    line-height: 1.6;

}

/* ==========================================================
   LEAGUE TABLE
========================================================== */

.league-table {

    width: 100%;
    border-collapse: collapse;

}

.league-table th {

    text-align: left;

    padding: 1rem;

    border-bottom: 1px solid var(--gunmetal);

    font-weight: 700;

}

.league-table td {

    padding: 1rem;

    border-bottom: 1px solid var(--gunmetal);

}

.league-table tbody tr {

    transition: all .2s ease;

}

.league-table tbody tr:hover {

    background: rgba(255,255,255,.03);

}

/* ==========================================================
   PODIUM
========================================================== */

.league-table tbody tr.gold {

    background: linear-gradient(
        90deg,
        rgba(123,96,25,.40),
        rgba(191,155,48,.22)
    );

    border-left: 4px solid #d4af37;

}

.league-table tbody tr.silver {

    background: linear-gradient(
        90deg,
        rgba(120,120,120,.35),
        rgba(200,200,200,.16)
    );

    border-left: 4px solid #c0c0c0;

}

.league-table tbody tr.bronze {

    background: linear-gradient(
        90deg,
        rgba(118,72,33,.38),
        rgba(181,101,29,.16)
    );

    border-left: 4px solid #b87333;

}

.league-table tbody tr.gold td,
.league-table tbody tr.silver td,
.league-table tbody tr.bronze td {

    font-weight: 600;

}

.league-table td:last-child,
.league-table th:last-child {

    font-weight: 700;

}
/* ==========================================================
   ADMIN DASHBOARD
========================================================== */

.admin-card {

    position: relative;

    cursor: pointer;

    transition:
        transform .25s ease,
        border-color .25s ease,
        box-shadow .25s ease,
        background .25s ease;

}

.admin-card:hover {

    transform: translateY(-6px);

    border-color: var(--forge-orange);

    box-shadow:
        0 12px 28px rgba(0,0,0,.35),
        0 0 16px rgba(201,93,35,.20);

}

.admin-icon {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    font-size: 2.4rem;

    color: var(--forge-orange);

    margin-bottom: 20px;

}

.admin-card h2 {

    margin-bottom: 14px;

}

.admin-card p {

    margin-bottom: 28px;

    min-height: 50px;

}

/* ==========================================================
   STATUS BADGES
========================================================== */

.status {

    display: inline-block;

    padding: 6px 12px;

    border-radius: 999px;

    font-size: .75rem;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: .06em;

}

.status.ready {

    color: #6dde8a;

    background: rgba(38,120,64,.25);

    border: 1px solid rgba(109,222,138,.25);

}

.status.planned {

    color: #ffc66d;

    background: rgba(120,88,20,.22);

    border: 1px solid rgba(255,198,109,.20);

}

.status.disabled {

    color: #aaaaaa;

    background: rgba(90,90,90,.18);

    border: 1px solid rgba(120,120,120,.20);

}
/* ==========================================================
   PLAYERS PAGE
========================================================== */

.players-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 2rem;

}

.btn-primary {

    display: inline-flex;

    align-items: center;

    gap: .5rem;

    padding: .8rem 1.25rem;

    background: var(--forge-orange);

    color: white;

    border: none;

    border-radius: 10px;

    font-weight: 600;

    cursor: pointer;

    transition: .25s ease;

}

.btn-primary:hover {

    transform: translateY(-2px);

    filter: brightness(1.1);

}

.empty-state {

    text-align: center;

    padding: 4rem 2rem;

}

.empty-icon {

    font-size: 5rem;

    color: var(--forge-orange);

    opacity: .35;

    margin-bottom: 1rem;

}

.empty-state h3 {

    margin-bottom: 1rem;

}

.empty-state p {

    color: var(--steel);

    max-width: 500px;

    margin: auto;

    line-height: 1.7;

}
/* ==========================================================
   MODAL
========================================================== */

.modal {

    position: fixed;

    inset: 0;

    background: rgba(0,0,0,.75);

    display: flex;

    justify-content: center;

    align-items: center;

    z-index: 999;

}

.hidden {

    display: none;

}

.modal-content {

    width: min(750px, 90vw);

    background: var(--panel-bg);

    border: 1px solid var(--forge-orange);

    border-radius: 14px;

    padding: 2rem;

    box-shadow: 0 20px 40px rgba(0,0,0,.5);

}

.modal-large {

    width: 90vw;
    max-width: 1400px;

    height: 85vh;

    display: flex;
    flex-direction: column;

}

.modal-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 1.5rem;

}

#archiveModalBody {

    flex: 1;

    overflow-y: auto;

    padding-top: 1rem;

}

.modal-close-button {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 40px;

    height: 40px;

    background: transparent;

    border: none;

    color: var(--steel);

    cursor: pointer;

    border-radius: 8px;

    transition: background-color .2s ease;

}

.modal-close-button:hover {

    background: rgba(255,255,255,.08);

}

.modal-close-button .material-symbols-rounded {

    font-size: 26px;

}

.modal-content h2 {

    margin: 0;

    font-size: 2rem;

}

#profile-player-army {

    color: var(--text-muted);

    font-size: 0.95rem;

    margin: 6px 0 24px;

}

.modal-content p {

    margin-bottom: 2rem;

    color: var(--steel);

}

.form-group {

    margin-bottom: 1.5rem;

}

.form-group label {

    display: block;

    margin-bottom: .5rem;

    font-weight: 600;

}

.form-group input {

    width: 100%;

    padding: .85rem;

    border-radius: 8px;

    border: 1px solid #555;

    background: #2d2d2d;

    color: white;

}

.modal-buttons {

    display: flex;

    justify-content: flex-end;

    gap: 1rem;

    margin-top: 2rem;

}

.btn-secondary {

    padding: .8rem 1.25rem;

    background: transparent;

    border: 1px solid #666;

    color: white;

    border-radius: 10px;

    cursor: pointer;

    transition: .2s ease;

}

.btn-secondary.active-filter {

    background: var(--forge-orange);

    border-color: var(--forge-orange);

    color: #fff;

}
/* ==========================================================
   PLAYER CARDS
========================================================== */

#players-list {

    display: flex;

    flex-direction: column;

    gap: 1rem;

}

.player-card {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 1.5rem;

    border: 1px solid var(--gunmetal);

    border-radius: 12px;

    background: linear-gradient(
        180deg,
        rgba(42,42,46,1) 0%,
        rgba(30,30,34,1) 100%
    );

    transition:
        transform .25s ease,
        border-color .25s ease,
        box-shadow .25s ease;

}

.player-card:hover {

    transform: translateY(-3px);

    border-color: var(--forge-orange);

    box-shadow:
        0 10px 24px rgba(0,0,0,.35),
        0 0 12px rgba(201,93,35,.18);

}

.player-info h3 {

    margin: 0;

    font-size: 1.15rem;

}

.player-info p {

    margin-top: .35rem;

    color: var(--steel);

}

.player-actions {

    display: flex;

    gap: .75rem;

}

.player-actions button {

    min-width: 80px;

}
/* ==========================================================
   SELECT INPUTS
========================================================== */

.form-group select {

    width: 100%;

    padding: .85rem;

    border-radius: 8px;

    border: 1px solid #555;

    background: #2d2d2d;

    color: white;

    font: inherit;

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background-image:
        linear-gradient(45deg, transparent 50%, var(--forge-orange) 50%),
        linear-gradient(135deg, var(--forge-orange) 50%, transparent 50%);

    background-position:
        calc(100% - 20px) calc(50% - 3px),
        calc(100% - 14px) calc(50% - 3px);

    background-size: 6px 6px;

    background-repeat: no-repeat;

}

.form-group select:hover {

    border-color: var(--forge-orange);

}

.form-group select:focus {

    outline: none;

    border-color: var(--forge-orange);

    box-shadow: 0 0 0 3px rgba(201,93,35,.15);

}
/* ==========================================
   Standings Table
========================================== */

.standings-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--steel);
}

.standings-table th {
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 14px 12px;
    border-bottom: 1px solid var(--border-color);
}

.standings-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.standings-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

.standings-table td:not(:nth-child(2)):not(:nth-child(3)),
.standings-table th:not(:nth-child(2)):not(:nth-child(3)) {
    text-align: center;
}

.standings-table tbody tr:last-child td {
    border-bottom: none;
}
/* ==========================================
   Recent Battle Indicators
========================================== */

.recent-battles {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.battle-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.battle-win {
    background: #22c55e;
}

.battle-draw {
    background: #facc15;
}

.battle-loss {
    background: #ef4444;
}
/* ==========================================
   Podium Positions
========================================== */

.podium-gold {
    background: rgba(255, 215, 0, 0.08);
    border-left: 4px solid #ffd700;
}

.podium-silver {
    background: rgba(192, 192, 192, 0.08);
    border-left: 4px solid #c0c0c0;
}

.podium-bronze {
    background: rgba(205, 127, 50, 0.08);
    border-left: 4px solid #cd7f32;
}

.podium-gold:hover {
    background: rgba(255, 215, 0, 0.12);
}

.podium-silver:hover {
    background: rgba(192, 192, 192, 0.12);
}

.podium-bronze:hover {
    background: rgba(205, 127, 50, 0.12);
}
.dashboard-card ol {
    margin: 0;
    padding-left: 20px;
}

.dashboard-card li {
    margin-bottom: 8px;
}

.dashboard-card p {
    margin-bottom: 10px;
    line-height: 1.6;
}
/* ==========================
   Rules Page
========================== */

.rules-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 900px;
}

.rules-container .dashboard-card {
    width: 100%;
}

.rules-container h2 {
    margin-bottom: 16px;
}

.rules-container p,
.rules-container li {
    line-height: 1.8;
    margin-bottom: 8px;
}

.rules-container ol {
    padding-left: 20px;
}
/* ==========================================================
   DASHBOARD
========================================================== */

.dashboard {

    display: flex;
    flex-direction: column;
    gap: 24px;

}

.dashboard-hero {

    min-height: auto;

}

.dashboard-hero h3 {

    font-size: 2.6rem;

    margin: 12px 0 16px;

    font-weight: 700;

}

.dashboard-hero p {

    margin-bottom: 10px;

}

.dashboard-card {

    min-height: auto;

}

.dashboard-card h3 {

    font-size: 1.75rem;
    margin: 12px 0;

}

/* ==========================================================
   Progress Bar
========================================================== */

.progress-bar {

    width: 100%;
    height: 12px;

    background: rgba(255,255,255,.08);

    border-radius: 999px;

    overflow: hidden;

    margin: 18px 0;

}

.progress-fill {

    width: 0;

    height: 100%;

    background: linear-gradient(
        90deg,
        var(--forge-orange),
        #ffb347
    );

    border-radius: inherit;

    transition: width .5s ease;

}

/* ==========================================================
   Statistics Grid
========================================================== */

.stats-grid {

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 24px;

    margin-top: 20px;

}

.stat {

    text-align: center;

}

.stat-value {

    display: block;

    font-size: 2.4rem;

    font-weight: 700;

    color: var(--forge-orange);

    margin-bottom: 8px;

}

.stat-label {

    display: block;

    color: var(--steel);

    font-size: .95rem;

}

/* ==========================================================
   Responsive
========================================================== */

@media (max-width: 768px) {

    .stats-grid {

        grid-template-columns: 1fr;

        gap: 18px;

    }

}

.season-divider {

    border: none;

    border-top: 1px solid rgba(255,255,255,.08);

    margin: 22px 0;

}

#leader-name {
    font-size: 2.1rem;
    font-weight: 700;
    margin: 12px 0;
}

.leader-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 2.1rem;
    font-weight: 700;
    margin: 12px 0;
}

.leader-name-row .material-symbols-rounded.leader-trophy {
    color: #f4b400;
    font-size: 3rem;
}

.dashboard-hero {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* ==========================================
   Fixtures
========================================== */

.fixture-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.fixture-status {
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.fixture-status.completed {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.fixture-score {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem 0;
}

.fixture-player {
    flex: 1;
    text-align: center;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 0.75rem;
}

.fixture-player strong {
    display: block;
    font-size: 1rem;
}

.fixture-player span {
    display: block;
    margin-top: 0.4rem;
}

.fixture-player span {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--forge-orange);
}

.fixture-notes {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.fixture-notes strong {
    display: block;
    margin-bottom: 0.4rem;
}
.fixture-winner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-top: 0.75rem;
}

.fixture-winner .material-symbols-rounded {
    color: var(--forge-orange);
    font-size: 1.2rem;
}
.fixture-player.winner {
    border: 2px solid var(--forge-orange);
    background: rgba(255, 120, 0, 0.08);
}
.fixture-status.pending {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}
.fixture-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.fixture-filters .btn-secondary {
    transition: var(--transition-speed);
}

.fixture-filters .btn-secondary:hover:not(.active-filter) {
    border-color: var(--forge-orange);
    color: var(--bright-steel);
}

.fixture-filters .btn-secondary.active-filter {
    background: var(--forge-orange);
    border: 1px solid var(--forge-orange);
    color: var(--bright-steel);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.fixture-filters .btn-secondary.active-filter {
    background-color: var(--forge-orange);
    border-color: var(--forge-orange);
    color: var(--bright-steel);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.player-profile-link {

    cursor: pointer;

    transition: color var(--transition-speed);

}

.player-profile-link:hover {

    color: var(--forge-orange);

}
/* ==========================
   Player Profile Modal
========================== */

.profile-stats-grid {

    display: grid;

    grid-template-columns: 1fr 1fr;

    align-items: start;

    gap: 20px;

    margin-top: 20px;

}

.profile-stat-card {

    background: var(--gunmetal);

    border: 1px solid rgba(255,255,255,.08);

    border-radius: var(--border-radius);

    padding: 20px;

    box-shadow: var(--shadow-small);

}

.profile-stat-card h3 {

    margin: 0 0 18px 0;
    color: var(--forge-orange);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;

}

.profile-stat {

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 8px 0;

    border-bottom: 1px solid rgba(255,255,255,0.08);

}

.profile-stat:last-child {

    border-bottom: none;

}

.profile-stat-label {

    color: var(--text-secondary);

}

.profile-stat-value {

    font-weight: 600;
    color: var(--bright-steel);

}

@media (max-width: 900px) {

    .profile-stats-grid {

        grid-template-columns: 1fr;

    }

}
/* ==========================================================
   Season Summary
========================================================== */

.season-summary-card {

    max-width: 800px;

}