:root {
    --text-color: #FFF;
    --text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
    --font-primary: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --bg-overlay: rgba(0,0,0,0.4);
}

body {
    margin: 0;
    font-family: var(--font-primary);
    background-color: #000;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.tv-screen {
    width: 100%;
    height: 100%;
    position: relative;
    color: var(--text-color);
}

#background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* --- Header --- */
.header-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3vh 4vw;
    box-sizing: border-box;
    z-index: 10;
    text-shadow: var(--text-shadow);
}

.header-logo {
    width: 4vw;
    height: 4vw;
    border-radius: 12px;
    background: #FFF;
    padding: 0.2vw;
    object-fit: contain;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 2vw;
    font-size: 1.6vw;
    background: var(--bg-overlay);
    padding: 1vh 2vw;
    border-radius: 50px;
    backdrop-filter: blur(5px);
}

.header-date-label { font-weight: 300; opacity: 0.9; }
.header-date { font-weight: 600; }

.header-right { text-align: right; }
.header-time { display: block; font-size: 3.5vw; font-weight: 700; line-height: 1; }
.header-day-date { display: block; font-size: 1.8vw; font-weight: 300; opacity: 0.9; }

/* --- Main Content --- */
.main-content {
    position: absolute;
    top: 22vh;
    left: 6vw;
    z-index: 10;
    text-shadow: var(--text-shadow);
}

.main-content h1 {
    font-size: 4.5vw;
    font-weight: 700;
    margin: 0 0 2vh 0;
    line-height: 1.1;
}

.main-content p {
    font-size: 1.6vw;
    font-weight: 400;
    line-height: 1.5;
    max-width: 55vw;
}

/* --- Footer --- */
.footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20vh;
    display: flex;
    justify-content: space-between; /* Pushes Left, Center, Right apart */
    align-items: flex-end;
    padding: 0 5vw 4vh 5vw;
    box-sizing: border-box;
    z-index: 10;
    text-shadow: var(--text-shadow);
}

.footer-section {
    flex: 1;
    display: flex;
}

/* Left: Info */
.footer-section.left {
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 1.5vh;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 1vw;
}

.info-row .icon {
    width: 2.2vw;
    height: 2.2vw;
    opacity: 0.9;
}

.text-group {
    display: flex;
    flex-direction: column;
    font-size: 1.2vw;
    line-height: 1.2;
}

.text-group .label { font-weight: 700; margin-right: 0.5vw; }
.text-group .sub-label { opacity: 0.8; font-size: 1.1vw; margin-top: 0.2vh; }

/* Center: QR */
.footer-section.center {
    justify-content: center;
    align-items: flex-end;
}

.qr-container {
    text-align: center;
    background: var(--bg-overlay);
    padding: 1vw;
    border-radius: 1vw;
    backdrop-filter: blur(5px);
}

.qr-container img {
    width: 7vw;
    height: 7vw;
    display: block;
    border-radius: 0.5vw;
}

.qr-container p {
    margin: 0.5vh 0 0 0;
    font-size: 1.2vw;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Right: Weather */
.footer-section.right {
    justify-content: flex-end;
    align-items: flex-end;
}

/* Layout Tweaks */
.weather-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.status-row {
    display: flex;
    align-items: center;
    margin-top: 4px;
    gap: 8px;
}

/* Shrunken Status Indicator */
.containerwidget {
    --uib-size: 8px; /* Small like a recording light */
    --uib-color: #95a5a6; 
    --uib-speed: 2s;
    position: relative;
    height: var(--uib-size);
    width: var(--uib-size);
}

.containerwidget::before,
.containerwidget::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    border-radius: 50%;
    background-color: var(--uib-color);
    animation: pulse var(--uib-speed) linear infinite;
    transform: scale(0);
    opacity: 0;
    transition: background-color 0.3s ease;
}

.containerwidget::after {
    animation-delay: calc(var(--uib-speed) / -2);
}

#status-text {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: bold;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(3.5); opacity: 0; }
}
/* Layout adjustment for the weather widget to accommodate the dot */
.weather-widget {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.weather-icon-container svg {
    width: 4.5vw;
    height: 4.5vw;
    filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.5));
    fill: #FFF;
}

.weather-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.weather-temp {
    font-size: 3vw;
    font-weight: 700;
    line-height: 1;
}

.weather-desc {
    font-size: 1.2vw;
    font-weight: 500;
    margin-top: 0.5vh;
    opacity: 0.9;
    text-transform: capitalize;
}