/* --- Global Styles --- */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Segoe UI', sans-serif; 
}

body { 
    background-color: #000; 
    color: white; 
    height: 100vh; 
    overflow: hidden; 
    width: 100vw; 
}

.dashboard-container {
    display: grid;
    grid-template-rows: 90px 1fr 110px; 
    height: 100vh;
}

/* --- Top Title Bar --- */
.title-bar {
    background: linear-gradient(90deg, #0a0a0a, #1a1a1a);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    border-bottom: 3px solid #3498db;
}

/* --- Main Layout --- */
.main-content {
    display: grid;
    grid-template-columns: 350px 1fr; 
    height: 100%;
    overflow: hidden;
}

/* --- News Section --- */
.sidebar-left {
    background: #0a0a0a;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden; 
}

.news-box {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0; 
    position: relative;
}

.scroll-window {
    flex-grow: 1;
    overflow: hidden; 
    position: relative;
    height: 100%;
    background: #0a0a0a;
}

#news-feed {
    display: block;
    width: 100%;
    will-change: transform; 
}

.news-item {
    padding: 20px 15px;
    border-bottom: 1px solid #333;
    background: #0a0a0a;
}

.news-source {
    color: #3498db;
    font-weight: bold;
    font-size: 0.8rem;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.news-title {
    font-size: 1.1rem;
    color: #eee;
    line-height: 1.4;
}

/* --- Slideshow (Book Effect) --- */
.slideshow-container {
    perspective: 2500px; /* Controls depth of the page turn */
    background: #000;
    position: relative;
    overflow: hidden;
    height: 100%;
}

#book-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d; 
}

.book-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    backface-visibility: hidden; /* Hides the back of the image when flipped */
    
    /* Safeguard: Dark background so empty pages are still visible */
    background-color: #2a2a2a; 
    border-right: 1px solid #111;
}

/* The image underneath */
.stationary-page {
    z-index: 1;
}

/* The image on top that turns */
.turning-page {
    z-index: 2;
    transform-origin: left center; /* The "Hinge" of the book */
    transition: transform 1.5s cubic-bezier(0.645, 0.045, 0.355, 1); 
}

/* Trigger class for the turn */
.turning-page.turn-active {
    transform: rotateY(-180deg);
}

/* --- Static Text Overlay --- */
#video-marquee-wrap {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 999; 
    transform: translateZ(200px); /* Brings text forward in 3D space */
    background: rgba(0, 0, 0, 0.6);
    
    /* PADDING FIX: 30px bottom padding prevents low letters (g, p, y) from cutting off */
    padding: 15px 0 30px 0;
    
    display: flex;
    justify-content: center;
    align-items: center;
}

#video-marquee-text {
    white-space: normal; 
    text-align: center;
}

/* --- Weather Bar (Bottom) --- */
.weather-bar {
    background-color: #1a3c6e;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0 20px;
    border-top: 2px solid #444;
    height: 100%; 
    overflow: hidden;
}

.weather-left {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-right: 20px;
    border-right: 1px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
}

.forecast-container {
    display: flex;
    flex-direction: row;
    flex-grow: 1;
    justify-content: space-evenly;
    align-items: center;
}

.forecast-day { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}