﻿:root {
    --backgroundBg: #211c1c;

    --headerBg: #ffffff;
    --headerTextColor: #ffffff;

    --linksBg: #c80000;
    --linksTextColor: #ffffff;
    --linksHighlight:#00000068;

    --bodyBg: #ffffff;
    --bodyTextColor: #211c1c;

    --footerBg: #0a0909;
    --footerTextColor: #ffffff;

    --paleYellow:#ffdd;
}

html, body, form {
    margin:0px;
    padding:0px;
    box-sizing:border-box;
    height:100%;
    font-family:Verdana;
}

body {
    background-color: var(--backgroundBg);
    color:#fff;
}

.content {
    width: 100%;
    max-width: 1500px;
    margin: 0px auto;
    box-sizing: border-box;
    padding: 20px;
}
.nopadding {
    padding:0px;
}

.header {
    background-color: var(--headerBg);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    background-image: url(/assets/images/pool-table1.jpg);
    background-position:center center;
    background-repeat: no-repeat;
    background-size: cover;
}
    .header img {
        height:100px;
    }
    .header-text {
        background-color:var(--linksBg);
        min-height:100px;
        display:flex;
        flex-direction:column;
        padding:10px 20px;
        gap:5px;
        justify-content:center;
        box-sizing:border-box;
    }
        .header-text h1 {
            color: var(--headerTextColor);
            font-size:30px;
            font-weight:bold;
            margin:0px;
        }
        .header-text p {
            color: var(--headerTextColor);
            font-size:17px;
            margin:0px;
        }

.links {
    background-color: var(--linksBg);
    text-align: center;
    border-top: 10px solid var(--paleYellow);
    border-bottom: 10px solid var(--paleYellow);
}
    .links a {
        display: inline-block;
        padding: 15px 20px;
        margin: 0;
        color: var(--linksTextColor);
        text-decoration: none;
    }
        .links a:hover {
            background-color:var(--linksHighlight);
        }

.playerLinks {
    background-color: var(--linksHighlight);
    text-align: center;
    border-bottom: 10px solid var(--paleYellow);
}
    .playerLinks a {
        display: inline-block;
        padding: 15px 20px;
        margin: 0;
        color: var(--linksTextColor);
        text-decoration: none;
    }
        .playerLinks a:hover {
            background-color: var(--linksBg);
        }

.bodyContent {
    background-color: var(--bodyBg);
    color: var(--bodyTextColor);
    border-bottom: 10px solid var(--linksBg);
}

.footer {
    background-color: var(--footerBg);
    color: var(--footerTextColor);
}

.main-grid {
    height:100%;
    display:grid;
    grid-template-columns:1fr;
    grid-template-rows:200px auto auto 1fr;
}

.page-home {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px;
    box-sizing: border-box;
}

.pageTitle {
    margin: 0;
    font-size: 24px;
}

.card {
    background: #fff;
    border-radius: 8px;
    padding: 14px 14px;
    box-shadow: 0 2px 0 rgba(0,0,0,.15);
    margin-bottom: 14px;
    box-sizing: border-box;
}

.card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.card__headerRow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.card__footer {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,.08);
}

    .card__footer.subtle {
        font-size: 12px;
        opacity: .75;
    }

.grid {
    display: grid;
    gap: 14px;
}

.grid--2 {
    grid-template-columns: 1fr 1fr;
}

.grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
    .grid--2 {
        grid-template-columns: 1fr;
    }

    .grid--4 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .grid--4 {
        grid-template-columns: 1fr;
    }
}

.stat {
    background: rgba(0,0,0,.04);
    border-radius: 8px;
    padding: 10px;
}

.stat__label {
    font-size: 12px;
    opacity: .7;
    margin-bottom: 6px;
}

.stat__value {
    font-size: 18px;
    font-weight: 700;
}

.stat__sub {
    font-size: 12px;
    opacity: .7;
    margin-top: 3px;
}

.actionStrip {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 40px 0;
    justify-items: center;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid rgba(0,0,0,.15);
    background: #fff;
    color: #111;
    cursor:pointer;
}

    .btn:hover {
        filter: brightness(.98);
    }

.btn--primary {
    background: var(--linksBg);
    border-color: var(--linksBg);
    color: var(--paleYellow);
    font-size: 20px;
    padding: 20px 40px;
}

.btn--small {
    padding: 8px 10px;
    font-size: 13px;
}

.link {
    color: var(--linksBg);
    font-weight: 700;
    text-decoration: none;
}

    .link:hover {
        text-decoration: underline;
    }

.list {
    display: grid;
    gap: 10px;
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(0,0,0,.04);
}

.row__title {
    font-weight: 800;
}

.row__meta {
    font-size: 12px;
    opacity: .75;
    margin-top: 2px;
}

.table {
    display: grid;
    gap: 6px;
}

.table__head, .table__row {
    display: grid;
    grid-template-columns: 36px 1fr 40px 50px 50px;
    gap: 8px;
    align-items: center;
}

.table__head {
    font-size: 12px;
    font-weight: 900;
    opacity: .75;
    padding: 6px 8px;
}

.table__row {
    background: rgba(0,0,0,.04);
    padding: 10px 8px;
    border-radius: 8px;
    font-weight: 700;
}

.chip {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .2px;
    border: 1px solid rgba(0,0,0,.15);
    background: #fff;
}

/*League Status Chips*/
.chip--open {
    background: var(--paleYellow);
    color: #111;
    border-color: rgba(0,0,0,.2);
}

.chip--active {
    background: #e9f7ef;
    border-color: #b6e1c8;
}

.chip--finished {
    background: #f6e9e9;
    border-color: #e2b6b6;
}

/*Fixture status chips*/
.chip--pending {
    background: #fff7db;
    border-color: #f0d58a;
}

.chip--done {
    background: #e9f7ef;
    border-color: #b6e1c8;
}

.bulletList {
    margin: 0;
    padding-left: 18px;
}

    .bulletList li {
        margin: 6px 0;
    }

.page-register {
    max-width: 900px;
    margin: 0 auto;
    padding: 18px;
    box-sizing: border-box;
}

.grid--2 {
    grid-template-columns: repeat(2, 1fr);
}
.grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
    .grid--3, .grid--2 {
        grid-template-columns: 1fr;
    }
}

.notice {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--paleYellow);
    color: #111;
    border: 1px solid rgba(0,0,0,.15);
    font-weight: 700;
}

.formGrid {
    display: grid;
    gap: 12px;
    margin-top: 10px;
}

.field {
    display: grid;
    gap: 6px;
}

.field__label {
    font-weight: 800;
}

.field__hint {
    font-size: 12px;
    opacity: .75;
}

.formActions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.finePrint {
    margin-top: 12px;
    font-size: 12px;
    opacity: .75;
}

.alert {
    border-radius: 8px;
    padding: 10px 12px;
    margin: 10px 0 20px;
    border: 1px solid rgba(0,0,0,.15);
    font-weight: 700;
}

.alert--ok {
    background: #e9f7ef;
    border-color: #b6e1c8;
}

.alert--warn {
    background: #fff7db;
    border-color: #f0d58a;
}

.alert--bad {
    background: #f6e9e9;
    border-color: #e2b6b6;
}

.input,
select,
textarea {
    box-sizing: border-box;
    appearance: none;
    width: 100%;
    font-size: 15px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,.25);
    background: #fff;
    color: #111;
    line-height: 1.3;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

/* Hover (desktop only) */
@media (hover:hover) {
    .input:hover,
    select:hover,
    textarea:hover {
        border-color: rgba(0,0,0,.45);
    }
}

/* Focus */
.input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--linksBg);
    box-shadow: 0 0 0 2px rgba(140, 0, 0, .15); /* subtle red glow */
    background: #fff;
}

.page-players {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px;
    box-sizing: border-box;
}

.toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin: 10px 0 12px;
}

.small {
    font-size: 12px;
    opacity: .75;
}

.muted {
    opacity: .75;
}

.table__head--players, .table__row--players {
    grid-template-columns: 1fr 110px 50px 60px 60px 200px;
}

.mobileStatsHeader {
    display:none;
}

@media (max-width: 900px) {
    .table__head--players {
        display: none;
    }

    .table__row--players {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 10px;
        grid-template-rows: auto auto auto;
        grid-template-areas: "playerDets playerDets playerStatus"
            "playerStatsPlayed playerStatsPoints playerStatsDiff"
            "rowActions rowActions rowActions";
    }

    .mobileStatsHeader {
        display: block;
        margin-bottom:5px;
        font-weight:bold;
    }
    .playerCell {
        grid-area:playerDets;
    }
    .playerStatus {
        grid-area:playerStatus;
        text-align:right;
    }
    .playerStatsPlayed {
        grid-area: playerStatsPlayed;
    }
    .playerStatsPoints {
        grid-area: playerStatsPoints;
    }
    .playerStatsDiff {
        grid-area: playerStatsDiff;
    }
    .playerStatsPlayed, .playerStatsPoints, .playerStatsDiff {
        display:inline-block;
        text-align:center;
        margin:20px 0;
        font-weight:normal;
        background-color:var(--paleYellow);
        padding:10px;
        border-radius:10px;
    }

    .rowActions {
        justify-content: flex-start;
        grid-area: rowActions;
    }
}

.playerCell {
    display: grid;
    gap: 2px;
}

.playerName {
    font-weight: 900;
}

.playerMeta {
    font-size: 12px;
}

.rowActions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Segmented control */
.segmented {
    display: flex;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.segBtn {
    border: 0;
    background: transparent;
    padding: 9px 10px;
    font-weight: 900;
    cursor: pointer;
}

.segBtn--active {
    background: var(--linksBg);
    color: var(--paleYellow);
}
