* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100vw;
    background: #0a0a0a;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
}

/* =========================================================
   BALANCED HUD CLOCK PILL (YELLOW)
   ========================================================= */
.clock-hud-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(30, 26, 0, 0.7);
    border: 1.5px solid rgba(255, 234, 0, 0.35);
    border-radius: 12px;
    padding: 10px 20px;
    box-shadow: 0 0 18px rgba(255, 234, 0, 0.15), inset 0 0 14px rgba(255, 234, 0, 0.06);
    backdrop-filter: blur(8px);
}

.clock-live-dot {
    width: 11px;
    height: 11px;
    background-color: #ffea00;
    border-radius: 50%;
    box-shadow: 0 0 10px #ffea00;
    animation: live-pulse 2s infinite ease-in-out;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.8); }
}

.live-clock-yellow {
    color: #ffea00;
    font-family: "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
    font-weight: 800;
    letter-spacing: 1.5px;
    line-height: 1;
    text-shadow: 0 0 12px rgba(255, 234, 0, 0.5);
}

/* =========================================================
   1. SINGLE SPECIFIC STATION SCREEN
   ========================================================= */
#single-station-view {
    display: none;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    flex-direction: column;
}

.master-header {
    position: relative;
    height: 25vh;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    background: #000;
    width: 100%;
}

.company-logo {
    position: absolute;
    left: 3vw;
    height: 20vh;
    width: auto;
    object-fit: contain;
}

.single-top-right-group {
    position: absolute;
    right: 3vw;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    z-index: 10;
}

.single-top-right-group .clock-hud-badge {
    padding: 12px 24px;
    border-radius: 14px;
}

.single-top-right-group .live-clock-yellow {
    font-size: clamp(26px, 3.8vmin, 54px);
    letter-spacing: 2px;
}

.btn-back-monitor {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: clamp(14px, 1.6vmin, 20px);
    font-weight: 700;
    color: #ffffff;
    background: #181818;
    border: 1px solid #333333;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-back-monitor:hover {
    background: #242424;
    border-color: #00ff88;
    color: #00ff88;
    transform: translateX(-3px);
}

.header-title-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.header-title-group h1 {
    font-size: clamp(50px, 9vmin, 130px);
    margin: 0 0 1.5vh 0;
    padding: 0;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -1px;
}

.header-title-group subtitle {
    font-size: clamp(20px, 3.5vmin, 50px);
    color: #ff9900;
    margin: 0;
    padding: 0;
    line-height: 1;
    font-weight: bold;
}

.workspace-single {
    display: flex;
    flex-direction: column;
    height: 75vh;
    width: 100vw;
    box-sizing: border-box;
    background: #0a0a0a;
}

.number-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 55%;
    width: 100%;
    gap: 9vw;
}

.ev-image {
    height: clamp(180px, 38vh, 500px);
    object-fit: contain;
    filter: url(#green-threshold);
    transform: translateY(0.8vh);
    transition: filter 0.3s ease;
}

.ev-image.is-full {
    filter: url(#red-threshold);
}

.single-focus-number {
    color: #00ff88;
    font-size: clamp(155px, 44vmin, 460px);
    font-weight: 400;
    line-height: 0.85;
    margin: 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    text-shadow: 
        0px 2px 0px #00cc6a, 0px 4px 0px #00b35d, 0px 6px 0px #00994f,
        0px 8px 0px #008042, 0px 10px 0px #006635, 0px 12px 0px #004d28,
        0px 30px 40px rgba(0, 255, 136, 0.8), 0px 0px 80px rgba(0, 255, 136, 0.4);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.idle-unit-label {
    font-size: clamp(44px, 10.5vmin, 130px);
    font-weight: 900;
    color: #00ff88;
    margin-left: 18px;
    display: inline;
    letter-spacing: 1.5px;
    white-space: nowrap;
    text-shadow: 
        0px 3px 0px #00cc6a, 0px 6px 0px #00b35d, 0px 9px 0px #00994f,
        0px 25px 35px rgba(0, 255, 136, 0.9);
    transition: color 0.3s ease, text-shadow 0.3s ease, font-size 0.2s ease;
}

.single-focus-number.is-full .idle-unit-label {
    font-size: clamp(62px, 15vmin, 185px);
    color: #ff3344;
    text-shadow: 
        0px 2px 0px #cc0011, 0px 4px 0px #b30010, 0px 6px 0px #99000d,
        0px 8px 0px #80000a, 0px 10px 0px #660008, 0px 12px 0px #4d0006,
        0px 30px 40px rgba(255, 51, 68, 0.8), 0px 0px 80px rgba(255, 51, 68, 0.4);
}

.arrow-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 45%;
    width: 100%;
    overflow: hidden;
}

.arrow-container {
    display: flex;
    justify-content: space-between;
    width: 80vw;
    gap: 0;
}

.arrow-container span {
    color: #0044ff;
    font-size: clamp(90px, 16vmin, 280px);
    font-weight: 900;
    transform: scaleX(1.4);
    margin: 0;
    text-shadow: -2px 0px 0px #0022cc, -4px 0px 0px #001199, 0 0 25px #0044ff, 0 0 50px #0044ff;
    animation: pulse-wave 3.5s infinite;
    animation-delay: calc(0.25s * var(--i));
}

@keyframes pulse-wave {
    0%, 100% { opacity: 0.1; transform: scaleX(1.4) scaleY(0.9); filter: brightness(0.4); }
    50% { opacity: 1; transform: scaleX(1.4) scaleY(1); filter: brightness(1.6); }
}

/* =========================================================
   2. DIRECTORY HUB
   ========================================================= */
#directory-view {
    display: none;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.2rem 1.8rem;
}

.directory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid #222222;
    padding-bottom: 2rem;
    gap: 2rem;
}

.dir-header-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.dir-logo {
    height: clamp(80px, 10vw, 130px);
    width: auto;
    object-fit: contain;
}

.dir-header-center {
    flex: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.dir-header-center h1 {
    font-size: clamp(1.8rem, 2.6vw, 2.5rem);
    color: #ffffff;
    margin: 0;
    font-weight: 800;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.dir-subtitle {
    font-size: clamp(13px, 1.2vw, 17px);
    color: #ff9900;
    margin: 0;
    padding: 0;
    line-height: 1.2;
    font-weight: bold;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

.dir-header-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 12px;
}

.dir-header-right .live-clock-yellow {
    font-size: clamp(20px, 1.75vw, 28px);
}

.search-input {
    background: #141414;
    border: 1px solid #333333;
    color: #ffffff;
    padding: 0.75rem 1.2rem;
    border-radius: 9px;
    font-size: 0.95rem;
    width: 100%;
    max-width: 290px;
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: #00ff88;
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.15);
    background: #191919;
}

.station-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 1.25rem;
}

.station-card {
    background: #121212;
    border: 1px solid #242424;
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.station-card:hover {
    transform: translateY(-3px);
    border-color: #00ff88;
    background: #171717;
}

.card-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: #f0f0f0;
}

.card-count {
    font-size: 2rem;
    font-weight: 800;
}

@media (max-width: 880px) {
    .directory-header {
        flex-direction: column;
        text-align: center;
        gap: 1.4rem;
    }
    .dir-header-left, .dir-header-center, .dir-header-right {
        flex: 100%;
        justify-content: center;
        align-items: center;
        width: 100%;
    }
    .search-input {
        max-width: 100%;
    }
    .single-top-right-group {
        top: 2.5vh;
        transform: none;
        right: 2vw;
    }
}