/* Homepage modules and layout helpers. */

.index-main-column,
.index-sidebar-column {
    min-width: 0;
}

.index-register-success {
    margin-bottom: 15px;
    padding: 12px 15px;
    border: 1px solid #9ae6b4;
    border-radius: 8px;
    background: #c6f6d5;
    color: #276749;
    line-height: 1.5;
}

.index-guest-info-title {
    color: #c05621;
}

.index-guest-info-body {
    color: #2f855a;
}

.index-next-match {
    border-left: 4px solid var(--accent);
    background: linear-gradient(135deg, #ebf8ff 0%, #fff 100%);
}

.index-next-match-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    flex-wrap: wrap;
}

.index-next-match-label {
    color: var(--text-light);
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
}

.index-next-match-name {
    margin-top: 3px;
    color: var(--text-main);
    font-size: 1.1em;
    font-weight: 800;
}

.index-next-match-meta {
    text-align: right;
}

.index-next-match-timer {
    color: var(--accent);
    font-family: monospace;
    font-size: 1.2em;
    font-weight: 900;
}

.index-next-match-date {
    color: var(--text-light);
    font-size: 0.7em;
}

.index-next-match-today {
    color: #28a745;
    font-weight: 700;
}

.index-collapsible {
    padding: 0;
}

.index-collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 20px;
    border-bottom: 1px solid #edf2f7;
    border-radius: 12px 12px 0 0;
    cursor: pointer;
    transition: background 0.2s;
}

.index-collapsible-header:hover,
.index-collapsible-header:focus-visible {
    background: #f7fafc;
    outline: none;
}

.index-collapsible-title {
    font-weight: 700;
}

.index-collapsible-icon {
    color: #a0aec0;
    font-size: 0.9em;
}

.index-collapsible-content {
    display: none;
}

.index-prediction-status {
    margin: 15px 20px;
}

.index-prediction-status--ended {
    color: #718096;
    font-weight: 400;
}

.index-prediction-status--active {
    color: #38a169;
}

.index-prediction-alert {
    display: inline-block;
    color: #e53e3e;
    font-size: 1.2em;
    animation: indexPulseExclamation 1s infinite;
}

.index-avatar-fill {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.index-profile-link {
    color: var(--text-main);
    text-decoration: none;
}

.index-prediction-primary {
    color: #3182ce;
}

.index-prediction-cup {
    color: #d69e2e;
}

.index-prediction-relegation {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
}

.index-prediction-relegation .pred-val {
    color: #e53e3e;
    text-align: left;
}

.index-prediction-partial {
    margin-top: 8px;
    color: #a0aec0;
    font-size: 0.78em;
    font-style: italic;
}

.index-trivia-box {
    background: #f8fafc;
}

.index-trivia-label {
    margin-bottom: 5px;
    color: var(--accent);
    font-size: 0.8em;
    font-weight: 800;
    text-transform: uppercase;
}

.index-trivia-content {
    color: var(--text-main);
    font-size: 0.95em;
    font-style: italic;
    line-height: 1.5;
}

.index-ranking-source {
    color: var(--text-light);
    font-size: 0.75em;
    font-weight: 400;
}

.index-rank-avatar {
    width: 22px;
    height: 22px;
}

.index-awaiting-home {
    text-align: right;
}

.index-awaiting-vs,
.index-result-vs {
    color: #a0aec0;
    font-size: 0.9em;
}

.index-empty-state {
    color: var(--text-light);
    font-style: italic;
}

.index-empty-state--center {
    padding: 15px 0;
    text-align: center;
}

.index-section-title {
    margin-top: 20px;
}

.index-section-title--played {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.index-round-header {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.index-round-heading,
.index-round-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.index-round-heading {
    gap: 8px;
}

.index-round-meta {
    gap: 15px;
    color: var(--text-light);
    font-size: 0.85em;
}

.index-round-logo {
    height: 20px;
    object-fit: contain;
}

.index-round-name {
    font-weight: 700;
}

.index-round-info {
    font-style: italic;
}

.index-shoutbox {
    margin-bottom: 30px;
}

.index-news-box {
    position: relative;
}

.index-news-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.index-news-date {
    margin-left: auto;
    opacity: 0.7;
    font-size: 0.85em;
    text-align: right;
    white-space: nowrap;
}

.index-news-body {
    margin-top: 5px;
}

.index-news-full {
    display: inline;
}

.index-news-short,
.index-news-toggle {
    display: none;
}

.index-news-toggle {
    margin-left: 5px;
    color: #3182ce;
    font-size: 1em;
    font-weight: 700;
    text-decoration: none;
}

.index-news-round-link {
    margin-top: 10px;
    font-weight: 700;
}

.index-news-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(49, 130, 206, 0.18);
    color: #4a5568;
    font-size: 0.88em;
}

.index-news-nav-buttons {
    display: flex;
    gap: 6px;
}

.index-news-arrow {
    min-width: 32px;
    height: 28px;
    border: 1px solid #bee3f8;
    border-radius: 4px;
    background: #fff;
    color: #3182ce;
    cursor: pointer;
    font-weight: 800;
    line-height: 1;
}

.index-news-arrow:hover:not(:disabled) {
    background: #ebf8ff;
}

.index-news-arrow:disabled {
    opacity: 0.4;
    cursor: default;
}

.index-news-loading {
    opacity: 0.6;
    pointer-events: none;
}

.index-shortcuts-box {
    padding: 18px 20px;
}

.index-shortcuts-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 14px;
}

.index-shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 10px;
}

.index-shortcut-link {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text-main, #2d3748);
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.index-shortcut-link:hover {
    border-color: #bee3f8;
    background: #eef6ff;
    box-shadow: 0 4px 10px rgba(49, 130, 206, 0.1);
    color: #2b6cb0;
    transform: translateY(-1px);
}

.index-shortcut-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    font-size: 1.05em;
}

.index-match-note-count.is-empty {
    display: none;
}

.index-last-results-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
}

.index-last-results-hint {
    color: #718096;
    font-size: 0.72em;
    font-weight: 400;
}

.res-side-team--home {
    text-align: right;
}

@keyframes indexPulseExclamation {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.4);
    }
}

@media (max-width: 768px) {
    .index-news-full {
        display: none;
    }

    .index-news-short {
        display: inline;
    }

    .index-news-toggle {
        display: inline-block;
    }

    .index-news-head {
        display: block;
    }

    .index-news-date {
        display: block;
        margin-top: 3px;
    }

    .index-news-nav {
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .index-shortcuts-box {
        padding: 16px;
    }

    .index-shortcuts-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .index-shortcut-link {
        min-height: 40px;
        padding: 9px 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .index-prediction-alert {
        animation: none;
    }
}