/* ================= RESET ================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: Arial, sans-serif;
    background: #eef2f7;
    color: #111;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
}

.container {
    width: 1200px;
    max-width: 95%;
    margin: 40px auto;
    flex: 1;
}

hr {
    border: none;
    border-top: 1px solid #777;
    margin: 28px 0;
}

.title-center {
    text-align: center;
    margin-bottom: 28px;
}

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

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #173f70;
    min-height: 82px;
    padding: 0 32px;
    display: grid;
    grid-template-columns: minmax(390px, 1fr) auto minmax(170px, 1fr);
    align-items: center;
    gap: 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    white-space: nowrap;
    min-width: 0;
    text-decoration: none;
}

.header-left span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    flex: 0 0 52px;
}

.header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 1.2vw, 20px);
    flex-wrap: nowrap;
    white-space: nowrap;
}

.header-center a {
    color: #fff;
    text-decoration: none;
    font-size: clamp(15px, 1.15vw, 19px);
    font-weight: 800;
    line-height: 1;
    padding: 12px 4px;
    border-bottom: 3px solid transparent;
}

.header-center a:hover {
    border-bottom-color: rgba(255,255,255,0.9);
}

.header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    white-space: nowrap;
}

.header-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 18px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.9);
    background: transparent;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 900;
}

.header-login-btn:hover {
    background: rgba(255,255,255,0.10);
}

/* ================= MOBILE MENU ================= */

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.85);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-button span,
.mobile-menu-button span::before,
.mobile-menu-button span::after {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

.mobile-menu-button span {
    position: relative;
}

.mobile-menu-button span::before,
.mobile-menu-button span::after {
    content: "";
    position: absolute;
    left: 0;
}

.mobile-menu-button span::before {
    top: -7px;
}

.mobile-menu-button span::after {
    top: 7px;
}

.mobile-nav {
    display: none;
    position: sticky;
    top: 68px;
    z-index: 999;
    background: #173f70;
    border-top: 1px solid rgba(255,255,255,0.18);
    padding: 8px 16px 16px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

.mobile-nav a {
    display: block;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: 18px;
    padding: 12px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.14);
}

.mobile-nav a:last-child {
    border-bottom: none;
}

.mobile-nav.is-open {
    display: block;
}

/* ================= FOOTER ================= */

.footer,
.site-footer {
    background: #ddd;
    color: #111;
    text-align: center;
    padding: 12px;
    font-size: 14px;
    margin-top: auto;
}

/* ================= SECTION TITLES ================= */

.section-title,
.day-row {
    display: flex;
    align-items: center;
    margin: 35px 0 14px;
    gap: 12px;
}

.section-title span,
.day-row span {
    font-weight: bold;
    font-size: 24px;
}

.section-title hr,
.day-row hr {
    flex: 1;
    border: none;
    height: 1.5px;
    background: #000;
    margin: 0;
}

/* ================= MATCH CARD GENERAL ================= */

.match-card {
    width: 650px;
    max-width: 100%;
    margin: 20px auto;
    padding: 22px;
    border-radius: 20px;
    background: linear-gradient(#fff, #e3e3e3);
    box-shadow: 4px 4px 15px rgba(0,0,0,0.12);
}

.match-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    font-size: 18px;
}

.match-team {
    width: 40%;
    font-weight: bold;
}

.match-score {
    width: 20%;
    font-weight: bold;
    font-size: 20px;
}

.match-status {
    margin-top: 4px;
    font-size: 12px;
    font-weight: bold;
}

.match-divider {
    margin: 15px 0;
    border-top: 1px solid #aaa;
    width: 100%;
}

.match-bottom {
    text-align: center;
    font-size: 14px;
    line-height: 1.35;
}

.match-card a {
    color: #000 !important;
    text-decoration: none !important;
}

.status-gray { color: #777; }
.status-green { color: #2d7d46; }
.status-orange { color: #c07000; }
.status-red { color: #c40000; }

/* ================= SCHEDULE CARDS ================= */

.match-main {
    min-width: 0;
}

.match-team-link,
.team-box {
    min-width: 0;
}

.match-team-link span,
.team-box,
.match-bottom,
.match-meta {
    white-space: normal !important;
    overflow-wrap: anywhere;
}

/* ================= TEAM GRID ================= */

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
    margin: 20px 0 40px;
}

.team-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: #222;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: 0.25s;
}

.team-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 12px 28px var(--team-color, rgba(0,0,0,0.2)),
        0 0 25px var(--team-color, rgba(0,0,0,0.15)),
        0 0 50px var(--team-color, rgba(0,0,0,0.1));
}

.team-logo img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin-bottom: 10px;
}

.team-info {
    font-weight: bold;
    font-size: 15px;
}

/* ================= TEAM DETAIL ================= */

.team-columns {
    display: flex;
    gap: 60px;
}

.person-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.person-card {
    background: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    font-size: 14px;
    transition: 0.2s;
    overflow-wrap: anywhere;
}

.person-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

.player-number {
    font-weight: bold;
    margin-right: 6px;
}

.staff-role {
    font-size: 12px;
    color: #666;
}

/* ================= STANDINGS ================= */

.standings {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.standings th,
.standings td {
    border-bottom: 1px solid #eee;
    padding: 10px;
    text-align: center;
}

.standings th {
    background: #f5f5f5;
    font-weight: bold;
}

.standings tr:hover {
    background: #f9f9f9;
}

.standings td:nth-child(2) {
    text-align: left;
    font-weight: bold;
}

/* ================= BRACKET ================= */

.bracket {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 30px;
}

.bracket-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.bracket-column h3 {
    text-align: center;
}

.bracket .match-card {
    width: 220px;
    padding: 12px;
    font-size: 14px;
}

/* ================= HALLS ================= */

.hall-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hall-card {
    display: flex;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transition: 0.25s;
    cursor: pointer;
}

.hall-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 10px 25px rgba(0,0,0,0.15),
        0 0 20px rgba(0,0,0,0.1);
}

.hall-image {
    width: 220px;
    min-width: 220px;
    height: 150px;
    overflow: hidden;
}

.hall-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.4s;
}

.hall-card:hover img {
    transform: scale(1.05);
}

.hall-content {
    flex: 1;
    padding: 18px;
    display: flex;
    flex-direction: column;
}

.hall-title {
    font-weight: bold;
    font-size: 20px;
    margin-bottom: 6px;
}

.hall-desc {
    font-size: 14px;
    color: #555;
    flex: 1;
}

.hall-links {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.hall-links a {
    font-size: 13px;
    padding: 6px 12px;
    background: #f0f0f0;
    border-radius: 6px;
    text-decoration: none;
    color: #000;
    transition: 0.2s;
}

.hall-links a:hover {
    background: #ddd;
}

/* ================= MATCH.PHP HEADER ================= */

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #fff, #f5f7fa);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.team-box {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: #111;
    font-weight: 700;
    font-size: 22px;
    transition: 0.3s;
}

.team-box img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    transition: 0.3s;
}

.team-box:hover {
    transform: scale(1.04);
}

.team-box:hover img {
    transform: scale(1.08);
}

.match-score-big {
    font-size: 58px;
    font-weight: 800;
    text-align: center;
    letter-spacing: 1px;
    color: #111;
}

.match-score-big div {
    font-size: 16px;
    margin-top: 8px;
    font-weight: 700;
}

.match-meta {
    text-align: center;
    font-size: 15px;
    margin-bottom: 25px;
    color: #555;
}

.stream-link {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 12px;
    background: #c40000;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
}

/* ================= MATCH INFO ================= */

.match-info-rules {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    margin: 18px auto;
    width: 100%;
}

.match-info-card {
    background: #fff;
    border: 1px solid #d6d6d6;
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
    box-shadow: 0 2px 7px rgba(0,0,0,0.06);
}

.match-info-label {
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 6px;
    color: #111;
}

.match-info-value {
    font-size: 14px;
    color: #111;
}

.match-info-empty {
    background: #fff3cd;
    border: 1px solid #ffe69c;
    color: #664d03;
    padding: 12px;
    text-align: center;
    margin: 15px 0;
    border-radius: 8px;
}

/* ================= PLAYER STATS ================= */

.player-stats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 18px 0;
}

.player-stats-row {
    display: grid;
    grid-template-columns: 55px 1.7fr 1.3fr 55px 55px 55px 55px;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #d6d6d6;
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 2px 7px rgba(0,0,0,0.06);
}

.player-stats-head {
    font-weight: bold;
    color: #000;
    background: #fff;
    border-bottom: 2px solid #e1e1e1;
    margin-bottom: 2px;
}

.player-stats-head > div,
.player-stats-rank,
.player-stats-number {
    text-align: center;
}

.player-stats-head > div:nth-child(2),
.player-stats-name {
    text-align: left;
}

.player-stats-head > div:nth-child(3),
.player-stats-team {
    text-align: center;
}

.player-stats-rank,
.player-stats-number,
.player-stats-name {
    font-weight: bold;
}

.player-stats-team {
    color: #555;
    font-size: 13px;
}

/* ================= LINEUPS ================= */

.lineups {
    display: flex;
    gap: 40px;
}

/* ================= TIMELINE ================= */

.timeline {
    position: relative;
    margin: 25px 0;
    padding: 20px 0;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: #cfcfcf;
    transform: translateX(-50%);
}

.timeline-row {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    min-height: 56px;
    margin: 14px 0;
}

.timeline-row.left {
    justify-content: flex-start;
}

.timeline-row.right {
    justify-content: flex-end;
}

.timeline-box {
    width: 45%;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    border: 1px solid #d6d6d6 !important;
    background: #fff !important;
    color: #111 !important;
}

.timeline-row.left .timeline-box {
    text-align: right;
}

.timeline-row.right .timeline-box {
    text-align: left;
}

.timeline-box.goal {
    background: #fff !important;
    color: #111 !important;
}

.timeline-box.penalty,
.timeline-box.shootout_miss {
    background: #ffecec !important;
    color: #c40000 !important;
    border-color: #ffb8b8 !important;
    text-align: left !important;
}

.timeline-box.shootout_goal {
    background: #e9f8ed !important;
    color: #188038 !important;
    border-color: #a8ddb5 !important;
    text-align: left !important;
}

.timeline-box.timeout {
    background: #f2f2f2 !important;
    color: #555 !important;
    border-color: #d0d0d0 !important;
    text-align: left !important;
}

.timeline-time {
    position: absolute;
    left: 50%;
    z-index: 2;
    transform: translateX(-50%);
    padding: 4px 7px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #d6d6d6;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.timeline-row.period-row {
    justify-content: center;
    min-height: 46px;
    margin: 10px 0;
}

.timeline-period-label {
    position: absolute;
    left: 50%;
    z-index: 2;
    transform: translateX(-50%);
    padding: 4px 7px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #d6d6d6;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.timeline-period-label.period_start {
    color: #2d7d46;
    border-color: #b8dfc3;
    background: #eef8f0;
}

.timeline-period-label.period_end {
    color: #c07000;
    border-color: #ffd18a;
    background: #fff4df;
}

.timeline-period-label.match_end {
    color: #c40000;
    border-color: #ffb8b8;
    background: #ffecec;
}

.timeline-row.comment-row {
    justify-content: center;
    min-height: 92px;
    margin: 16px 0;
}

.timeline-comment-box {
    position: absolute;
    left: 50%;
    z-index: 6;
    transform: translateX(-50%);
    width: min(360px, 72%);
    padding: 10px 14px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #d6d6d6;
    text-align: center;
    box-shadow: 0 2px 7px rgba(0,0,0,0.08);
}

.timeline-comment-time {
    font-size: 12px;
    font-weight: bold;
    color: #555;
    margin-bottom: 6px;
}

.timeline-comment-text {
    font-size: 14px;
    font-weight: bold;
    color: #111;
}

/* ================= TABLET ================= */

@media (max-width: 1150px) {
    .header {
        min-height: 74px;
        padding: 0 18px;
        grid-template-columns: 1fr auto;
        gap: 12px;
    }

    .header-left {
        font-size: 18px;
        gap: 10px;
    }

    .header-logo {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .header-center,
    .header-right {
        display: none;
    }

    .mobile-menu-button {
        display: inline-flex;
    }

    .match-info-rules {
        grid-template-columns: repeat(4, 1fr);
    }

    .bracket {
        flex-direction: column;
        align-items: center;
    }
}

/* ================= MOBILE ================= */

@media (max-width: 760px) {
    body {
        font-size: 15px;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding-left: 16px !important;
        padding-right: 16px !important;
        overflow-x: hidden;
    }

    h1 {
        font-size: 30px;
        line-height: 1.15;
    }

    h2 {
        font-size: 24px;
        line-height: 1.2;
    }

    .title-center {
        text-align: center;
    }

    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .team-columns,
    .lineups {
        display: block;
    }

    .team-columns > div,
    .lineups > div {
        width: 100%;
        margin-bottom: 24px;
    }

    .person-grid {
        grid-template-columns: 1fr;
    }

    .hall-card {
        flex-direction: column;
    }

    .hall-image {
        width: 100%;
        min-width: 0;
        height: 180px;
    }

    .match-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 16px 14px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        border-radius: 12px;
        overflow: hidden;
    }

    .match-main {
        display: grid !important;
        grid-template-columns: 1fr 72px 1fr !important;
        gap: 8px !important;
        align-items: center;
    }

    .match-team-link {
        font-size: 14px !important;
        gap: 6px !important;
        line-height: 1.15;
    }

    .match-team-link.home {
        justify-content: flex-start;
        text-align: left;
    }

    .match-team-link.away {
        justify-content: flex-end;
        text-align: right;
    }

    .team-logo-small {
        width: 28px !important;
        height: 28px !important;
        flex: 0 0 28px !important;
    }

    .match-score-link {
        font-size: 20px !important;
    }

    .match-status {
        font-size: 11px !important;
    }

    .match-bottom {
        font-size: 12px !important;
        line-height: 1.35;
        text-align: center;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    .match-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: min(92vw, 430px) !important;
        margin: 0 auto 24px !important;
        padding: 22px 16px !important;
        gap: 14px !important;
        border-radius: 22px !important;
        background: #fff !important;
        box-shadow: 0 10px 28px rgba(0,0,0,0.12) !important;
        text-align: center !important;
    }

    .match-header .team-box {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 12px !important;
        text-align: center !important;
        font-size: 24px !important;
        font-weight: 900 !important;
        line-height: 1.15 !important;
        color: #000 !important;
        text-decoration: none !important;
        overflow-wrap: anywhere !important;
        transform: none !important;
    }

    .match-header .team-box:first-child {
        order: 1 !important;
    }

    .match-header .match-score-big {
        order: 2 !important;
        width: 100% !important;
        margin: 0 !important;
        text-align: center !important;
        font-size: 50px !important;
        font-weight: 900 !important;
        line-height: 1 !important;
        letter-spacing: 1px !important;
    }

    .match-header .team-box:last-child {
        order: 3 !important;
    }

    .match-header .team-box img {
        width: 58px !important;
        height: 58px !important;
        flex: 0 0 58px !important;
        object-fit: contain !important;
        transform: none !important;
    }

    .match-header .team-box:hover,
    .match-header .team-box:hover img {
        transform: none !important;
    }

    .match-score-big > div,
    .match-score-big .status-red,
    .match-score-big .status-green,
    .match-score-big .status-orange,
    .match-score-big .status-gray {
        font-size: 16px !important;
        font-weight: 900 !important;
        letter-spacing: 2px !important;
        margin-top: 8px !important;
    }

    .match-meta {
        width: min(92vw, 430px) !important;
        margin: 0 auto 24px !important;
        text-align: center !important;
        font-size: 17px !important;
        line-height: 1.35 !important;
        color: #555 !important;
    }

    .match-meta strong {
        display: block !important;
        font-size: 19px !important;
        color: #555 !important;
        margin-bottom: 8px !important;
    }

    .match-info-rules {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .match-info-card {
        min-width: 0;
        padding: 10px 6px !important;
    }

    .match-info-label {
        font-size: 12px !important;
        line-height: 1.2;
    }

    .match-info-value {
        font-size: 13px !important;
    }

    .player-stats-row {
        grid-template-columns: 34px 1.3fr .8fr 30px 30px 30px 30px !important;
        gap: 5px !important;
        padding: 8px 6px !important;
        font-size: 12px !important;
    }

    .player-stats-team {
        font-size: 11px !important;
    }

    .timeline {
        max-width: 100%;
        overflow-x: hidden;
    }

    .timeline-box {
        width: 42%;
        font-size: 12px;
        padding: 9px;
    }

    .timeline-comment-box {
        width: min(320px, 88%);
    }
}

@media (max-width: 520px) {
    .header {
        padding: 0 14px;
        min-height: 68px;
    }

    .header-left {
        font-size: 16px;
    }

    .header-logo {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .mobile-nav {
        top: 68px;
    }

    .mobile-nav a {
        font-size: 17px;
    }

    .match-main {
        grid-template-columns: 1fr 62px 1fr !important;
    }

    .match-team-link {
        font-size: 13px !important;
    }

    .match-score-link {
        font-size: 18px !important;
    }

    .match-info-rules {
        grid-template-columns: 1fr 1fr !important;
    }
} 