body {
    background: linear-gradient(225deg, #0d324d, #1a5f7a, #75abbc);
    font-family: 'Inter', sans-serif;
    margin: 0; 
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; 
}

#virtual-screen-wrapper {
    aspect-ratio: 5.3 / 8.5;
    height: 95vh;
    max-width: 95vw;
}

#main-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 1.2fr 1fr 2fr 2fr;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem;
    padding: 1rem;
    gap: 1rem;
    box-sizing: border-box;
}

.dashboard-module {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1rem; 
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden; 
    min-height: 0; 
    color: #E0E0E0;
}

#header-module {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
}

#header-image-container {
    height: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.2);
}

#profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.module-title {
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Events module title with working location icon */
#events-module .module-title {
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem;
}

#events-module .module-title .working-location-icon {
    margin-left: auto;
    flex-shrink: 0;
}

#news-mode {
    background: transparent;
    border: none;
    color: white;
    appearance: none;
    padding: 0;
    width: 100%;
    text-align: center;
    text-align-last: center;
}

#news-mode option {
    text-align: center;
}

/* All-day events styling */
.all-day-events {
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
}

.all-day-events div {
    margin-bottom: 0.25rem;
}

.all-day-events div:last-child {
    margin-bottom: 0;
}

/* Layout for interchangeable modules */
#quote-module, #stock-module, #news-module {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
#info-module {
    position: relative;
}
#info-module > div {
    position: absolute;
    inset: 0;
    display: none;
    padding: 0.75rem;
    box-sizing: border-box;
}
#info-module > div.active {
    display: flex;
    flex-direction: column;
}
#quote-text {
    text-align: center;
}
#quote-author {
    flex-shrink: 0;
}


#events-list {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    flex-grow: 1;
    overflow: hidden; 
}

.event-item, .event-group {
    width: 100%;
}

.event-group {
    display: flex;
    gap: 5px;
}

.event-bubble {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    padding: 8px 12px;
    width: 100%;
    overflow: hidden;
    flex-shrink: 0;
    transition: flex-basis 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.event-bubble.current-event {
    background-color: #4dffa82b;
    border: 1px solid rgba(77, 255, 168, 0.3);
}
.event-group .event-bubble {
     flex-basis: 33.33%;
     flex-grow: 1;
}

.event-bubble:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.event-details {
    font-family: 'Roboto', sans-serif;
}

/* Weather & Stock Widget Styles */
.weather-widgets-container {
    display: flex;
    justify-content: space-around; /* Changed from space-between */
    gap: 0.5rem; /* Adjusted gap */
    margin-top: 0.75rem;
}
.weather-widget {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.weather-widget-value {
    font-size: 1.6vh;
    font-weight: 500;
    color: white;
}
.stock-price {
    font-size: 4vh;
    font-weight: 700;
    color: white;
}
.stock-change.positive { color: #4ade80; }
.stock-change.negative { color: #f87171; }

.album-container, .status-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    flex-grow: 1;
}
.album-container img, .status-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-container img { transition: opacity 1.5s ease, transform 1.5s ease; }
.album-container.transition-slide img { transition: transform 1s ease-in-out; }

/* Status title scrolling animation for long text */
#status-title {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
}

#status-title.sliding {
    animation: scrollText 12s ease-in-out infinite;
}

/* Make the parent container allow overflow when sliding */
#status-module .p-3 {
    overflow: visible;
}

@keyframes scrollText {
    0% { 
        transform: translateX(0);
        width: 100%;
    }
    25% { 
        transform: translateX(0);
        width: 100%;
    }
    50% { 
        transform: translateX(-25%);
        width: 150%;
    }
    75% { 
        transform: translateX(-25%);
        width: 150%;
    }
    100% { 
        transform: translateX(0);
        width: 100%;
    }
}
.album-container.transition-zoom img.active { transform: scale(1.1); }


