/* General Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #121212;
    color: #ffffff;
    text-align: center;
    margin: 0;
    padding: 0;
}

/* Make tables responsive on small screens */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
        display: block;
        width: 100%;
    }

    .table-responsive table {
        width: 100%;
        min-width: 600px; /* Ensures horizontal scroll instead of squishing */
    }
}

/* Page Titles */
.league-title, .games-title, .page-title {
    font-size: 2em;
    margin: 20px 0;
}

.page-title {
    font-size: 24px;
    font-weight: bold;
    color: #f8f8f8;
}

/* League Information */
.league-info {
    font-size: 1.2em;
    margin-bottom: 5px;
}

/* Containers */
.container {
    width: 50%;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

/* Cards */
.card {
    background: #333;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}
@media (max-width: 768px) {
    .card {
        padding: 15px;
        max-width: 85%;  /* widen on small screens */
    }
}

/* Form Groups */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}

/* Labels & Inputs */
label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

input, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

input[readonly] {
    background: #f8f8f8;
    color: #555;
}

/* Chat Container */
#chat-container {
    width: 70%;
    max-width: 700px;
    margin: 20px auto;
    background: #1E1E1E;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    #chat-container {
        width: 95%;
    }
}

/* Chat Messages */
#chat-messages {
    height: 300px;
    overflow-y: auto;
    border-bottom: 1px solid #444;
    padding: 10px;
    text-align: left;
}

.chat-message {
    padding: 10px;
    margin: 8px 0;
    border-radius: 8px;
    background: #2A2A2A;
    display: flex;
    flex-direction: column;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Chat Timestamp */
.timestamp {
    font-size: 0.8em;
    color: gray;
}

/* Chat Input */
#chat-input-area {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

#chat-input {
    flex-grow: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background: #333;
    color: white;
    outline: none;
}

/* Send Message Button */
#send-message {
    margin-left: 10px;
    padding: 10px 15px;
    background: #FF5733;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
}

#send-message:hover {
    background: #E74C3C;
}

/* Fade-in Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Tables (Standings, Games, Prize Pool) */
.table {
    width: 100%;
    margin: 20px auto;
    border-collapse: collapse;
    background: #1E1E1E;
    border-radius: 10px;
    overflow: hidden;
    color: white;
}

.table th, .table td {
    padding: 10px;
    border: 1px solid #444;
    text-align: center;
}

.table th {
    background: #333;
}

.table tr:nth-child(even) {
    background: #2A2A2A;
}

@media (max-width: 768px) {
    .table {
        font-size: 0.85em;
    }

    .table td,
    .table th {
        padding: 6px 4px;
    }

    .table td[colspan="4"] {
        font-size: 0.9em;
    }

    .highlighted-row td {
        font-weight: bold;
    }
}

/* Standings & Prize Pool Layout */
.standings-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;  /* Allows wrapping if needed */
}

/* Mobile override */
@media (max-width: 768px) {
    .standings-container {
        flex-direction: column;
        gap: 10px;
    }
}

.standings-section {
    flex: 1;
    background: #121212;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}

/* Lock Button */
.lock-button {
    background-color: #007bff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
}

.lock-button:hover {
    background-color: #e6b800;
}

/* Primary Button */
.btn-primary {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
}

.btn-primary:hover {
    background-color: #0056b3;
}

/* Info Icon */
.info-icon {
    cursor: pointer;
    font-size: 16px;
    margin-left: 5px;
    color: #007bff;
    display: inline-block;
}

.info-icon::after {
    content: attr(data-tooltip); /* This reads the tooltip text */
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    width: 250px;
    font-size: 12px;
    line-height: 1.4;
    white-space: pre-line;
    z-index: 10;
    display: none;  /* Hide by default */
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
}
/* Show Tooltip on Hover */
.info-icon:hover::after {
    display: block;
}
/* Properly align the Include Parlays? label and checkbox */
.parlay-group {
    display: flex;
    align-items: center;
    gap: 8px; /* Adds spacing between label and checkbox */
}

.parlay-group label {
    margin-bottom: 0; /* Prevents extra spacing */
}

.parlay-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}
/* Ensure input fields fit within their container */
input, select {
    width: 100%;
    max-width: 475px; /* Restrict width to prevent overflow */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}
/* Style the Details text box to match the form */
#details {
    width: 100%; /* Ensures it fits within the form */
    max-width: 475px; /* Matches other input fields */
    height: 50px; /* Adjusts height */
    padding: 10px;
    border: 1px solid #444; /* Darker border to match the theme */
    border-radius: 5px;
    resize: vertical; /* Allows users to resize vertically */
    background: #f8f8f8; /* Dark background like the form */
    color: #555; /* White text to match other input fields */
    font-size: 16px;
    outline: none;
}

#details::placeholder {
    color: #aaa; /* Light gray placeholder text */
    font-style: italic;
}

/* Sidebar Styling */
.sidebar {
    position: fixed;
    left: -250px; /* Initially hidden */
    top: 0;
    width: 250px;
    height: 100%;
    background: #1E1E1E;
    box-shadow: 2px 0 5px rgba(255, 255, 255, 0.1);
    transition: 0.3s ease;
    padding-top: 20px;
    z-index: 1000;
}

.sidebar.open {
    left: 0; /* Slide-in effect */
}

.menu-links {
    list-style: none;
    padding: 0;
    text-align: center;
}

.menu-links li {
    padding: 15px;
}

.menu-links a {
    text-decoration: none;
    color: white;
    font-size: 18px;
    display: block;
}

.menu-links a:hover {
    background: #8f8e8e;
    padding: 5px;
}

/* Close Button */
.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
}

/* Menu Button */
.menu-btn {
    background: none;
    border: none;
    font-size: 30px;
    color: white;
    position: absolute;
    top: 10px;
    left: 15px;
    cursor: pointer;
}
/* Make "Your Leagues" header match "Home" size */
.leagues-header {
    font-size: 1.2em;  /* Match main menu items */
    font-weight: bold;
    padding: 10px 15px;
    color: white;
}

/* Make individual league links smaller */
.league-item a {
    font-size: 0.9em;  /* Slightly smaller than regular menu items */
    padding: 8px 15px;
    display: block;
    color: #ccc;
}

/* Add hover effect to league links */
.league-item a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

ul {
    list-style-type: none; /* Removes the bullet points */
    padding: 0; /* Removes default padding */
    margin: 0; /* Removes default margin */
}

/* Sections For the About Page */
.section-title {
    font-size: 1.2em;  /* Match main menu items */
    font-weight: bold;
    padding: 10px 15px;
    color: rgb(44, 119, 69);
}

/*Rules Page Styles*/
.rules-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #1E1E1E;
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(255, 255, 255, 0.1);
}

.rules-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #2A2A2A;
    border-radius: 8px;
}

.rule-number {
    color: #00AEEF;
    font-weight: bold;
    font-size: 1.3em;
    margin-right: 10px;
}

.rules-section h2 {
    display: flex;
    align-items: center;
    font-size: 1.4em;
    color: white;
}

.rules-section p {
    font-size: 1.1em;
    color: #cccccc;
}

.btn-primary {
    display: block;
    width: 200px;
    text-align: center;
    background: #FF5733;
    color: white;
    padding: 10px;
    margin: 20px auto;
    border-radius: 5px;
    text-decoration: none;
}

.btn-primary:hover {
    background: #E74C3C;
}

.rules-list {
    list-style: none;
    padding: 0;
    counter-reset: rule-counter;
    text-align: left; /* Ensures the list itself is aligned left */
    margin-left: 20px; /* Adjust spacing from the left */
}

.rules-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    text-align: left; /* Ensures text aligns properly */
}

.rules-list li::before {
    content: counter(rule-counter) ".";
    counter-increment: rule-counter;
    font-weight: bold;
    color: #007bff; /* Blue color for the rule number */
    min-width: 30px; /* Ensures consistent spacing */
    text-align: right;
    padding-right: 10px; /* Space between number and text */
}

.highlighted-row {
    background-color: #FFD700 !important; /* Gold background */
    color: black !important; /* Ensure text contrast */
    font-weight: bold;
    border: 2px solid #FFA500; /* Orange border */
}

.example-text {
    margin-left: 20px; /* Indents the text */
    font-style: italic; /* Optional: makes it look distinct */
    color: #ccc; /* Optional: softer color for readability */
}

/* League Dashboard Header */
.league-header {
    background: linear-gradient(135deg, #141414, #1E1E1E);
    border-left: 5px solid #FFD700; /* gold accent */
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.1); /* soft gold glow */
}

.league-header-content {
    color: white;
    margin-bottom: 15px;
}

.league-title {
    font-size: 2.5em;
    font-weight: bold;
    margin: 0;
    color: #FFD700;
}

@media (max-width: 768px) {
    .league-title {
        font-size: 1.4em;
    }
}

.league-subtitle {
    font-size: 1.2em;
    color: #bbb;
    margin: 5px 0;
}

.league-details {
    font-size: 1em;
    color: #ddd;
    margin-bottom: 10px;
}

/* League Info Cards */
.league-info-cards {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.league-card {
    background: #2A2A2A;
    padding: 15px;
    border-radius: 10px;
    width: 180px;
    text-align: center;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}

.league-card h3 {
    font-size: 1em;
    color: #FFD700;
    margin-bottom: 5px;
}

.league-card p {
    font-size: 1.2em;
    font-weight: bold;
    color: white;
    margin: 0;
}
@media (max-width: 768px) {
    .league-card {
        width: 120px;
        padding: 10px;
    }

    .league-card h3 {
        font-size: 0.9em;
    }

    .league-card p {
        font-size: 1em;
    }
}
/* Restrict the table width and center it */
.parlay-container {
    width: 100%;
    max-width: 1000px;  /* wide limit for desktop */
    margin: 0 auto;
    padding: 15px;
    overflow-x: auto;
}

/* Ensure input fields fit within their table cells */
.parlay-table input {
    width: 90%;  /* Prevents them from expanding too much */
    max-width: 120px;  /* Keeps them compact */
    padding: 5px;
    border: 1px solid #777;
    border-radius: 5px;
    background: #333;
    color: white;
    font-size: 1em;
}

/* Adjust the width of specific inputs */
.parlay-table input[type="text"] {
    max-width: 500px; /* The Parlay column input */
}

.parlay-table input[type="number"] {
    max-width: 80px; /* Odds column input */
    text-align: center;
}

/* Ensure select dropdowns fit properly */
.parlay-table select {
    width: 100%;
    max-width: 120px; /* Prevents it from getting too large */
    padding: 5px;
    border-radius: 5px;
    background: white;
    color: #333;
    text-align: center;
}

/* Prevent text from wrapping and bleeding into other columns */
.parlay-table th, .parlay-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Make table responsive */
@media screen and (max-width: 768px) {
    .parlay-table {
        display: block;
        overflow-x: auto;
        width: 100%;
    }
}

.picks-table {
    width: 100%;
    max-width: 100%;
    min-width: 900px;
    margin-top: 20px;
    border-collapse: collapse;
    background: #1E1E1E;
    color: white;
    border-radius: 10px;
}

.picks-table th,
.picks-table td {
    padding: 10px;
    border: 1px solid #444;
    text-align: center;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.picks-table td.pick,
.picks-table td.game,
.picks-table td.outcome {
    white-space: normal;
}

.picks-table th {
    background: #333;
}

.picks-table tr:nth-child(even) {
    background: #2A2A2A;
}

.picks-table-wrapper {
  border: 1px solid #ffffff;
  border-radius: 6px;
  width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
}

.commissioner-card {
    background: #141414;
    border: 1px solid #444;
    border-left: 5px solid #FFD700; /* gold accent */
    padding: 25px;
    margin-top: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.1); /* soft gold glow */;
    color: white;
    text-align: center;
}

.commissioner-info p {
    margin: 8px 0;
}

.league-code {
    font-family: monospace;
    color: #FFD700;
    font-size: 1.2em;
}

.commissioner-section {
    margin-top: 20px;
}

.commissioner-section h3 {
    margin-bottom: 10px;
}

.commissioner-player-list {
    list-style: none;
    padding: 0;
    max-width: 400px;
    margin: 0 auto;
}

.commissioner-player-list li {
    background: #2A2A2A;
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inline-form {
    display: inline;
}

.commissioner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
    justify-content: center;
}

.btn.btn-action {
    background-color: #444;
    color: white;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s ease;
}

.btn.btn-action:hover {
    background-color: #666;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 4px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    width: 100%
}
@media (max-width: 768px) {
    .container {
        padding: 15px;
        max-width: 65%;  /* widen on small screens */
    }
}
.card {
    background: #1E1E1E;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.05);
    color: white;
    text-align: center;
}

.page-title {
    font-size: 2em;
    margin-bottom: 20px;
    color: #FFD700;
}

.section-title {
    font-size: 1.5em;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #ccc;
}

.league-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.league-item {
    background: #2A2A2A;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.league-link {
    text-decoration: none;
    color: white;
    display: block;
}

.league-item:hover {
    background: #333;
}

.btn-group {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn {
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    color: white;
    transition: background 0.2s ease;
}

.btn-primary {
    background-color: #007bff;
}

.btn-secondary {
    background-color: #444;
}

.btn:hover {
    opacity: 0.9;
}
.missing-pick-alert {
    color: #FFD700;
    font-weight: bold;
    font-size: 0.95em;
    margin-top: 8px;
}
/* Container that scrolls the league links */
.league-scroll-container {
    max-height: 40vh; /* Use up to 40% of the screen height */
    overflow-y: auto;
    margin-left: 15px;
    transition: max-height 0.3s ease;
}

/* Optional: smoother scrollbars */
.league-scroll-container::-webkit-scrollbar {
    width: 6px;
}
.league-scroll-container::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 3px;
}

/* Collapsible behavior */
.league-scroll-container.collapsed {
    max-height: 0;
    overflow: hidden;
}

.menu-header.leagues-header {
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
    padding-left: 10px;
    user-select: none;
}

.ticker-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    animation: ticker 20s linear infinite;
    font-weight: bold;
    background: #2A2A2A;
    padding: 10px;
    margin-bottom: 20px;
}
@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}