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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000;
    color: white;
    overflow: hidden;
    height: 100vh;
}

.video-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

/* Logo container */
.logo-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: opacity 0.3s ease;
}

.crtvg-logo {
    height: 40px;
    width: auto;
}

/* Camera title container (separado del logo) */
.camera-title-container {
    position: absolute;
    top: 90px;
    left: 20px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: opacity 0.3s ease;
    max-width: 300px;
}

/* Close info button */
.close-info-button {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    padding: 0;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
    z-index: 1;
}

.close-info-button:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.close-info-button:active {
    background: rgba(255, 255, 255, 0.35);
}

.close-info-button svg {
    width: 14px;
    height: 14px;
}

.camera-title-container h1 {
    margin: 0;
    color: white;
    font-size: 1.4rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Camera description EPG style */
.camera-description-epg {
    margin-top: 8px;
    padding: 0;
    background: transparent;
    opacity: 1;
    transition: opacity 0.5s ease;
    max-width: 100%;
}

.camera-description-epg p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    line-height: 1.3;
    font-weight: 400;
}

.camera-description-epg.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Camera local time display */
.camera-local-time {
    margin-top: 6px;
    padding: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    font-weight: 400;
    display: inline-block;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.camera-local-time.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Camera location link */
.camera-location {
    margin-top: 6px;
    padding: 0;
    background: transparent;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    transition: opacity 0.5s ease;
}

.camera-location a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

.camera-location a:hover {
    color: #fff;
    text-decoration: underline;
}

.camera-location .location-icon {
    font-size: 0.9rem;
}

.camera-location.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Camera weather display */
.camera-weather {
    margin-top: 8px;
    padding: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.camera-weather.hidden {
    opacity: 0;
    pointer-events: none;
}

.weather-current {
    display: flex;
    align-items: center;
    gap: 8px;
}

.weather-icon {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.weather-temp {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* Weather forecast display */
.weather-forecast {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.forecast-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    min-width: 50px;
}

.forecast-day-name {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    font-weight: 500;
}

.forecast-icon {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.forecast-temps {
    display: flex;
    gap: 4px;
    font-size: 0.75rem;
}

.forecast-temp-max {
    color: white;
    font-weight: 500;
}

.forecast-temp-min {
    color: rgba(255, 255, 255, 0.6);
}

.weather-attribution {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
}

.weather-attribution a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

.weather-attribution a:hover {
    color: white;
    text-decoration: underline;
}

#local-time-label {
    color: rgba(255, 255, 255, 0.7);
}

#local-time-value {
    font-weight: 400;
}

/* Camera description external */
.camera-description-external {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 80%;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 8px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 1;
    transition: opacity 0.5s ease;
    z-index: 100;
}

.camera-description-external p {
    margin: 0;
    color: white;
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: center;
}

.camera-description-external.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Camera description above carousel */
.camera-description-above-carousel {
    position: absolute;
    bottom: 180px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 80%;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 8px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 1;
    transition: opacity 0.5s ease;
    z-index: 150;
}

.camera-description-above-carousel p {
    margin: 0;
    color: white;
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: center;
}

.camera-description-above-carousel.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Auto-play controls */
.auto-play-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    /* No extra background - parent carousel-container already provides dark background */
}

.auto-play-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: 80px;
}

.timelapse-button {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #2980b9, #1c658c);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.timelapse-button:hover {
    background: linear-gradient(135deg, #1c658c, #13466b);
}

.timelapse-button:disabled {
    background: #5a6870;
    opacity: 0.6;
    cursor: not-allowed;
}

.auto-play-button:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
}

.auto-play-button.active {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.auto-play-button.active .play-icon {
    content: "";
}

.auto-play-button.active .play-icon::before {
    content: "";
}

.play-icon {
    font-size: 12px;
}

.auto-text {
    font-size: 11px;
    letter-spacing: 1px;
}

.timer-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 14px;
}

.timer-controls label {
    font-weight: 500;
}

.timer-controls select {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

.timer-controls select option {
    background: #333;
    color: white;
}

/* Top right controls container */
.top-right-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    gap: 10px;
    align-items: center;
    transition: opacity 0.3s ease;
}

.top-right-controls.auto-hide {
    opacity: 0;
    pointer-events: none;
}

.camera-selector {
    transition: all 0.3s ease;
}

.camera-dropdown {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    padding: 10px 15px;
    font-size: 0.9rem;
    min-width: 200px;
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
}

.camera-dropdown:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}

.camera-dropdown:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.camera-dropdown option {
    background: #1a1a1a;
    color: white;
    padding: 8px;
}

.carousel-container {
    position: absolute;
    bottom: 50px; /* Above footer links */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.carousel {
    width: 640px;
    overflow: hidden;
    border-radius: 10px;
}

.carousel-track {
    display: flex;
    transition: transform 0.3s ease;
    gap: 10px;
}

.thumbnail {
    position: relative;
    width: 150px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.thumbnail:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.thumbnail.active {
    border-color: #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.thumbnail-fallback {
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    text-align: center;
    padding: 5px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.thumbnail-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 5px;
    font-size: 0.6rem;
    text-align: center;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.carousel-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.carousel-btn:active {
    transform: scale(0.95);
}

.carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading.show {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    font-size: 1.1rem;
    color: #00d4ff;
}

/* Timelapse button */
.timelapse-button {
    background: rgba(0, 212, 255, 0.9);
    color: #000;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
    margin-left: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.timelapse-button:hover:not(:disabled) {
    background: #00b4d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.timelapse-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.timelapse-button:disabled {
    opacity: 0;
    cursor: not-allowed;
    visibility: hidden;
    /* Keep the space occupied to prevent layout shift */
    pointer-events: none;
}

/* Timelapse Modal */
.timelapse-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.timelapse-modal.show {
    opacity: 1;
    visibility: visible;
}

.timelapse-modal.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #00d4ff;
    animation: spin 1s ease-in-out infinite;
    z-index: 2001;
}

#timelapse-video {
    max-width: 90%;
    max-height: 90%;
    background: #000;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.close-timelapse {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s;
    z-index: 2002;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-timelapse:hover {
    opacity: 1;
    background: rgba(255, 0, 0, 0.7);
    transform: rotate(90deg);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Auto-hide functionality */
.auto-hide {
    opacity: 0;
    pointer-events: none;
}

.camera-selector.auto-hide,
.logo-container.auto-hide,
.carousel-container.auto-hide {
    opacity: 0;
    visibility: hidden;
}

/* Responsive design */
@media (max-width: 768px) {
    .logo-container {
        top: 10px;
        left: 10px;
        padding: 8px;
    }
    
    .crtvg-logo {
        height: 30px;
        margin-bottom: 8px;
    }
    
    .camera-title-container {
        top: 60px;
        left: 10px;
        padding: 10px;
    }
    
    .camera-title-container h1 {
        font-size: 1.1rem;
    }
    
    .top-right-controls {
        top: 10px;
        right: 10px;
    }
    
    .camera-dropdown {
        min-width: 150px;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .carousel {
        width: 500px;
    }
    
    .thumbnail {
        width: 120px;
        height: 80px;
    }
    
    .carousel-container {
        padding: 15px;
        gap: 10px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .logo-container {
        top: 10px;
        left: 10px;
        padding: 6px;
    }
    
    .crtvg-logo {
        height: 25px;
        margin-bottom: 6px;
    }
    
    .camera-title-container {
        top: 90px;
        left: 10px;
        padding: 8px;
    }
    
    .camera-title-container h1 {
        font-size: 0.9rem;
    }
    
    .top-right-controls {
        top: 10px;
        right: 10px;
        flex-direction: column;
        align-items: flex-end;
    }
    
    .camera-dropdown {
        min-width: 120px;
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .carousel {
        width: 420px;
    }
    
    .thumbnail {
        width: 100px;
        height: 60px;
    }
    
    .carousel-container {
        bottom: 10px;
        padding: 10px;
    }
    
    .camera-title-container h1 {
        font-size: 1.1rem;
    }
    
    .camera-description-external {
        max-width: 90%;
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    .camera-description-above-carousel {
        max-width: 90%;
        padding: 10px 15px;
        font-size: 0.85rem;
        bottom: 160px;
    }
    
    .auto-play-controls {
        flex-direction: column;
        gap: 10px;
        padding: 8px 12px;
    }
    
    .auto-play-button {
        padding: 8px 12px;
        min-width: 70px;
    }
    
    .timer-controls {
        font-size: 12px;
    }
    
    .camera-description-epg {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
}

@media (max-width: 320px) {
    .camera-title-container h1 {
        font-size: 0.9rem;
    }
    
    .camera-description-external {
        max-width: 95%;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .camera-description-above-carousel {
        max-width: 95%;
        padding: 8px 12px;
        font-size: 0.8rem;
        bottom: 140px;
    }
    
    .auto-play-controls {
        flex-direction: column;
        gap: 8px;
        padding: 6px 10px;
    }
    
    .auto-play-button {
        padding: 6px 10px;
        min-width: 60px;
        font-size: 11px;
    }
    
    .timer-controls {
        font-size: 11px;
    }
    
    .camera-description-epg {
        padding: 5px 8px;
        font-size: 0.7rem;
    }
}

/* Portrait mobile view - hide thumbnails, show only controls */
@media (max-width: 480px) and (orientation: portrait) {
    /* Hide thumbnail carousel in portrait mobile */
    .carousel {
        display: none;
    }
    
    /* Simplify carousel container to just show controls */
    .carousel-container {
        bottom: 70px; /* Higher up to leave room for footer */
        padding: 10px 15px;
        gap: 8px;
        max-width: 95%;
        align-items: center;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    }
    
    /* Hide text labels on buttons, show only icons */
    .auto-play-button .auto-text {
        display: none;
    }
    
    .auto-play-button {
        padding: 10px 12px;
        min-width: auto;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .auto-play-button .play-icon {
        font-size: 1.2rem;
    }
    
    /* Hide timelapse button text */
    .timelapse-button {
        font-size: 0;
        padding: 10px 12px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .timelapse-button::before {
        content: "⏱";
        font-size: 1.2rem;
    }
    
    /* Fullscreen button same height */
    .fullscreen-btn {
        height: 44px;
        width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Hide timer controls in portrait mobile */
    .timer-controls {
        display: none;
    }
    
    /* Auto-play controls horizontal layout */
    .auto-play-controls {
        flex-direction: row;
        gap: 8px;
        padding: 8px 12px;
        align-items: center;
    }
    
    /* Make prev/next buttons more prominent */
    .carousel-btn {
        position: static;
        transform: none;
        width: 44px;
        height: 44px;
    }
    
    /* Mobile info FAB positioned above safe area */
    .mobile-info-fab {
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }
}

/* Landscape mobile - show thumbnails but smaller */
@media (max-height: 480px) and (orientation: landscape) {
    .carousel-container {
        bottom: 5px;
        padding: 8px 12px;
    }
    
    .carousel {
        width: 300px;
    }
    
    .thumbnail {
        width: 70px;
        height: 45px;
    }
    
    .auto-play-controls {
        flex-direction: row;
        gap: 6px;
        padding: 6px 10px;
    }
    
    .auto-play-button {
        padding: 6px 10px;
        font-size: 0.7rem;
    }
    
    .timer-controls {
        font-size: 0.7rem;
    }
    
    .camera-title-container {
        top: 5px;
        left: 5px;
        padding: 6px 10px;
    }
    
    .camera-title-container h1 {
        font-size: 0.9rem;
    }
    
    .logo-container {
        display: none;
    }
    
    .top-right-controls {
        top: 5px;
        right: 5px;
    }
    
    .mobile-info-fab {
        display: none;
    }
}

/* ==================== FULLSCREEN BUTTON ==================== */

.fullscreen-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    padding: 0;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.fullscreen-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.fullscreen-button svg {
    width: 20px;
    height: 20px;
}

/* ==================== GOODIES OVERLAY ==================== */

.goodie-overlay {
    position: absolute;
    bottom: 200px; /* Above thumbnails */
    left: 50%;
    transform: translateX(-50%);
    z-index: 910;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.85), rgba(30, 30, 30, 0.9));
    padding: 16px 24px;
    border-radius: 12px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    max-width: 80%;
    min-width: 200px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.5s ease;
    transform: translateX(-50%) translateY(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.goodie-overlay.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.goodie-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.goodie-text {
    margin: 0;
    color: white;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 400;
    max-height: 4.5em; /* 3 lines */
    overflow: hidden;
    text-overflow: ellipsis;
}

.goodie-link {
    color: #4da6ff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.goodie-link:hover {
    color: #80c4ff;
    text-decoration: underline;
}

/* Mobile goodies */
@media (max-width: 768px) {
    .goodie-overlay {
        bottom: 180px; /* Above footer links on tablet */
        max-width: 90%;
        padding: 12px 16px;
    }
    
    .goodie-text {
        font-size: 0.9rem;
        max-height: none; /* Allow full text on mobile */
        overflow: visible;
    }
    
    .goodie-link {
        display: block; /* Ensure link is visible */
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    .goodie-overlay {
        bottom: 140px; /* Higher up to avoid controls */
        left: 10px;
        right: 10px;
        transform: none; /* Remove center transform */
        max-width: none;
        width: auto;
        padding: 12px 16px;
        border-radius: 10px;
    }
    
    .goodie-overlay.show {
        transform: translateY(0); /* Override show transform */
    }
    
    .goodie-text {
        font-size: 0.85rem;
        max-height: none; /* Show full text */
        overflow: visible;
        line-height: 1.4;
        word-wrap: break-word;
    }
    
    .goodie-link {
        font-size: 0.8rem;
        display: block;
        margin-top: 10px;
        padding: 8px 12px;
        background: rgba(77, 166, 255, 0.2);
        border-radius: 6px;
        text-align: center;
    }
}

/* Portrait mobile - goodies above controls */
@media (max-width: 480px) and (orientation: portrait) {
    .goodie-overlay {
        bottom: 130px; /* Above the control bar */
    }
}

/* ==================== FULLSCREEN STYLES ==================== */

.video-container:fullscreen,
.video-container:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    background: #000;
}

.video-container:fullscreen .main-video,
.video-container:-webkit-full-screen .main-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ==================== VIDEO ERROR OVERLAY ==================== */

.video-error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 950;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-error-overlay.show {
    opacity: 1;
    visibility: visible;
}

.error-content {
    text-align: center;
    color: white;
    padding: 2rem;
}

.error-content svg {
    color: #ff6b6b;
    margin-bottom: 1rem;
}

.error-content p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.error-content button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.error-content button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

/* ==================== INACTIVE CAMERA OVERLAY ==================== */

.inactive-camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 950;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.inactive-camera-overlay.show {
    opacity: 1;
    visibility: visible;
}

.inactive-camera-content {
    text-align: center;
    color: white;
    padding: 2rem;
}

.inactive-camera-content svg {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
}

.inactive-camera-message {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Language selector */
.language-selector {
    position: relative;
    transition: opacity 0.3s ease;
}

.lang-btn {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    box-sizing: border-box;
}

.lang-btn:hover {
    background: rgba(0, 0, 0, 0.85);
}

.lang-flag {
    font-size: 1.2rem;
    line-height: 1;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 180px;
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    max-height: 300px;
    overflow-y: auto;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    color: white;
    font-size: 0.9rem;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-option.active {
    background: rgba(255, 255, 255, 0.15);
}

/* Auto-hide language selector with other UI elements */
.language-selector.auto-hide {
    opacity: 0;
    pointer-events: none;
}

/* Footer links */
.footer-links {
    position: absolute;
    bottom: 10px; /* At the very bottom as footer */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000; /* Above everything */
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 20px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: opacity 0.3s ease;
    max-width: 90%;
    width: auto;
    min-width: fit-content;
}

.footer-links:empty {
    display: none;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.55rem;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

.footer-links.auto-hide {
    opacity: 0;
    pointer-events: none;
}

/* ==================== MOBILE INFO FAB ==================== */

/* Hidden by default on desktop */
.mobile-info-fab {
    display: none;
}

/* Mobile responsive for footer links */
@media (max-width: 600px) {
    /* Hide traditional footer links on mobile */
    .footer-links {
        display: none !important;
    }
    
    /* Show mobile info FAB */
    .mobile-info-fab {
        display: block;
        position: absolute;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        right: 16px;
        z-index: 1000;
        transition: opacity 0.3s ease;
    }
    
    .mobile-info-fab.auto-hide {
        opacity: 0;
        pointer-events: none;
    }
    
    .mobile-info-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.75);
        border: 1px solid rgba(255, 255, 255, 0.25);
        color: rgba(255, 255, 255, 0.9);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(10px);
        transition: all 0.2s ease;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
        padding: 0;
    }
    
    .mobile-info-btn:active {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(0.95);
    }
    
    .mobile-info-menu {
        position: absolute;
        bottom: calc(100% + 8px);
        right: 0;
        background: rgba(0, 0, 0, 0.92);
        border-radius: 12px;
        padding: 8px 0;
        min-width: 180px;
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px) scale(0.95);
        transform-origin: bottom right;
        transition: all 0.2s ease;
    }
    
    .mobile-info-menu.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }
    
    .mobile-info-menu a {
        display: block;
        padding: 12px 18px;
        color: rgba(255, 255, 255, 0.9);
        text-decoration: none;
        font-size: 0.85rem;
        transition: background 0.15s ease;
        white-space: nowrap;
    }
    
    .mobile-info-menu a:active {
        background: rgba(255, 255, 255, 0.12);
    }
    
    .mobile-info-menu:empty {
        display: none;
    }
}

/* Very small screens - ensure nothing touches edges */
@media (max-width: 380px) {
    .carousel-container {
        bottom: 50px;
        padding: 8px 10px;
    }
}
