@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Roboto+Slab:wght@700&display=swap');

:root {
    --primary-color: #9333ea;
    --primary-color-dark: #7e22ce;
    --secondary-color: #db2777;
    --background-color: #111827;
    --surface-color: #1f2937;
    --surface-color-lighter: #374151;
    --on-primary: #ffffff;
    --on-surface: #f3f4f6;
    --text-muted: #9ca3af;
    --border-color: #4b5563;
    --shadow-color-dark: rgba(0, 0, 0, 0.3);
    --shadow-color-glow: rgba(147, 51, 234, 0.2);
    --font-family-main: 'Poppins', sans-serif;
    --font-family-headings: 'Roboto Slab', serif;
    --container-width: 1600px;
    --border-radius: 12px;
    --animation-duration: 0.4s;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--background-color);
}

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

body {
    font-family: var(--font-family-main);
    line-height: 1.7;
    background-color: var(--background-color);
    color: var(--on-surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

nav {
    background-color: var(--surface-color);
    color: var(--on-surface);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 4px 12px var(--shadow-color-dark);
    border-bottom: 1px solid var(--border-color);
}

nav ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    color: var(--on-surface);
    text-decoration: none;
    font-weight: 500;
    padding: 0.6rem 1rem;
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

nav ul li a:hover,
nav ul li a:focus {
    background-color: var(--primary-color);
    color: var(--on-primary);
}

header {
    background: linear-gradient(135deg, var(--primary-color-dark), var(--primary-color));
    color: var(--on-primary);
    text-align: center;
    padding: 5rem 1rem 4rem;
    width: 100%;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

header h1 {
    font-family: var(--font-family-headings);
    font-size: 4rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 6px var(--shadow-color-dark);
}

header img {
    width: 20rem;
    height: 20rem;
}

main.container {
    padding-top: 2.5rem;
}

section {
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px var(--shadow-color-dark), 0 0 0 1px var(--border-color);
}

section h2 {
    font-family: var(--font-family-headings);
    color: var(--primary-color);
    margin-bottom: 2.5rem;
    text-align: center;
    font-size: 2.75rem;
    position: relative;
    padding-bottom: 1rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

section h3 {
    font-family: var(--font-family-headings);
    color: var(--on-surface);
    margin-bottom: 1.25rem;
    font-size: 1.75rem;
}

.section-description {
    text-align: center;
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: -1.5rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}


#teams .teams-content-area,
#format .format-content-area {
    display: grid;
    gap: 2rem;
    position: relative;
    grid-template-columns: repeat(4, 1fr);
}

.team-card, .format-card {
    background-color: var(--surface-color-lighter);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: 0 6px 18px var(--shadow-color-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out, opacity var(--animation-duration) ease-in-out;
}

.team-card:hover, .format-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px var(--shadow-color-dark), 0 0 30px var(--shadow-color-glow);
}

.team-captain {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.team-captain img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 4px solid var(--primary-color);
    box-shadow: 0 4px 15px var(--shadow-color-dark);
    transition: transform 0.3s ease;
}
.team-captain img:hover {
    transform: scale(1.08) rotate(3deg);
}

.team-captain h3 {
    margin-bottom: 0.25rem;
    font-size: 1.7rem;
    color: var(--primary-color);
}

.team-players {
    list-style-type: none;
    padding: 0;
    width: 100%;
}

.team-players li {
    display: flex;
    align-items: center;
    padding: 0.8rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 1rem;
    color: var(--on-surface);
    transition: background-color 0.2s ease;
    border-radius: var(--border-radius);
}
.team-players li:last-child {
    border-bottom: none;
}
.team-players li:hover {
    background-color: rgba(255,255,255,0.03);
}

.team-players img {
    width: 125px;
    height: 125px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
    border: 3px solid var(--primary-color-dark);
}

.team-players a {
    color: var(--on-surface);
    text-decoration: none;
    font-weight: 500;
}
.team-players a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

.carousel-controls {
    display: none;
    justify-content: center;
    align-items: center;
    margin-top: 2.5rem;
}

.carousel-controls button {
    background-color: var(--primary-color);
    color: var(--on-primary);
    border: none;
    font-size: 1.6rem;
    border-radius: 50%;
    cursor: pointer;
    margin: 0 0.75rem;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 10px var(--shadow-color-dark);
}

.carousel-controls button:hover {
    background-color: var(--primary-color-dark);
    transform: scale(1.12);
    box-shadow: 0 8px 15px var(--shadow-color-dark);
}
.carousel-controls button:disabled {
    background-color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
    transform: scale(1);
    box-shadow: none;
}

#schedule ul {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

#format ul {
    text-align: left;
    padding-left: 1.5rem;
    list-style-type: disc;
    margin-top: 1rem;
}
#format .format-content-area li {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0.25rem 0;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

#schedule li,
#standings li {
    margin-bottom: 1.75rem;
    padding: 1.75rem;
    background-color: var(--surface-color-lighter);
    border-radius: var(--border-radius);
    border-left: 6px solid var(--secondary-color);
    box-shadow: 0 6px 15px var(--shadow-color-dark);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}
#schedule li {
    margin-bottom: 0;
}

#schedule li:hover,
#standings li:hover {
    box-shadow: 0 8px 25px var(--shadow-color-dark);
    border-left-color: var(--primary-color);
}

#schedule li p {
    margin: 0.5rem 0 1rem;
    color: var(--text-muted);
    font-size: 1.05rem;
    flex-grow: 1;
}

h3 .local-event-datetime {
    font-weight: 400;
    font-size: 1rem;
    color: var(--text-muted);
    display: block;
    margin-top: -0.75rem;
    margin-bottom: 1rem;
}
.format-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}
.format-card p {
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    text-align: left;
    flex-grow: 1;
}
.format-card ul {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.gcal-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    padding: 0.7rem 1.4rem;
    background-color: var(--primary-color);
    color: var(--on-primary);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 1rem;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    box-shadow: 0 3px 6px var(--shadow-color-dark);
}
.gcal-link svg {
    vertical-align: middle;
}
.gcal-link:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px var(--shadow-color-dark);
}

#page-footer {
    text-align: center;
    padding: 2.5rem 1rem;
    margin-top: 2rem;
    background-color: #0f172a;
    color: var(--text-muted);
    width: 100%;
    font-size: 0.9rem;
}
#page-footer a {
    color: var(--secondary-color);
    text-decoration: none;
}
#page-footer a:hover {
    text-decoration: underline;
}

.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.fade-in {
    opacity: 0;
}
.fade-in-down {
    transform: translateY(-40px);
    opacity: 0;
}
.slide-in-up {
    transform: translateY(60px);
    opacity: 0;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@keyframes contentFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes contentFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-15px); }
}
.card-content-fade-in {
    animation: contentFadeIn var(--animation-duration) ease-out forwards;
}
.card-content-fade-out {
    animation: contentFadeOut var(--animation-duration) ease-in forwards;
}

#lol-poll p {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

#lolPollForm {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.poll-option {
    display: flex;
    align-items: center;
    background-color: var(--surface-color-lighter);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 500px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.poll-option:hover {
    background-color: #2a3547;
    border-color: var(--primary-color);
}

.poll-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    margin-right: 1rem;
    cursor: pointer;
    position: relative;
    outline: none;
    transition: border-color 0.2s ease;
}

.poll-option input[type="radio"]:checked {
    border-color: var(--secondary-color);
}

.poll-option input[type="radio"]::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s ease-in-out;
}

.poll-option input[type="radio"]:checked::before {
    transform: translate(-50%, -50%) scale(1);
}

.poll-option label {
    font-size: 1.1rem;
    color: var(--on-surface);
    cursor: pointer;
    flex-grow: 1;
}

#lolPollForm button[type="submit"] {
    background-color: var(--primary-color);
    color: var(--on-primary);
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    font-weight: 500;
    font-family: var(--font-family-main);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px var(--shadow-color-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#lolPollForm button[type="submit"]:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-color-dark);
}

#lolPollForm button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px var(--shadow-color-dark);
}

#lolPollResults {
    margin-top: 2rem;
    padding: 1.5rem 2rem;
    background-color: var(--surface-color-lighter);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

#lolPollResults h3 {
    font-family: var(--font-family-headings);
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

#lolPollMessage {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 1rem;
    min-height: 1.5em;
}

#lolPollMessage:not(:empty) {
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    background-color: var(--surface-color-lighter);
    border: 1px solid var(--border-color);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.poll-result-line {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 10px;
    flex-wrap: nowrap;
}

.poll-result-line:last-child {
    margin-bottom: 0;
}

.poll-team-name {
    font-size: 0.95rem;
    color: var(--on-surface);
    flex-basis: 170px;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.poll-bar-container {
    flex-grow: 1;
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    height: 22px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.poll-bar {
    background-color: var(--primary-color);
    height: 100%;
    border-radius: var(--border-radius);
    transition: width 0.5s ease-in-out;
    text-align: right;
    color: var(--on-primary);
    font-size: 0.8rem;
    line-height: 22px;
    padding-right: 5px;
    box-sizing: border-box;
}

.poll-bar.leading {
    background-color: var(--secondary-color);
}

.poll-vote-count {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.95rem;
    min-width: 25px;
    text-align: right;
}
.poll-votes-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: -5px;
}

.captain-bio-popover {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    max-width: 90vw;
    background-color: var(--surface-color);
    color: var(--on-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: 0 8px 20px var(--shadow-color-dark);
    z-index: 20;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.captain-bio-popover a {
    color: white;
}

.captain-bio-popover::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: var(--surface-color) transparent transparent transparent;
}

.captain-bio-popover.is-visible {
    display: block;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.captain-bio-popover h4 {
    font-family: var(--font-family-headings);
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.captain-bio-popover p {
    margin-bottom: 0;
    color: var(--text-muted);
}

.current-poll-notice {
    text-align: center;
    font-size: 1rem;
    color: var(--on-surface);
    background-color: var(--surface-color);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    border: 1px solid var(--primary-color-dark);
}

.current-poll-notice strong {
    color: var(--primary-color);
    font-weight: 600;
}

.past-polls-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.past-poll-card {
    background-color: var(--surface-color-lighter);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem 2rem;
    box-shadow: 0 6px 18px var(--shadow-color-dark);
}

.past-poll-card h3 {
    font-family: var(--font-family-headings);
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-align: center;
    font-size: 1.6rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.poll-card-status {
    font-size: 0.85rem;
    font-family: var(--font-family-main);
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: inline-block;
}

.past-poll-card.poll-completed .poll-card-status {
    color: var(--primary-color);
}

.past-poll-card.poll-upcoming {
    background-color: var(--surface-color);
    border-color: #2a3547;
    opacity: 0.75;
}

.past-poll-card.poll-upcoming h3 {
    color: var(--text-muted);
    border-bottom-color: #2a3547;
}
.past-poll-card.poll-upcoming .poll-card-status {
    color: #6b7280;
}

.past-poll-card.poll-upcoming .past-poll-description {
    color: #6b7280;
}

.past-poll-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.poll-status-message {
    padding: 2rem 1rem;
    text-align: center;
    font-size: 1rem;
    color: var(--text-muted);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

.past-poll-result-line {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 10px;
    flex-wrap: nowrap;
}

.past-poll-result-line:last-of-type {
    margin-bottom: 1.5rem;
}

.past-poll-team-name {
    font-size: 0.95rem;
    color: var(--on-surface);
    flex-basis: 150px;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.past-poll-bar-container {
    width: 130px;
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    height: 22px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.past-poll-bar {
    background-color: var(--primary-color);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: var(--on-primary);
    font-size: 0.8rem;
    padding-right: 5px;
    box-sizing: border-box;
}

.past-poll-vote-details {
    font-weight: 600;
    color: var(--on-surface);
    font-size: 0.95rem;
    min-width: 60px;
    text-align: right;
    flex-shrink: 0;
}

.past-poll-total-votes {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-color);
}

.weekly-standings-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.weekly-standing-card {
    background-color: var(--surface-color-lighter);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem 2rem;
    box-shadow: 0 6px 18px var(--shadow-color-dark);
}

.weekly-standing-card h3 {
    font-family: var(--font-family-headings);
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-align: center;
    font-size: 1.6rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.week-status-tag {
    font-size: 0.8rem;
    font-family: var(--font-family-main);
    font-weight: 600;
    padding: 0.2em 0.6em;
    border-radius: calc(var(--border-radius) / 2);
    margin-top: 0.35rem;
    display: inline-block;
    line-height: 1.2;
}

.concluded-tag {
    background-color: var(--primary-color);
    color: var(--on-primary);
}

.upcoming-tag {
    background-color: var(--surface-color);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.weekly-standing-card.week-upcoming {
    background-color: var(--surface-color);
    border-color: #2a3547;
    opacity: 0.7;
}

.weekly-standing-card.week-upcoming h3 {
    color: var(--text-muted);
    border-bottom-color: #2a3547;
}

.weekly-standing-card.week-upcoming .section-description,
.weekly-standing-card.week-upcoming .performance-note {
    color: #6b7280;
}

.standings-status-message {
    padding: 2rem 1rem;
    text-align: center;
    font-size: 1rem;
    color: var(--text-muted);
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    margin-top: 1.5rem;
}

.team-rankings-list {
    list-style-type: none;
    padding-left: 0;
    margin-top: 1.5rem;
}

.team-rankings-list li {
    display: flex;
    align-items: center;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    gap: 10px;
}

.team-rankings-list li:last-child {
    border-bottom: none;
}

.team-rankings-list .rank {
    font-family: var(--font-family-headings);
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 700;
    flex-basis: 35px;
    flex-shrink: 0;
    text-align: right;
    margin-right: 5px;
}

.team-standings-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color-dark);
    flex-shrink: 0;
}

.team-name-standings {
    font-weight: 500;
    color: var(--on-surface);
    flex-grow: 1;
}

.points-earned {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-left: auto;
    padding-left: 10px;
    flex-shrink: 0;
    text-align: right;
    min-width: 70px;
}

.performance-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    flex-basis: 120px;
    flex-shrink: 0;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-results-breakdown {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.game-results-breakdown h4 {
    text-align: center;
    color: var(--on-surface);
    font-family: var(--font-family-headings);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.match-group {
    margin-bottom: 1.5rem;
}

.match-group:last-child {
    margin-bottom: 0;
}

.match-group h5 {
    color: var(--text-muted);
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.matchup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background-color: var(--surface-color);
    border-radius: calc(var(--border-radius) / 1.5);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.matchup .team-name {
    flex: 1 1 40%;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s ease;
}

.matchup .team-name:first-of-type {
    text-align: right;
}

.matchup .team-name:last-of-type {
    text-align: left;
}

.matchup .winner {
    color: var(--secondary-color);
    font-weight: 700;
}

.matchup .score {
    flex: 0 0 auto;
    padding: 0 1.25rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--on-surface);
}

.placement-match {
    position: relative;
    padding-top: 1.2rem;
    background: linear-gradient(125deg, var(--surface-color), #2a3547);
}

.placement-match .match-type {
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-color);
}

@media (max-width: 1590px) {
    #teams .teams-content-area,
    #format .format-content-area {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (max-width: 1024px) {
    header h1 {
        font-size: 3rem;
    }
    section h2 {
        font-size: 2.25rem;
    }
    #teams .teams-content-area,
    #format .format-content-area {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    #schedule ul {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    #schedule li {
        margin-bottom: 1.5rem;
    }
}


@media (max-width: 991px) {
    #teams .teams-content-area,
    #format .format-content-area {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (max-width: 850px) {
    html {
        font-size: 15px;
    }
    header h1 {
        font-size: 2.5rem;
    }
    header {
        padding: 3.5rem 1rem 3rem;
        clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    }
    section h2 {
        font-size: 2rem;
    }
    section h3 {
        font-size: 1.5rem;
    }

    nav ul {
        justify-content: center;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0 0.5rem;
    }
    nav ul li {
        margin: 0.25rem 0.3rem;
        flex-shrink: 0;
    }
    nav ul li a {
        padding: 0.5rem 0.6rem;
        font-size: 1.1rem;
    }

    #teams .teams-content-area,
    #format .format-content-area {
        display: block;
        position: relative;
        min-height: 400px;
        grid-template-columns: none;
    }
    #schedule ul {
        display: block;
        grid-template-columns: none;
    }
    #schedule li {
        margin-bottom: 1.5rem;
    }

    .team-card, .format-card {
        width: 100%;
        margin: 0 0 2rem 0;
        display: none;
        opacity: 0;
        border-radius: var(--border-radius);
    }
    .team-card.active-card,
    .format-card.active-card {
        display: flex;
    }

    .carousel-controls {
        display: flex;
    }
}

@media (min-width: 768px) {
    .past-polls-container {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
    .weekly-standings-container {
	grid-template-columns: repeat(2, 1fr);
    }
    .past-poll-card h3,
    .weekly-standing-card h3 {
        flex-direction: row;
        gap: 0.5rem;
    }
    .poll-card-status,
    .week-status-tag {
        margin-top: 0;
    }
}

@media (max-width: 600px) {
    .poll-option {
        padding: 0.8rem 1rem;
        max-width: 100%;
    }

    .poll-option label {
        font-size: 1rem;
    }

    #lolPollForm button[type="submit"] {
        width: 100%;
        max-width: 500px;
        font-size: 1rem;
        padding: 0.9rem 1.5rem;
    }

    #lolPollResults {
        padding: 1rem;
    }

    .team-rankings-list li {
        flex-wrap: wrap;
        padding: 0.5rem;
    }
    .team-rankings-list .rank {
        flex-basis: 25px;
        margin-right: 0;
        font-size: 1rem;
    }
    .team-standings-icon {
        width: 30px;
        height: 30px;
    }
    .team-name-standings {
        flex-basis: calc(100% - 75px);
        font-size: 0.9rem;
    }
    .points-earned {
        font-size: 0.85rem;
        min-width: 60px;
        flex-basis: 60px;
        margin-left: 0;
    }
    .performance-note {
        flex-basis: 100%;
        text-align: left;
        margin-left: 35px;
        font-size: 0.75rem;
        white-space: normal;
    }
    .matchup {
	font-size: 0.9rem;
	padding: 0.5rem 0.75rem;
    }
    .matchup .score {
	padding: 0 0.75rem;
	font-size: 1rem;
    }
    .past-poll-result-line {
	flex-wrap: wrap;
	gap: 5px;
	padding: 0.25rem 0;
    }
    .past-poll-team-name {
	flex-basis: auto;
	flex-grow: 1;
    }
    .past-poll-vote-details {
	flex-basis: auto;
	text-align: right;
	font-size: 0.9rem;
    }
    .past-poll-bar-container {
	flex-basis: 100%;
	order: 3;
	height: 18px;
    }
    .past-poll-bar {
	height: 100%;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    header h1 {
        font-size: 2rem;
    }
    section h2 {
        font-size: 1.75rem;
    }
    section h3 {
        font-size: 1.3rem;
    }
    .team-captain img {
        width: 130px;
        height: 130px;
    }
    .team-players img {
        width: 70px;
        height: 70px;
    }
    .gcal-link {
        padding: 0.6rem 1.1rem;
        font-size: 0.9rem;
    }
    .gcal-link svg {
        height: 16px;
        width: 16px;
    }
    .gcal-link span {
        display: inline;
    }
    .poll-team-name {
        flex-basis: 100px;
        font-size: 0.85rem;
    }
    .poll-bar-container {
        height: 20px;
    }
    .poll-bar {
        line-height: 20px;
    }
    .poll-vote-count {
        font-size: 0.85rem;
    }
    .poll-votes-text {
        display: none;
    }
    .captain-bio-popover {
        width: 240px;
        bottom: calc(100% + 5px);
    }
    .past-poll-card {
        padding: 1rem 1.5rem;
    }
    .past-poll-card h3 {
        font-size: 1.4rem;
    }
    .past-poll-team-name {
        flex-basis: 100px;
        font-size: 0.85rem;
    }
    .past-poll-bar-container {
        height: 20px;
    }
    .past-poll-vote-details {
        font-size: 0.85rem;
        min-width: 50px;
    }
    .weekly-standing-card {
        padding: 1rem 1.25rem;
    }
    .weekly-standing-card h3 {
        font-size: 1.4rem;
    }
    .team-rankings-list li {
        gap: 5px;
    }
    .performance-note {
        margin-left: 30px;
    }
    .game-results-breakdown h4 {
	font-size: 1.25rem;
    }
    .matchup {
	flex-wrap: wrap;
	justify-content: center;
	text-align: center;
	padding: 0.75rem 0.5rem;
	position: relative;
    }
    .matchup .team-name {
	flex: 1 1 100%;
	text-align: center !important;
	line-height: 1.4;
	font-size: 0.9rem;
    }
    .matchup .score {
	order: -1;
	flex-basis: 100%;
	padding: 0 0 0.25rem 0;
	font-size: 1.2rem;
    }
    .matchup .winner {
	font-size: 1rem;
    }
    .placement-match .match-type {
	top: 2px;
    }
    .past-poll-team-name {
	font-size: 0.9rem;
    }
    .past-poll-vote-details {
	font-size: 0.8rem;
	min-width: unset;
    }
    .past-poll-card {
	padding: 1.25rem 1rem;
    }
}
