:root {
    --bg-main: #0c0d14;
    --text-primary: #ffffff;
    --text-secondary: #9ba1a6;
    --border-gradient: linear-gradient(90deg, #00f2fe, #4facfe, #f093fb, #f5576c);
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
}

.search-page-layout {
    display: grid;
    grid-template-areas:
        "title"
        "keyword"
        "filters"
        "results";
    grid-template-columns: minmax(0, 1fr);
}

.search-page-title {
    grid-area: title;
}

.search-page-layout > .search-input-container {
    grid-area: keyword;
}

.search-filter-panel {
    grid-area: filters;
}

.search-results {
    min-width: 0;
    grid-area: results;
}

.search-warning-message {
    white-space: pre-line;
}

.search-filter-toggle {
    width: 100%;
    padding: 0.75rem 0;
    border: 0;
    border-top: 1px solid #303342;
    border-bottom: 1px solid #303342;
    background: transparent;
    color: #b9bdcc;
    font-weight: 700;
    text-align: left;
}

.search-filter-toggle::after {
    content: "▾";
    float: right;
    transition: transform 0.2s;
}

.search-filter-toggle:not(.collapsed)::after {
    transform: rotate(180deg);
}

.search-filter-toggle:focus-visible {
    color: #fff;
    outline: 2px solid #00f2fe;
    outline-offset: 3px;
}

.search-filter-fields {
    padding-top: 0.25rem;
}

.search-filter-fields > .sidebar-section-title:first-child {
    margin-top: 0.75rem;
}

.search-language-select-wrapper {
    position: relative;
}

.search-language-select {
    appearance: none;
    min-height: 40px;
    border: 1px solid #3a3a45;
    border-radius: 8px;
    background-color: #2a2a35;
    background-image: none;
    color: #fff;
    color-scheme: dark;
    padding-right: 38px;
}

.search-language-select:focus {
    border-color: #00f2fe;
    background-color: #2a2a35;
    box-shadow: 0 0 0 0.15rem rgba(0, 242, 254, 0.15);
    color: #fff;
}

.search-language-select option {
    background-color: #2a2a35;
    color: #fff;
}

.search-language-select-caret {
    position: absolute;
    top: 50%;
    right: 12px;
    color: #b0b0b0;
    line-height: 1;
    pointer-events: none;
    transform: translateY(-50%);
}

.search-filter-button {
    width: 100%;
    min-height: 44px;
    margin-top: 3rem;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #00f2fe 0%, #9146ff 100%);
    box-shadow: 0 0 14px rgba(0, 242, 254, 0.2);
    font-weight: 800;
    transition: box-shadow 0.18s ease, filter 0.18s ease, transform 0.18s ease;
}

.search-filter-button:hover,
.search-filter-button:focus-visible {
    box-shadow:
        0 0 18px rgba(0, 242, 254, 0.38),
        0 0 20px rgba(145, 70, 255, 0.24);
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.search-filter-button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

@media (max-width: 767.98px) {
    .search-sidebar.search-filter-panel {
        padding-right: 0;
    }
}

@media (min-width: 768px) {
    .search-page-layout {
        column-gap: 24px;
        grid-template-areas:
            "title keyword"
            "filters results";
        grid-template-columns:
            minmax(0, calc(25% - 12px))
            minmax(0, calc(75% - 12px));
    }

    .search-filter-toggle {
        display: none;
    }

    .search-filter-collapse.collapse {
        display: block;
    }

    .search-filter-fields {
        padding-top: 0;
    }

    .search-filter-fields > .sidebar-section-title:first-child {
        margin-top: 0;
    }
}

@media (min-width: 992px) {
    .search-page-layout {
        grid-template-columns:
            minmax(0, calc(16.6667% - 12px))
            minmax(0, calc(83.3333% - 12px));
    }
}


.multiview-global-notice {
    position: fixed;
    z-index: 1090;
    top: 82px;
    right: 1rem;
    width: min(420px, calc(100vw - 2rem));
    margin: 0;
    color: #fff;
    background: #321a25;
    border: 1px solid #f15b78;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
}
.multiview-body .multiview-global-notice {
    top: 1rem;
}

.multiview-replace-modal {
    color: #fff;
    background: #171923;
    border: 1px solid #3c4258;
    border-radius: 12px;
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.55);
}
.multiview-replace-modal .modal-header,
.multiview-replace-modal .modal-footer {
    border-color: #34384a;
}
.multiview-replace-description {
    margin-top: 0.35rem;
    color: #aeb3c5;
    font-size: 0.86rem;
}
.multiview-replace-list {
    display: grid;
    gap: 0.65rem;
    max-height: min(60vh, 520px);
    overflow-y: auto;
}
.multiview-replace-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    width: 100%;
    padding: 0.7rem;
    color: #fff;
    text-align: left;
    background: #242735;
    border: 1px solid #3f455b;
    border-radius: 9px;
}
.multiview-replace-item:hover,
.multiview-replace-item:focus-visible {
    background: #17343c;
    border-color: #00f2fe;
    outline: none;
}
.multiview-replace-item:disabled {
    opacity: 0.55;
    cursor: wait;
}
.multiview-replace-item img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
}
.multiview-replace-item-copy {
    min-width: 0;
}
.multiview-replace-item-copy strong,
.multiview-replace-item-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.multiview-replace-item-copy span {
    margin-top: 0.2rem;
    color: #aeb3c5;
    font-size: 0.8rem;
}
.multiview-replace-cancel {
    color: #d6d9e4;
    background: #292d3d;
    border: 1px solid #494f66;
}
.multiview-replace-cancel:hover,
.multiview-replace-cancel:focus-visible {
    color: #fff;
    border-color: #00f2fe;
}

@media (max-width: 767.98px) {
    .multiview-global-notice {
        top: 74px;
    }
}

/* Sections */
.section-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    margin-top: 2.5rem;
}

/* Horizontal Scroll */
.scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 1.2rem;
    padding-bottom: 1rem;
    scrollbar-width: none; /* Firefox */
}
.scroll-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Tournament Card */
.tournament-card {
    min-width: 280px;
    border-radius: 12px;
    padding: 2px;
}
.tournament-card-inner {
    background-color: var(--bg-main);
    border-radius: 10px;
    padding: 1.2rem 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.tournament-card .team-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}
.tournament-vs {
    font-size: 1.2rem;
    font-weight: bold;
    color: #a0a0a0;
    margin: 0 1rem;
}
.tournament-link {
    text-decoration: none;
    font-size: 0.85rem;
    margin-top: auto;
    padding-top: 0.5rem;
    font-weight: bold;
}

/* Pagination */
.stream-pagination-wrap {
    display: flex;
    justify-content: center;
}

.stream-pagination {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    margin: 0;
    list-style: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background-color: rgba(42, 42, 53, 0.72);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.stream-page-link,
.stream-page-ellipsis {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    color: #bfc0cb;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 36px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.stream-page-link {
    border: 1px solid transparent;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.stream-page-link:hover {
    border-color: rgba(0, 242, 254, 0.55);
    background-color: rgba(0, 242, 254, 0.08);
    color: #fff;
}

.stream-page-link.is-active {
    background: linear-gradient(135deg, #00f2fe 0%, #9146ff 100%);
    color: #0f0f16;
}

.stream-page-link.is-disabled {
    color: #555766;
    pointer-events: none;
}

.stream-page-ellipsis {
    color: #6f7080;
}
.youtube-consent-banner {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(3, 5, 12, 0.82);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.youtube-consent-banner[hidden] {
    display: none;
}

body.youtube-consent-open {
    overflow: hidden;
}

.youtube-consent-panel {
    position: relative;
    width: min(680px, 100%);
    max-height: calc(100dvh - 2rem);
    padding: 1.75rem;
    overflow-y: auto;
    color: #f5f6fb;
    background:
        radial-gradient(circle at 0 0, rgba(255, 0, 0, 0.2), transparent 36%),
        linear-gradient(145deg, rgba(25, 27, 39, 0.99), rgba(8, 10, 18, 0.99));
    border: 1px solid rgba(43, 234, 255, 0.58);
    border-radius: 14px;
    box-shadow:
        0 0 38px rgba(43, 234, 255, 0.17),
        0 22px 60px rgba(0, 0, 0, 0.55),
        inset 0 0 32px rgba(219, 40, 231, 0.07);
}

.youtube-consent-panel::before {
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    content: "";
    background: linear-gradient(90deg, #ff0000, #db28e7 48%, #2beaff);
}

.youtube-consent-heading {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.youtube-consent-heading h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    font-weight: 700;
}

.youtube-consent-icon {
    display: grid;
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    place-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    box-shadow: 0 0 18px rgba(255, 0, 0, 0.28);
}

.youtube-consent-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.youtube-consent-panel p {
    color: #c3c7d5;
    line-height: 1.75;
}

.youtube-consent-panel a {
    color: #2beaff;
    font-weight: 700;
    text-underline-offset: 3px;
}

.youtube-consent-panel a:hover,
.youtube-consent-panel a:focus-visible {
    color: #fff;
}

.youtube-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.35rem;
}

.youtube-consent-actions form {
    margin: 0;
}

.youtube-consent-actions .btn {
    min-height: 44px;
    padding: 0.65rem 1rem;
    font-weight: 700;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.youtube-consent-actions .btn:hover,
.youtube-consent-actions .btn:focus-visible {
    transform: translateY(-2px);
}

.youtube-consent-enable {
    min-height: 44px;
    padding: 0.65rem 1rem;
    color: #fff;
    font-weight: 700;
    background: #d90000;
    border-color: #ff2929;
    box-shadow: 0 0 18px rgba(255, 0, 0, 0.25);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.youtube-consent-enable:hover,
.youtube-consent-enable:focus-visible {
    color: #fff;
    background: #f00000;
    border-color: #ff5a5a;
    box-shadow: 0 0 24px rgba(255, 0, 0, 0.4);
    transform: translateY(-2px);
}

.youtube-consent-disable {
    color: #d7dae5;
    background: rgba(255, 255, 255, 0.04);
    border-color: #696f84;
}

.youtube-consent-disable:hover,
.youtube-consent-disable:focus-visible {
    color: #fff;
    background: #252939;
    border-color: #2beaff;
    box-shadow: 0 0 18px rgba(43, 234, 255, 0.2);
}

@media (max-width: 575.98px) {
    .youtube-consent-panel {
        padding: 1.25rem;
    }

    .youtube-consent-actions,
    .youtube-consent-actions form,
    .youtube-consent-actions .btn {
        width: 100%;
    }
}

.footer-link-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.twitch-platform-icon {
    box-sizing: border-box;
    padding: 2px;
}
