/* =========================================
   PHARMORA SPORTS FEST 2026
   Main Stylesheet (purple + black theme)
========================================= */

:root {
    --black: #0b0610;
    --ink: #160a22;
    --deep: #24112f;
    --purple: #4b1c71;
    --violet: #6d28d9;
    --lilac: #d8b4fe;
    --gold: #d8b45a;
    --page: #f7f5f9;
    --line: #eee8f3;
}

/* ---------- RESET ---------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--page);
    color: var(--deep);
    line-height: 1.6;
}

section[id] {
    scroll-margin-top: 90px;
}


/* ---------- NAVBAR ---------- */

header {
    background: var(--black);
    color: white;
    border-bottom: 3px solid var(--violet);
    position: sticky;
    top: 0;
    z-index: 50;
}

.navbar {
    max-width: 1200px;
    margin: auto;
    padding: 16px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.navbar h1 {
    font-size: 17px;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 22px;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--lilac);
}


/* =========================================
   HERO
========================================= */

.hero {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    background: linear-gradient(135deg, #0b0610 0%, #24112f 35%, #4b1c71 72%, #6d28d9 100%);
    color: white;
    display: flex;
    align-items: center;
    padding: 80px 60px;
    border: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero-label {
    display: inline-block;
    color: #e9d5ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 20px;
}

.hero h2 {
    font-size: clamp(55px, 8vw, 95px);
    line-height: 0.9;
    letter-spacing: -4px;
    margin-bottom: 25px;
}

.hero h2 span {
    color: var(--lilac);
}

.hero p {
    color: #eeeeee;
    font-size: 19px;
    margin-bottom: 20px;
}

.hero h4 {
    color: #e9d5ff;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-block;
    padding: 13px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: 0.25s ease;
}

.primary-btn {
    background: white;
    color: var(--purple);
}

.primary-btn:hover {
    background: #f3e8ff;
    transform: translateY(-2px);
}

.secondary-btn {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hero-decoration {
    position: absolute;
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
    width: 260px;
    height: 260px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 90px;
    opacity: 0.8;
}


/* =========================================
   MAIN CONTENT
========================================= */

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 50px 20px;
}

section {
    background: #ffffff;
    border-radius: 12px;
    margin-bottom: 35px;
    border: 1px solid #ece6f1;
}

.rules,
.news,
.leaderboard,
.players,
.results,
.fixtures,
.more-sports,
.sports-board {
    padding: 40px;
}


/* ---------- SECTION HEADINGS ---------- */

.section-heading {
    margin-bottom: 30px;
}

.section-heading span {
    display: block;
    color: var(--violet);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.section-heading h2 {
    color: var(--deep);
    font-size: 32px;
    margin-bottom: 8px;
}

.section-heading p {
    color: #777777;
    font-size: 15px;
}

.empty-note {
    color: #888;
    font-size: 14px;
    padding: 6px 0;
}


/* =========================================
   NEWS
========================================= */

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 18px;
}

.news-card {
    background: #faf9fb;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: 0.25s ease;
}

.news-card:hover {
    border-color: #cdb4df;
    transform: translateY(-3px);
}

.news-card.featured {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--black), var(--purple));
    border-color: transparent;
    color: white;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #888;
}

.news-tag {
    background: var(--violet);
    color: white;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 9px;
    border-radius: 4px;
}

.news-card h3 {
    font-size: 20px;
    line-height: 1.3;
    color: var(--deep);
}

.news-body {
    font-size: 14.5px;
    color: #555;
    white-space: pre-line;
}

.news-body.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    align-self: flex-start;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--violet);
}

.news-card.featured h3 {
    font-size: 26px;
    color: white;
}

.news-card.featured .news-meta {
    color: #d8cbe0;
}

.news-card.featured .news-body {
    color: #eeeeee;
}

.news-card.featured .read-more {
    color: var(--lilac);
}


/* =========================================
   RULES
========================================= */

.rules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.rule-card {
    background: #faf9fb;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 25px;
    transition: 0.25s ease;
}

.rule-card:hover {
    border-color: #cdb4df;
    transform: translateY(-3px);
}

.rule-number {
    display: inline-block;
    color: var(--violet);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 14px;
}

.rule-card h3 {
    color: var(--deep);
    font-size: 18px;
    margin-bottom: 8px;
}

.rule-card p {
    color: #707070;
    font-size: 14px;
    line-height: 1.7;
}


/* =========================================
   TABLES (leaderboard, race results)
========================================= */

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead {
    background: var(--black);
    color: white;
}

th {
    padding: 15px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

td {
    padding: 17px 14px;
    border-bottom: 1px solid var(--line);
    color: #444444;
}

tbody tr {
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: #faf7fd;
}

tbody td:first-child {
    color: var(--violet);
    font-weight: 700;
}

tbody td:last-child {
    color: var(--purple);
    font-weight: 700;
}

tbody tr:nth-child(1) td:first-child {
    color: #b8860b;
}

tbody tr:nth-child(2) td:first-child {
    color: #777777;
}

tbody tr:nth-child(3) td:first-child {
    color: #a05a2c;
}


/* =========================================
   TOP PLAYERS (dark section)
========================================= */

.players {
    background: linear-gradient(160deg, var(--black), var(--ink) 55%, #2a1040);
    border-color: #2a1040;
    color: white;
}

.players .section-heading span {
    color: var(--lilac);
}

.players .section-heading h2 {
    color: white;
}

.players .section-heading p,
.players .empty-note {
    color: #b9a9cc;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.chip {
    background: transparent;
    color: #d8cbe0;
    border: 1px solid #4b1c71;
    border-radius: 999px;
    padding: 7px 16px;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s ease;
}

.chip:hover {
    border-color: var(--lilac);
}

.chip.active {
    background: var(--violet);
    border-color: var(--violet);
    color: white;
}

.player-row {
    display: grid;
    grid-template-columns: 44px 1fr minmax(120px, 200px) 56px;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(216, 180, 254, 0.15);
    border-radius: 10px;
    transition: 0.2s ease;
}

.player-row:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: var(--lilac);
}

.player-rank {
    font-size: 20px;
    font-weight: 700;
    color: var(--lilac);
    text-align: center;
}

.player-row.rank-1 .player-rank {
    color: var(--gold);
}

.player-row.rank-2 .player-rank {
    color: #c9c3d1;
}

.player-row.rank-3 .player-rank {
    color: #cd8a52;
}

.player-info strong {
    display: block;
    font-size: 16px;
}

.player-info span {
    font-size: 12.5px;
    color: #b9a9cc;
}

.rating-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.rating-bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--violet), var(--lilac));
    border-radius: 999px;
}

.player-row.rank-1 .rating-bar i {
    background: linear-gradient(90deg, #b8860b, var(--gold));
}

.player-rating {
    font-size: 22px;
    font-weight: 700;
    text-align: right;
}


/* =========================================
   RESULTS + FIXTURES
========================================= */

.match {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    margin-bottom: 12px;
    background: #faf9fb;
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: 0.2s ease;
}

.match:hover {
    border-color: #cdb4df;
}

.match span {
    color: #333333;
    font-weight: 500;
}

.match strong {
    color: var(--purple);
    font-size: 17px;
}

.results .match {
    cursor: pointer;
}

.fixtures .match {
    background: #f7f3fa;
    flex-wrap: wrap;
}

.fixtures .match p {
    flex-basis: 100%;
    text-align: center;
    color: #777777;
    font-size: 14px;
}


/* =========================================
   OTHER SPORTS (home tiles)
========================================= */

.sport-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.sport-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 26px 14px;
    background: var(--black);
    color: white;
    border: 1px solid #2a1040;
    border-radius: 12px;
    text-decoration: none;
    transition: 0.25s ease;
}

.sport-tile:hover {
    background: var(--purple);
    transform: translateY(-4px);
}

.sport-tile span {
    font-size: 34px;
}

.sport-tile strong {
    font-size: 14px;
    letter-spacing: 0.5px;
}


/* =========================================
   SPORTS PAGE
========================================= */

.page-hero {
    background: linear-gradient(135deg, var(--black), var(--purple) 70%, var(--violet));
    color: white;
    padding: 60px max(25px, calc((100% - 1100px) / 2));
}

.page-hero h2 {
    font-size: clamp(34px, 6vw, 56px);
    letter-spacing: -1px;
    line-height: 1.1;
    margin: 8px 0;
}

.page-hero p {
    color: #e9d5ff;
}

.page-hero .back-link {
    color: #e9d5ff;
    text-decoration: none;
    font-size: 14px;
}

.sport-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.sport-tab {
    background: white;
    color: var(--deep);
    border: 1px solid #d9cfe3;
    border-radius: 8px;
    padding: 10px 16px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.sport-tab:hover {
    border-color: var(--violet);
}

.sport-tab.active {
    background: var(--black);
    border-color: var(--black);
    color: white;
}

.category-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.sport-note {
    color: #777;
    font-size: 13px;
    margin-bottom: 6px;
}

.sub-title {
    font-size: 12px;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--violet);
    margin: 28px 0 12px;
}

.game-card {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    margin-bottom: 12px;
    background: #faf9fb;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.game-card .side {
    font-weight: 500;
    color: #333;
    overflow-wrap: anywhere;
}

.game-card .side.right {
    text-align: right;
}

.game-card .side.winner {
    color: var(--purple);
    font-weight: 700;
}

.game-score {
    background: var(--black);
    color: white;
    min-width: 84px;
    text-align: center;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
}

.game-score.upcoming {
    background: #ece3f6;
    color: var(--purple);
    font-size: 14px;
}

.game-meta {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 12.5px;
    color: #888;
}

.race-block {
    margin-bottom: 32px;
}

.race-block h3 {
    color: var(--deep);
    font-size: 20px;
    margin-bottom: 12px;
}

tr.podium-1 td {
    background: #fbf6e6;
}


/* =========================================
   FOOTER
========================================= */

footer {
    background: var(--black);
    color: #ffffff;
    text-align: center;
    padding: 30px 20px;
    margin-top: 30px;
}

footer p {
    font-size: 13px;
    color: #d8cbe0;
}

.watermark {
    font-size: small;
    font-style: italic;
    background: #1c1224;
    color: #ffffff;
    text-align: center;
    padding: 10px;
    margin-top: 10px;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 700px) {

    header {
        position: static;
    }

    .navbar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .nav-links {
        gap: 14px;
        justify-content: center;
    }

    .hero {
        min-height: 480px;
        padding: 70px 25px;
    }

    .page-hero {
        padding: 45px 25px;
    }

    .hero h2 {
        font-size: 55px;
        letter-spacing: -2px;
    }

    .hero p {
        font-size: 17px;
    }

    .hero-decoration {
        right: -80px;
        top: 75%;
        width: 220px;
        height: 220px;
        font-size: 70px;
    }

    main {
        padding: 30px 15px;
    }

    .rules,
    .news,
    .leaderboard,
    .players,
    .results,
    .fixtures,
    .more-sports,
    .sports-board {
        padding: 25px 18px;
    }

    .rules-grid {
        grid-template-columns: 1fr;
    }

    .section-heading h2 {
        font-size: 27px;
    }

    .news-card.featured h3 {
        font-size: 21px;
    }

    table {
        min-width: 560px;
    }

    .player-row {
        grid-template-columns: 36px 1fr 52px;
        gap: 8px 12px;
        padding: 14px;
    }

    .player-rank {
        grid-row: 1;
        grid-column: 1;
    }

    .player-info {
        grid-row: 1;
        grid-column: 2;
    }

    .player-rating {
        grid-row: 1;
        grid-column: 3;
    }

    .rating-bar {
        grid-row: 2;
        grid-column: 2 / 4;
    }

    .game-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .game-card .side.right {
        text-align: center;
    }

    .game-score {
        justify-self: center;
    }
}


/* =========================================
   OVERALL PSF POINTS
========================================= */

.overall {
    padding: 40px;
}

.champion-banner {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 24px 28px;
    margin-bottom: 26px;
    border-radius: 12px;
    border: 2px solid var(--gold);
    background: linear-gradient(135deg, var(--black), var(--purple));
    color: white;
}

.champion-trophy {
    font-size: 52px;
    line-height: 1;
}

.champion-label {
    display: block;
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 4px;
}

.champion-name {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.champion-points {
    color: #e9d5ff;
    font-size: 14px;
    margin-top: 2px;
}

.breakdown {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 400;
    color: #888;
}

@media (max-width: 700px) {
    .overall {
        padding: 25px 18px;
    }

    .champion-banner {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .champion-name {
        font-size: 24px;
    }
}