
/* === 01_styles.css === */
/**
 * Mein Reisetagebuch - Public Styles
 * Modernes, dunkles Design für die öffentliche Ansicht
 */

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a25;
    --bg-sidebar: rgba(12, 12, 18, 0.95);
    --bg-overlay: rgba(0, 0, 0, 0.85);
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    
    --accent-primary: #ff6b35;
    --accent-secondary: #ffd166;
    --accent-success: #06d6a0;
    --accent-info: #118ab2;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.15);
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(255, 107, 53, 0.3);
    
    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --sidebar-width: 400px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-round: 50%;
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-dark);
    -webkit-font-smoothing: antialiased;
}

/* ========================================
   Layout
   ======================================== */
#app-container {
    position: relative;
    width: 100%;
    height: 100%;
}

#map {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* ========================================
   Header / Branding
   ======================================== */
#branding {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

#branding .logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#branding .logo-image {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-round);
    border: 3px solid var(--accent-primary);
    object-fit: cover;
    box-shadow: var(--shadow-glow);
    transition: transform var(--transition-normal);
}

#branding .logo-image:hover {
    transform: scale(1.05);
}

#branding h1 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 1px;
    color: var(--text-primary);
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    text-align: center;
    white-space: nowrap;
}

.header-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 5px;
}

.social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-size: 1rem;
}

.social-link:hover {
    background: var(--accent-primary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* ========================================
   Toggle Video List Button
   ======================================== */
.toggle-sidebar-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.toggle-sidebar-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.toggle-sidebar-btn i {
    font-size: 1.1rem;
}

body.sidebar-open .toggle-sidebar-btn {
    opacity: 0;
    pointer-events: none;
}

/* ========================================
   Map Control Buttons
   ======================================== */
.map-control-btn {
    position: fixed;
    bottom: 30px;
    left: 20px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-round);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
    z-index: 100;
}

.map-control-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: scale(1.1);
}

.map-control-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    animation: pulse 2s infinite;
}

.map-control-btn.active i::before {
    content: "\f04c"; /* fa-pause */
}

/* Impressum Link */
.impressum-link {
    position: fixed;
    bottom: 12px;
    right: 16px;
    z-index: 100;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    opacity: 0.7;
    transition: opacity 0.3s ease, color 0.3s ease;
    background: rgba(10, 10, 15, 0.6);
    padding: 4px 10px;
    border-radius: 4px;
}

.impressum-link:hover {
    opacity: 1;
    color: var(--accent-primary);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 107, 53, 0);
    }
}

/* ========================================
   Video Sidebar (rechts)
   ======================================== */
.sidebar {
    position: fixed;
    top: 0;
    height: 100%;
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-color);
    z-index: 150;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-normal);
}

.sidebar.right {
    right: 0;
    width: var(--sidebar-width);
    transform: translateX(100%);
}

body.sidebar-open .sidebar.right {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header h2 i {
    color: var(--accent-primary);
}

.close-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--radius-round);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.close-btn:hover {
    background: var(--accent-primary);
    color: var(--text-primary);
}

.search-box {
    position: relative;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.search-box i {
    position: absolute;
    left: 35px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ========================================
   Video List Items (Public)
   ======================================== */
.VideoList {
    display: flex;
    flex-direction: column;
}

.VideoList.PublicVideoList,
.VideoList.CountryVideoList {
    flex-direction: column-reverse;
}

.VideoListItem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    min-height: 80px;
}

/* Verstecke ALLES was nicht unsere definierten Klassen hat */
.VideoListItem > *:not(.VideoThumb):not(.VideoInfo) {
    display: none !important;
}

/* Verstecke auch Text-Nodes und Links die das Framework einfügt */
.VideoListItem a[href*="UC"],
.VideoListItem > a,
.VideoListItem > span:not([class]) {
    display: none !important;
}

.VideoListItem:hover {
    background: var(--bg-card-hover);
}

.VideoListItem .VideoThumb {
    position: relative;
    width: 115px;
    min-width: 100px;
    aspect-ratio: 16/9;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-card);
}

.VideoListItem .VideoThumb ui-image.VideoThumbnail {
    display: block;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform var(--transition-normal);
}

.VideoListItem:hover .VideoThumb ui-image.VideoThumbnail {
    transform: scale(1.05);
}

.VideoListItem .VideoThumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.VideoListItem:hover .VideoThumb img {
    transform: scale(1.05);
}

.VideoListItem .VideoThumb .Duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
}

.VideoListItem .VideoThumb .PlayOverlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.VideoListItem:hover .VideoThumb .PlayOverlay {
    opacity: 1;
}

.VideoListItem .VideoThumb .PlayOverlay i {
    font-size: 1.5rem;
    color: var(--text-primary);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.VideoListItem .VideoInfo {
    flex: 1;
    min-width: 0;
}

.VideoListItem .VideoTitle {
    font-weight: 500;
    font-size: 0.85rem;
    line-height: 1.3;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.VideoListItem .VideoMeta {
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.VideoListItem .VideoMeta .Country {
    color: var(--accent-success);
}

/* ========================================
   Country Detail Sidebar (rechts)
   ======================================== */
#country-detail-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--sidebar-width);
    height: 100%;
    height: var(--vh);
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    border-left: 1px solid var(--border-color);
}

#country-detail-sidebar:not(.hidden) {
    transform: translateX(0);
}

#country-detail-sidebar .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

#country-detail-sidebar .country-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

#country-detail-sidebar .country-flag {
    font-size: 2rem;
}

#country-detail-sidebar .country-info h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: 1px;
}

#country-detail-sidebar .panel-stats {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

#country-detail-sidebar .sidebar-content {
    flex: 1;
    overflow-y: auto;
}

#country-detail-sidebar .sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
}

.action-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--accent-primary);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.action-btn:hover {
    background: #ff8555;
    transform: translateY(-1px);
}

.action-btn.secondary {
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
}

.action-btn.secondary:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
}

/* ========================================
   Video Player Modal
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.modal.Visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform var(--transition-normal);
}

.modal.Visible .modal-content {
    transform: translateY(0);
}

.modal .close-btn {
    position: absolute;
    top: -50px;
    right: 0;
    background: var(--bg-card);
    z-index: 10;
}

#youtube-player {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}

#youtube-player iframe {
    width: 100%;
    height: 100%;
}

.modal .video-details {
    padding: 20px;
}

.modal .video-details h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.modal .video-details p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    max-height: 80px;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* ========================================
   Map Markers
   ======================================== */
.country-video-marker {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: 25px;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
    white-space: nowrap;
}

.country-video-marker:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
    background: var(--accent-primary);
}

.country-video-marker .video-icon {
    font-size: 1rem;
}

.country-video-marker .video-count {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.video-location-marker {
    width: 36px;
    height: 36px;
    background: var(--accent-info);
    border: 3px solid var(--text-primary);
    border-radius: var(--radius-round);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.video-location-marker:hover {
    transform: scale(1.2);
    background: var(--accent-primary);
}

/* ========================================
   Mapbox Overrides
   ======================================== */
.mapboxgl-ctrl-group {
    background: var(--bg-card) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-md) !important;
    border: none !important;
}

.mapboxgl-ctrl-group button {
    background: transparent !important;
    color: var(--text-primary) !important;
}

.mapboxgl-ctrl-group button:hover {
    background: var(--bg-card-hover) !important;
}

.mapboxgl-ctrl-group button + button {
    border-top-color: var(--border-color) !important;
}

.mapboxgl-ctrl-attrib {
    background: rgba(0,0,0,0.5) !important;
    color: var(--text-muted) !important;
}

.mapboxgl-ctrl-attrib a {
    color: var(--text-secondary) !important;
}

/* ========================================
   Scrollbar
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-color-hover);
}

canvas.mapboxgl-canvas {
    outline: none;
}

/* ========================================
   Video Player Popup
   ======================================== */
.VideoPlayerPopup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.VideoPlayerOverlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.VideoPlayerContent {
    position: relative;
    width: 90%;
    max-width: 1000px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.VideoPlayerClose {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-primary);
    border-radius: var(--radius-round);
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
    transition: all var(--transition-fast);
}

.VideoPlayerClose:hover {
    background: var(--accent-primary);
    transform: scale(1.1);
}

.VideoPlayerTitle {
    padding: 15px 60px 15px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.VideoPlayerIframe {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
}

.VideoPlayerIframe iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.VideoPlayerDescription {
    padding: 15px 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    max-height: 150px;
    overflow-y: auto;
    border-top: 1px solid var(--border-color);
    white-space: pre-wrap;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    #branding {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    #branding h1 {
        font-size: 1.6rem;
    }
    
    .sidebar.right {
        width: 100%;
    }
    
    .toggle-sidebar-btn {
        right: 15px;
        padding: 10px 15px;
    }
    
    .toggle-sidebar-btn span {
        display: none;
    }
    
    #country-detail-sidebar {
        width: 100%;
    }
    
    .VideoListItem .VideoThumb {
        width: 100px;
        min-width: 100px;
    }
}

