
/* =========================================
   CHOLAKKULAM SUPER LEAGUE
   OFFICIAL WEBSITE DESIGN
========================================= */

:root {
    --bg: #0c1812;
    --surface: #13251b;
    --card: #192d21;
    --card-hover: #233e2e;
    --border: #35483b;
    --gold: #d5bd83;
    --gold-light: #f0dca7;
    --text: #f3f5f3;
    --muted: #a0b3a6;
    --green: #8cdbab;
    --red: #ef7474;
    --radius: 14px;
    --shadow: 0 8px 24px rgba(0,0,0,.18);
}


/* GLOBAL RESET */

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

html {
    scroll-behavior: smooth;
    color-scheme: dark;
}

body {
    font-family: Inter, -apple-system,
        BlinkMacSystemFont, "Segoe UI",
        Arial, sans-serif;

    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-tap-highlight-color: transparent;
}

[hidden] {
    display: none !important;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

button {
    border: 0;
}

button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 4px;
}

img {
    max-width: 100%;
    display: block;
}

svg {
    flex-shrink: 0;
    vertical-align: middle;
}

h1, h2, h3, h4 {
    line-height: 1.35;
}


/* HEADER */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;

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

    padding: 15px max(
        16px,
        calc((100% - 1200px) / 2)
    );

    background: rgba(12,24,18,.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-logo {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--gold);
}

.brand-logo svg {
    width: 28px;
    height: 28px;
}

.brand-text h1 {
    font-size: clamp(11px, 2.7vw, 18px);
    font-weight: 800;
    letter-spacing: .5px;
    color: var(--gold);
}

.brand-text p {
    font-size: 11px;
    color: var(--muted);
    margin-top: 3px;
}

.icon-button {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    color: var(--gold);
}

.icon-button:hover {
    background: var(--card-hover);
}


/* SIDE MENU */

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(3px);
    z-index: 199;
}

.side-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 88vw);
    background: var(--surface);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow);
    z-index: 200;
    padding: 20px;
    overflow-y: auto;
}

.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.menu-header h2 {
    color: var(--gold);
    font-size: 17px;
}

.menu-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
}

.menu-links a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 10px;
    font-size: 14px;
}

.menu-links a:hover {
    background: var(--card-hover);
}

.menu-links svg {
    width: 20px;
    height: 20px;
    color: var(--gold);
}

.menu-links .admin-link {
    margin-top: 20px;
    border: 1px solid var(--border);
    color: var(--gold);
}


/* MAIN CONTAINER */

.main-container {
    width: 100%;
    max-width: 1232px;
    padding: 24px 16px 40px;
    margin: 0 auto;
    flex: 1;
}

.page {
    width: 100%;
    min-width: 0;
}


/* HERO BANNER */

.hero-section {
    position: relative;
    overflow: hidden;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 35px 20px;

    background: linear-gradient(
        135deg,
        #183b27,
        #254d34,
        #10291b
    );

    border: 1px solid #42634b;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.hero-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;

    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(213,189,131,.13),
            transparent 45%
        ),
        repeating-linear-gradient(
            125deg,
            transparent 0px,
            transparent 45px,
            rgba(255,255,255,.025) 46px,
            transparent 47px
        );
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
}

.season-badge {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid rgba(213,189,131,.4);
    border-radius: 30px;
    background: rgba(0,0,0,.12);
    color: var(--gold-light);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.hero-content h2 {
    font-size: clamp(36px, 7vw, 64px);
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--gold-light);
    margin: 14px 0 6px;
    overflow-wrap: anywhere;
}

.hero-content p {
    font-size: 14px;
    color: #d4e2d7;
}

.hero-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}


/* BUTTONS */

.primary-button,
.secondary-button,
.back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 18px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    transition: background .2s;
}

.primary-button {
    background: var(--gold);
    color: var(--bg);
}

.primary-button:hover {
    background: var(--gold-light);
}

.secondary-button,
.back-button {
    background: var(--card);
    color: var(--gold);
    border: 1px solid var(--border);
}

.secondary-button:hover,
.back-button:hover {
    background: var(--card-hover);
}

.primary-button svg,
.secondary-button svg,
.back-button svg {
    width: 17px;
    height: 17px;
}


/* SEASON SELECTOR */

.season-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);

    padding: 14px;
    margin: 22px 0;
}

.selector-label {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 600;
}

.selector-label svg {
    color: var(--gold);
    width: 19px;
    height: 19px;
}

select,
input,
textarea {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 11px 12px;
    color: var(--text);
    min-width: 0;
    font-size: 14px;
}

select:focus,
input:focus,
textarea:focus {
    border-color: var(--gold);
    outline: none;
}

.season-selector select {
    width: min(50%, 250px);
}


/* SECTION HEADINGS */

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 25px 0 14px;
}

.section-heading h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 17px;
    font-weight: 700;
}

.section-heading a {
    font-size: 12px;
    color: var(--gold);
}


/* MAIN MODULE GRID */

.module-grid {
    display: grid;
    grid-template-columns: repeat(
        3, minmax(0, 1fr)
    );
    gap: 12px;
}

.module-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;

    min-height: 110px;
    padding: 16px 6px;

    background: linear-gradient(
        145deg,
        var(--card),
        var(--surface)
    );

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

    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);

    transition:
        transform .2s,
        background .2s,
        border-color .2s;
}

.module-card svg {
    width: 29px;
    height: 29px;
    color: var(--gold);
    stroke-width: 1.7;
}

.module-card span {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.module-card:hover {
    background: var(--card-hover);
    border-color: var(--gold);
    transform: translateY(-3px);
}

.module-card:active {
    transform: scale(.97);
}


/* INNER PAGES */

.page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.page-header h2 {
    font-size: clamp(18px, 4vw, 25px);
    color: var(--gold);
}

.page-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.page-filters:empty {
    display: none;
}

.page-filters input,
.page-filters select {
    flex: 1 1 150px;
    max-width: 100%;
}

.page-content {
    min-height: 200px;
    overflow-wrap: anywhere;
}

.page-content > * + * {
    margin-top: 16px;
}


/* GENERAL CONTENT CARDS */

.card,
.content-card,
.team-card,
.player-card,
.season-card,
.news-card,
.match-card,
.stat-card,
.award-card,
.committee-card,
.gallery-card,
.wallet-card {

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    min-width: 0;
    overflow: hidden;
}

.card h3,
.content-card h3,
.team-card h3,
.player-card h3,
.season-card h3,
.news-card h3 {
    color: var(--gold);
    font-size: 16px;
    margin-bottom: 6px;
}

.card p,
.content-card p,
.team-card p,
.player-card p,
.season-card p,
.news-card p {
    font-size: 13px;
    color: var(--muted);
}

.card-grid,
.team-grid,
.player-grid,
.season-grid,
.news-grid,
.gallery-grid,
.awards-grid,
.committee-grid,
.stats-grid,
.wallet-grid {

    display: grid;
    grid-template-columns: repeat(
        auto-fill,
        minmax(min(100%, 230px), 1fr)
    );

    gap: 14px;
}

.team-card,
.player-card,
.award-card,
.committee-card {
    text-align: center;
}

.team-logo,
.player-photo,
.profile-photo,
.member-photo {
    width: 85px;
    height: 85px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 14px;
    background: var(--card);
    border: 2px solid var(--border);
}

.team-logo {
    object-fit: contain;
    padding: 5px;
}

.news-image,
.gallery-image,
.cover-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 9px;
    margin-bottom: 12px;
}


/* STATUS BADGES */

.badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 30px;
    background: var(--card-hover);
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
}

.badge.live,
.status-live,
.status-open {
    color: var(--green);
    background: rgba(60,170,100,.12);
}

.status-closed,
.status-cancelled {
    color: var(--red);
    background: rgba(239,116,116,.1);
}


/* LIVE MATCHES */

.live-match-section,
.home-section {
    margin-top: 24px;
}

.live-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ef4444;
    animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: .4;
    }
}

.match-card {
    margin-bottom: 12px;
}

.match-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 12px;
    color: var(--muted);
}

.match-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.match-team {
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
}

.match-team img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin: 0 auto 8px;
}

.match-score {
    font-size: clamp(24px, 6vw, 38px);
    font-weight: 800;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
}

.match-footer {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    margin-top: 16px;
}


/* POINTS TABLE AND STATISTICS */

.table-wrapper,
.table-responsive {
    width: 100%;
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

th,
td {
    padding: 13px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

th {
    color: var(--gold);
    background: var(--card);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover {
    background: var(--card);
}

.points,
.stat-value {
    font-weight: 800;
    color: var(--green);
}

.stat-value {
    font-size: 26px;
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
}

.positive {
    color: var(--green);
}

.negative {
    color: var(--red);
}


/* FORMS */

.form-card {
    max-width: 760px;
    margin: 0 auto;
    padding: 22px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 18px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
}

.form-group textarea {
    min-height: 110px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

input[type="checkbox"] {
    accent-color: var(--gold);
    width: 18px;
    height: 18px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
}


/* EMPTY AND ERROR STATES */

.empty-state,
.error-state,
.coming-soon {
    padding: 45px 20px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.empty-state svg,
.error-state svg,
.coming-soon svg {
    width: 38px;
    height: 38px;
    color: var(--gold);
    margin-bottom: 14px;
}

.empty-state h3,
.error-state h3,
.coming-soon h3 {
    font-size: 17px;
    margin-bottom: 8px;
}

.empty-state p,
.error-state p,
.coming-soon p {
    color: var(--muted);
    font-size: 13px;
}

.error-state svg {
    color: var(--red);
}


/* LOADING */

.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--muted);
    font-size: 13px;
}

.spinner {
    width: 34px;
    height: 34px;
    border: 3px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* NOTIFICATION TOAST */

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;

    width: max-content;
    max-width: calc(100vw - 32px);

    background: var(--card-hover);
    border: 1px solid var(--gold);
    border-radius: 12px;
    color: var(--text);
    padding: 14px 20px;
    box-shadow: var(--shadow);
    font-size: 13px;
}


/* FOOTER */

.site-footer {
    text-align: center;
    padding: 30px 16px;
    background: #09130d;
    border-top: 1px solid var(--border);
}

.footer-logo {
    color: var(--gold);
    margin-bottom: 12px;
}

.footer-logo svg {
    width: 32px;
    height: 32px;
}

.site-footer h3 {
    color: var(--gold);
    font-size: 13px;
    letter-spacing: 1px;
}

.site-footer p {
    color: var(--muted);
    font-size: 12px;
    margin-top: 7px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    margin: 18px 0;
    font-size: 12px;
}

.footer-links a:hover {
    color: var(--gold);
}

.site-footer .copyright {
    font-size: 11px;
    opacity: .8;
}


/* SCROLLBAR */

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}


/* TABLET */

@media (min-width: 600px) {

    .main-container {
        padding: 28px 24px 45px;
    }

    .module-grid {
        gap: 15px;
    }

    .module-card {
        min-height: 125px;
    }

    .module-card span {
        font-size: 14px;
    }

    .module-card svg {
        width: 32px;
        height: 32px;
    }

    .hero-section {
        min-height: 290px;
    }

}


/* DESKTOP - SIX COLUMNS */

@media (min-width: 1024px) {

    .module-grid {
        grid-template-columns: repeat(
            6, minmax(0, 1fr)
        );
        gap: 16px;
    }

    .module-card {
        min-height: 135px;
    }

    .hero-section {
        min-height: 320px;
    }

    .section-heading h2 {
        font-size: 20px;
    }

}


/* SMALL MOBILE DEVICES */

@media (max-width: 380px) {

    .main-container {
        padding: 16px 10px 30px;
    }

    .site-header {
        padding: 12px 10px;
    }

    .brand {
        gap: 8px;
    }

    .brand-logo {
        width: 36px;
        height: 36px;
    }

    .brand-logo svg {
        width: 23px;
        height: 23px;
    }

    .module-grid {
        gap: 8px;
    }

    .module-card {
        min-height: 95px;
        padding: 12px 4px;
    }

    .module-card span {
        font-size: 11px;
    }

    .module-card svg {
        width: 25px;
        height: 25px;
    }

    .hero-content h2 {
        font-size: 34px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

}


/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }

}
