/* Platform enhancements — i18n, scout search, scout videos, desktop home edit */

.header-lang-login {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
}

.header-lang-login .lang-switch {
    margin-left: 0;
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .header-lang-login {
        right: 60px;
        gap: 8px;
    }
    .header-lang-login .lang-switch {
        display: none;
    }
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.35);
}

.lang-switch-btn {
    padding: 6px 12px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.lang-switch-btn.active {
    background: var(--primary-red, #800404);
    color: #fff;
}

.lang-switch-btn:hover:not(.active) {
    color: #fff;
}

body.i18n-transitioning {
    opacity: 0.92;
    transition: opacity 0.25s ease;
}

body.i18n-ready {
    opacity: 1;
    transition: opacity 0.35s ease;
}

.scout-portal-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding: 0 2%;
}

.scout-search-wrap {
    flex: 1;
    min-width: 240px;
    max-width: 480px;
    position: relative;
}

.scout-search-wrap i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neon-gold, #d4af37);
    pointer-events: none;
}

.scout-search-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
    box-sizing: border-box;
}

.scout-search-input:focus {
    outline: none;
    border-color: var(--neon-gold, #d4af37);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
    background: rgba(255, 255, 255, 0.1);
}

.scout-report-actions-top {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-scout-watch {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--neon-gold, #d4af37);
    background: linear-gradient(135deg, rgba(128, 4, 4, 0.9), rgba(80, 4, 4, 0.95));
    color: #fff;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.2);
}

.btn-scout-watch:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 28px rgba(212, 175, 55, 0.45);
    background: linear-gradient(135deg, #fff, #f5f0e8);
    color: var(--primary-red, #800404);
}

.btn-scout-pdf {
    margin-top: 24px;
    width: 100%;
    max-width: 320px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 2px solid var(--primary-red, #800404);
    background: #0a0a0a;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-scout-pdf:hover {
    background: var(--primary-red, #800404);
    box-shadow: 0 8px 24px rgba(128, 4, 4, 0.45);
    transform: translateY(-2px);
}

.scout-videos-watch-modal .modal-content,
.scout-videos-manage-modal .modal-content {
    max-width: 900px;
    width: 95%;
    background: #0e0e0e;
    color: #f2f2f2;
    border-top: 4px solid var(--primary-red, #800404);
}

.scout-videos-watch-player {
    margin-bottom: 20px;
    display: none;
}

.scout-videos-watch-player.playing {
    display: block;
}

.scout-mlb-player {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 0 0 1px rgba(128, 4, 4, 0.25),
        0 24px 60px rgba(0, 0, 0, 0.65),
        0 0 40px rgba(128, 4, 4, 0.12);
    background: linear-gradient(180deg, #0a0a0c 0%, #111 100%);
}

.scout-mlb-player::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-red, #800404), #c62828, var(--primary-red, #800404), transparent);
}

.scout-mlb-player-stage {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
}

.scout-mlb-player-stage iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    z-index: 1;
}

.scout-mlb-player-stage::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, transparent 20%, transparent 80%, rgba(0, 0, 0, 0.5) 100%);
}

.scout-mlb-player-loader {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
}

.scout-mlb-player-stage.is-loading .scout-mlb-player-loader {
    display: flex;
}

.scout-mlb-loader-ring {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-top-color: var(--primary-red, #800404);
    animation: scoutMlbSpin 0.85s linear infinite;
}

@keyframes scoutMlbSpin {
    to { transform: rotate(360deg); }
}

.scout-video-thumb-card {
    flex: 0 0 160px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    background: #1a1a1a;
    cursor: pointer;
    padding: 0;
    text-align: left;
    color: #fff;
    transition: transform 0.3s, box-shadow 0.3s;
}

.scout-video-thumb-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(128, 4, 4, 0.35);
}

.scout-video-thumb-card img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    display: block;
}

.scout-video-thumb-card span {
    display: block;
    padding: 8px;
    font-size: 0.8rem;
}

.scout-videos-thumb-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.scout-videos-cat-title {
    color: var(--neon-gold, #d4af37);
    font-family: 'Oswald', sans-serif;
    margin: 16px 0 8px;
}

.home-edit-mobile-notice {
    display: none;
    margin: 16px 5%;
    padding: 14px 18px;
    border-radius: 8px;
    border-left: 4px solid var(--neon-gold, #d4af37);
    background: rgba(128, 4, 4, 0.15);
    color: #333;
    font-size: 0.95rem;
}

/* Scout videos cinematic redesign */
.scout-videos-watch-modal .modal-content {
    width: min(1180px, 96vw);
    max-width: none;
    padding: 22px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.09);
    border-top: 0;
    background: linear-gradient(135deg, #11151b, #07090d);
    box-shadow: 0 34px 90px rgba(0,0,0,0.75);
}

.scout-videos-watch-modal h2 {
    font-family: 'Bebas Neue', var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: 0.06em;
    margin: 0 0 14px;
    color: #fff;
}

.scout-videos-watch-player {
    border-radius: 12px;
    margin: 0 0 18px;
}

.scout-videos-watch-player.playing {
    display: block;
}

.scout-mlb-player {
    border-radius: 14px;
    background: #050608;
    border: 1px solid rgba(255,255,255,0.09);
    box-shadow: 0 24px 68px rgba(0,0,0,0.72);
}

.scout-mlb-player-stage iframe,
.scout-mlb-player-stage video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    z-index: 1;
}

.scout-video-thumb-card {
    flex: 0 0 310px;
    border-radius: 12px;
    border-color: rgba(255,255,255,0.09);
    background: linear-gradient(135deg, #161a20, #0d0f13);
}

.scout-video-thumb-card img {
    height: 170px;
}

.scout-video-thumb-card span {
    min-height: 52px;
    padding: 12px 14px;
    font-family: 'Bebas Neue', var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 0.05em;
}

.scout-videos-thumb-row {
    gap: 14px;
    padding-bottom: 12px;
}

.scout-videos-cat-title {
    color: #d4af37;
    font-family: 'Bebas Neue', var(--font-heading);
    font-size: 1.7rem;
    letter-spacing: 0.08em;
}

@media (max-width: 900px) {
    #home-page .admin-only.edit-btn,
    #home-page button.edit-btn.admin-only {
        display: none !important;
    }

    #pro-players-page .btn-add-pro-player.admin-only:not(.hidden) {
        display: inline-flex !important;
        position: static !important;
        width: calc(100% - 40px);
        margin: 0 auto 20px;
        justify-content: center;
    }

    .home-edit-mobile-notice.visible-mobile {
        display: block;
    }
}

.dashboard-welcome {
    position: relative;
}

.lang-switch-dashboard {
    position: absolute;
    top: 0;
    right: 0;
    margin: 0;
    z-index: 5;
}

.lang-switch-dashboard .lang-switch {
    border-color: rgba(128, 4, 4, 0.35);
    background: rgba(0, 0, 0, 0.42);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
}

.lang-switch-dashboard .lang-switch-btn {
    color: rgba(255, 255, 255, 0.55);
    padding: 6px 14px;
}

.lang-switch-dashboard .lang-switch-btn.active {
    background: var(--primary-red, #800404);
    color: #fff;
}

@media (max-width: 900px) {
    .lang-switch-dashboard {
        top: 0;
        right: 0;
    }
}
