﻿:root {
    --js-bg: #F5F7FB; /* #F4F7FB;*/
    --js-card-bg: #FFFFFF;
    --js-primary: #008000;          /* main green 1E7F2D */
    --js-primary-dark: #155D22;     /* darker hover 155D22*/
    --js-primary-soft: #E6F4EA;     /* soft green hover bg E6F4EA*/
    --js-accent: #34C759;           /* accent green */
    --js-text-main: #111827;
    --js-text-muted: #6B7280;
    --js-border-subtle: #E5E7EB;

    --js-success: #16A34A;
    --js-success-dark: #15803D;
    --js-error: #DC2626;
}


/* Global Reset and Base Styles */
html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: var(--js-bg);
    color: var(--js-text-main);
}

a {
    text-decoration: none;
    color: var(--js-text-main); /* dark readable text */
    font-weight: 500;
}

a:hover {
    color: var(--js-primary);   /* green on hover */
    text-decoration: underline;
}

h1, h2 {
    text-align: center;
    color: var(--js-text-main);
}

h3, h4 {
    text-align: left;
    color: var(--js-text-main);
}

/* Keep button text white on hover (override global a:hover) */
a.button:hover,
.button:hover,
.qt-cta:hover {
    color: #fff !important;
    text-decoration: none;
}

/* Header Section */
#header {
    height: 80px;
    width: 100%;
    background: var(--js-primary); /* Main header/nav color */
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Home Image Section */
#homeimg {
    height: 100%;
    display: flex;
    align-items: center;
    text-align: center;
    padding: 10px;
}

#homeimg img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

#homeimg a img {
    height: 60px;
    max-height: 100%;
    object-fit: contain;
    float: left;
}

/* Media query for smaller screens */
@media screen and (max-width: 768px) {
    #homeimg img {
        max-width: 80%;
    }
}

/* Login Section */
#loginhead {
    float: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    height: 100%;
}

/* Force 13px font size for all elements inside #loginhead */
#loginhead,
#loginhead * {
    font-size: 13px !important;
    line-height: 1.2;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#loginhead input,
#loginhead a,
#loginhead button {
    font-size: 13px !important;
}

#loginhead input[type=email],
#loginhead input[type=password],
#loginhead input[type=submit] {
    font-size: 13px !important;
    padding: 2px;
    height: auto;
    line-height: normal;
}

/* Navigation */
#nav {
    width: 100%;
    height: 40px;
    background: var(--js-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    margin-bottom: 20px;
}

#nav ul {
    display: flex;
    padding: 0;
    margin: 0;
    list-style: none;
}

#nav li {
    padding: 0 20px;
}

#nav li a {
    font-size: 18px;
    color: white;
}

/* Main Content Section */
#container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 0;
}

#maincontainer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    background: var(--js-card-bg);
    border-radius: 5px;
    padding: 20px;
}

#maincontentholder {
    flex: 1;
    min-width: 300px;
    max-width: 840px;
    min-height: 350px;
    background: var(--js-card-bg);
    border-radius: 25px;
    padding: 20px;
}

/* Left side menu block on some pages */
/* Left sidebar card */
#sidemenu {
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
#sidemenu a,
.leftmenu a {
    display: block;
    color: #111827;            /* dark text */
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 6px;
}

#sidemenu a:hover,
.leftmenu a:hover {
    background-color: var(--js-primary-soft);
    color: var(--js-primary-dark);
}

#sidemenu a {
    margin-bottom: 10px;
}

#sidemenu a:hover::before {
    content: "› ";
    color: var(--js-primary);
}


/* Footer Section */
#footer {
    height: 66px;
    background: var(--js-primary);
    color: white;
    text-align: center;
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Generic button style (used by .button and tipping nav) */
.button {
    background: var(--js-primary);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, box-shadow 0.2s ease;
    text-align: center;
    display: inline-block;
    border: none;
}

.button:hover {
    background: var(--js-primary-dark);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    #maincontainer {
        flex-direction: column;
        padding: 10px;
    }

    #header {
        font-size: 20px;
        text-align: center;
    }

    #nav ul {
        flex-direction: column;
    }

    #nav li {
        padding: 10px 0;
    }

    #maincontentholder {
        width: 100%;
    }
}

@media (max-width: 480px) {
    #header {
        font-size: 18px;
        padding: 10px;
    }

    #nav {
        height: auto;
        flex-wrap: wrap;
    }

    #nav li {
        padding: 5px 0;
    }
}

/* Ads - old before reduction
.topadsearch {
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 0;
    background: var(--js-card-bg);
} */

.topadsearch {
  max-width: 1200px;
  /*margin: 12px auto 18px;
  padding: 8px 10px;*/
  background: var(--js-card-bg);
  border: 1px solid var(--js-border-subtle);
  border-radius: 12px;
  overflow: hidden;
}

.topadsearch ins,
.topadsearch iframe {
  max-width: 100% !important;
}


.footerad {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 10px 0;
    text-align: center;
    background: var(--js-card-bg);
}

.ad {
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.fullwidth-ad {
    max-width: 1200px;
    /*margin: 12px auto 18px;
    padding: 8px 12px;*/
    background: var(--js-card-bg);
    border: 1px solid var(--js-border-subtle);
    border-radius: 1px;
}

/* Prevent giant visual dominance */
.fullwidth-ad ins,
.fullwidth-ad iframe {
    max-width: 100% !important;
}

/* Make ad-label text subtle */
.adtext {
    font-size: 10px;
    color: #9CA3AF;
    text-align: center;
    margin: 4px 0;
}

/* Forms */
.form-wrapper {
    width: 100%;
    max-width: 450px;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.formbg {
    width: 100%;
    background: var(--js-card-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.formbg h2 {
    font-size: 22px;
    color: var(--js-primary);
}

.formbg input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.formbg button {
    width: 100%;
}

/* Content + left menu layout */
.title {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: var(--js-primary-dark);
}

.title h1 {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 10px 0 20px;
    color: var(--js-primary-dark);
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.title h1:after {
    content: "";
    display: block;
    height: 3px;
    width: 180px;
    background: var(--js-primary);
    border-radius: 999px;
    margin: 10px auto 0;
}

.content-container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

/* Left menu styles */
#leftmenu {
    flex: 0 0 160px;
    background-color: #FFFFFF;
    /*background-color: #f0f0f0;*/
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.leftad {
    flex: 0 0 130px;
}

/* Form container (main pane) */
.form-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    background: var(--js-card-bg);
    padding: 20px;
    margin-top: 20px;
}

/* Mobile-specific adjustments */
@media screen and (max-width: 768px) {
    header img {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .content-container {
        flex-direction: column;
        align-items: center;
    }

    #leftmenu {
        width: 100%;
        margin-bottom: 20px;
    }

    .form-container {
        width: 100%;
    }
}

.title h1 {
    font-size: 32px;
}
  
/* Left menu items */
.leftmenu {
    width: 160px;
    margin: auto;
    list-style: none;
}

.leftmenu a {
    color: var(--js-text-main);
    text-decoration: none;
    margin-bottom: 10px;
}

/* Watch page */
.game {
    margin: 15px 0;
}

/* Use primary accent instead of red */
.watch-now {
    color: var(--js-primary);
    text-decoration: none;
}
.watch-now:hover {
    text-decoration: underline;
}

.embed-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
}

.embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
	margin-bottom: 40px;    
	font-size: 16px;
}

.pagination a {
    text-decoration: none;
    color: var(--js-primary);
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.pagination a:hover {
    background: var(--js-primary);
    color: #fff;
}

.pagination a.active {
    background: var(--js-primary-dark);
    color: white;
    pointer-events: none;
    border: 1px solid var(--js-primary-dark);
}

/* Tipping layout */
.sidebar {
    float: left;
    width: 25%;
    background-color: #f4f4f4;
    padding: 10px;
    box-sizing: border-box;
}

#games-container {
    float: right;
    width: 70%;
    padding: 10px;
    box-sizing: border-box;
}

.selection-boxes {
    margin-top: 10px;
}

.selection-boxes label {
    display: inline-block;
    margin-right: 10px;
    cursor: pointer;
}

/* Content-type chips */
.content-type-headings h4 {
    margin-bottom: 16px;
    font-size: 16px;
    color: var(--js-text-muted);
    font-weight: 600;
}

.content-type-headings ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

.content-type-headings ul li {
    background-color: #F3F4F6; /* soft neutral */
    border-radius: 999px;
    padding: 10px 16px;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.content-type-headings ul li a {
    color: #111827;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    display: block;
}

.content-type-headings ul li:hover {
    background-color: var(--js-primary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.content-type-headings ul li:hover a {
    color: #FFFFFF;
}

.content-type-headings ul li.active {
    background-color: var(--js-primary);
}

.content-type-headings ul li.active a {
    color: #FFFFFF;
}

.add-video-cta {
    margin-top: 24px;
    text-align: center;
}

.add-video-cta a {
    display: inline-block;
    background-color: var(--js-primary-soft);
    color: var(--js-primary-dark);
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.add-video-cta a:hover {
    background-color: var(--js-primary);
    color: #FFFFFF;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}


/* Mobile tipping layout */
@media (max-width: 768px) {
    .content-wrapper {
        display: flex;
        flex-direction: column;
    }

    .sidebar {
        order: 1;
        width: 100%;
    }

    #games-container {
        order: 2;
    }

    .sidebar h4 {
        text-align: center;
    }

    .round-dropdown {
        display: block;
        width: 100%;
        margin: 10px auto;
    }
}

/* Score entry layout */
.score-entry-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.team-score-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.team-score-container input {
    width: 50px !important;
    text-align: center;
    font-size: 14px;
    padding: 5px;
}

.vs-text {
    font-weight: bold;
    font-size: 16px;
}

.score-entry-form button {
    padding: 5px 10px;
    font-size: 14px;
    white-space: nowrap;
}

/* Mobile score entry */
@media (max-width: 600px) {
    .score-entry-form {
        flex-direction: column;
        align-items: center;
    }

    .team-score-container {
        flex-direction: column;
        align-items: center;
    }

    .team-score-container label {
        text-align: center;
    }

    .team-score-container input {
        width: 60px !important;
        font-size: 16px;
    }

    .vs-text {
        margin-bottom: 10px;
    }

    .score-entry-form button {
        width: 100%;
        max-width: 150px;
        font-size: 16px;
        padding: 8px;
    }
}

/* Widen games container on mobile */
@media (max-width: 768px) {
    #games-container {
        width: 100%;
        max-width: 100%;
        padding: 10px;
        box-sizing: border-box;
    }

    .game {
        width: 100%;
        max-width: 100%;
        padding: 10px;
        border-bottom: 1px solid #ddd;
    }

    .round-dropdown {
        width: 100%;
    }
}

/* Account forms spacing */
.update-section {
    margin-bottom: 20px;
}

/* Extra responsive tweaks */
@media (max-width: 768px) {
    #maincontentholder {
        padding: 15px;
    }

    input[type=text],
    input[type=email],
    input[type=password] {
        font-size: 14px;
        padding: 6px;
    }

    input[type=submit],
    button {
        font-size: 14px;
        padding: 8px;
    }
}

/* Centered login form */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 400px;
    width: 100%;
    margin: 40px auto;
    padding: 20px;
    background: var(--js-card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.login-container h2 {
    text-align: center;
    font-size: 22px;
    color: var(--js-primary);
    margin-bottom: 15px;
}

.login-container input[type=text],
.login-container input[type=password] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

.login-container input[type=submit] {
    width: 100%;
}

.login-container a {
    display: block;
    text-align: center;
    margin-top: 15px;
    font-size: 16px;
}

.login-container a:hover {
    text-decoration: underline;
}

.error-message {
    text-align: center;
    color: var(--js-error);
    font-size: 16px;
    margin-bottom: 15px;
}

/* Responsive login */
@media (max-width: 480px) {
    .login-container {
        width: 90%;
        padding: 15px;
    }
}

@media (min-width: 769px) {
    .login-container {
        margin-left: auto;
        margin-right: auto;
        max-width: 400px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

/* Global submit/button styling */
input[type=submit],
button {
    background-color: var(--js-primary) !important;
    color: white !important;
    padding: 12px;
    font-size: 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.2s;
}

input[type=submit]:hover,
button:hover {
    background-color: var(--js-primary-dark) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
}

/* Alerts */
.alert {
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
}

.alert.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Ad label */
.adtext {
    font-size: 8px;
    font-style: italic;
    text-align: center;
    margin: auto;
    display: block;
    color: #777;
}

/* Standings table */
.standings-container {
    max-width: 100%;
    margin: 0 auto;
    overflow-x: auto;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.standings-container table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
}

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

.standings-container thead th {
    position: sticky;
    top: 0;
    background-color: var(--js-primary);
    color: #fff;
    z-index: 2;
}

/* Sticky username column */
.standings-container thead th:nth-child(2) {
    left: 0;
    background-color: var(--js-primary);
    color: #fff;
    z-index: 3;
    min-width: 150px;
    border-right: 2px solid #ddd;
}

.standings-container tbody td:nth-child(2) {
    position: sticky;
    left: 0;
    background-color: #fff;
    color: #000;
    z-index: 2;
    min-width: 150px;
    border-right: 2px solid #ddd;
}

/* Standings mobile tweaks */
@media (max-width: 768px) {
    .standings-container table {
        min-width: 600px;
        font-size: 14px;
    }

    .standings-container th,
    .standings-container td {
        padding: 6px;
    }

    .standings-container thead th {
        padding: 8px;
    }
}

span.completed-tick {
    color: var(--js-primary);
    font-weight: bold;
    margin-left: 5px;
}

/* Action button nav tipping menu */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.action-buttons .button {
    padding: 10px 20px;
    min-width: 140px;
}

.action-buttons .button:hover {
    background-color: var(--js-primary-dark);
}

@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .action-buttons .button {
        width: 80%;
    }
}

.hidden-row {
    display: none;
}

/* Admin tabs */
.admin-tabs a {
    text-decoration: none;
    color: var(--js-primary-dark);
    padding: 5px 10px;
    display: inline-block;
}

.admin-tabs a:hover {
    background-color: var(--js-primary-soft);
    border-radius: 5px;
    text-decoration: underline;
}


/* Quiz teaser block */
.quiz-teaser { max-width: 900px; margin: 24px auto; }
.qt-title { text-align:center; color: var(--js-primary-dark); margin-bottom:10px; }
.qt-card { background:#fff; border:1px solid #e4e4e4; border-radius:12px; padding:18px 20px; box-shadow:0 2px 10px rgba(0,0,0,.04); }
.qt-question { font-size:1.1rem; margin:0 0 10px; }
.qt-options { margin:0 0 16px 18px; }
.qt-options li { color:#666; }
.qt-cta { display:inline-block; padding:10px 16px; border-radius:8px; background:var(--js-primary); color:#fff; text-decoration:none; }
.qt-cta:hover { background:var(--js-primary-dark); }
.qt-alt { margin-top:8px; color:#666; font-size:.95rem; }
.qt-alt a {
    color: var(--js-primary);
    font-weight: 600;
}

.qt-alt a:hover {
    color: var(--js-primary-dark);
    text-decoration: underline;
}

/* Header account links on the right */
#loginhead a {
    color: #E0F2FF;          /* light blue/near white */
    font-weight: 600;
    letter-spacing: 0.03em;
}

#loginhead a:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

/* Tipping nav buttons – keep text white & darken background on hover */
.action-buttons .button,
.action-buttons a.button {
    color: #FFFFFF !important;
    background-color: var(--js-primary);
}

.action-buttons .button:hover,
.action-buttons a.button:hover {
    background-color: var(--js-primary-dark);
    color: #FFFFFF !important;
}

/* Optional: automatic dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --js-bg: #0B1220;
        --js-card-bg: #0F172A;

        /* Keep theme GREEN in dark mode */
        --js-primary: #0F7A2A;
        --js-primary-dark: #0B5A1F;
        --js-primary-soft: #12351D;
        --js-accent: #34C759;

        --js-text-main: #E5E7EB;
        --js-text-muted: #9CA3AF;
        --js-border-subtle: #1F2937;
    }

    body {
        background: var(--js-bg);
        color: var(--js-text-main);
    }

    #maincontainer,
    #maincontentholder,
    .qt-card,
    #leftmenu,
    #sidemenu {
        background: var(--js-card-bg);
        border-color: var(--js-border-subtle);
    }

    /* Keep sticky standings column readable */
    .standings-container tbody td:nth-child(2) {
        background-color: var(--js-card-bg);
        color: var(--js-text-main);
    }

   .title h1:after {
        width: 120px;
    }

}

    
    
/* Inline join forms on "Join A League" page */
.join-league-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 5px; /* small spacing from league name */
}

.join-league-form input[type=password] {
    width: 160px;
    padding: 6px 8px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
}

/* Reuse your blue button style, but a bit more compact */
.join-league-form input[type=submit] {
    background-color: var(--js-primary) !important;
    color: #fff !important;
    padding: 6px 14px;
    font-size: 14px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.join-league-form input[type=submit]:hover {
    background-color: var(--js-primary-dark) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.16);
}

.join-league-form button {
    background-color: var(--js-primary) !important;
    color: #fff !important;
    padding: 6px 14px;
    font-size: 14px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.join-league-form button:hover {
    background-color: var(--js-primary-dark) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.16);
    color: #fff !important;
}
