/* monopole.cloud - Sci-fi Command Center */
/* Colors: #40F0E0, #080C14, #40E080, #E0F0F8, #101820, #F040A0, #90B0C8 */
/* Fonts: Exo 2, Nunito Sans, Source Code Pro */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #080C14;
    font-family: 'Nunito Sans', sans-serif;
    color: #90B0C8;
}

/* Star Field */
#star-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.star-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.star-layer.distant {
    background-image: radial-gradient(1px 1px at 10% 20%, rgba(224,240,248,0.3), transparent),
        radial-gradient(1px 1px at 30% 65%, rgba(224,240,248,0.25), transparent),
        radial-gradient(1px 1px at 55% 15%, rgba(224,240,248,0.3), transparent),
        radial-gradient(1px 1px at 70% 80%, rgba(224,240,248,0.2), transparent),
        radial-gradient(1px 1px at 85% 40%, rgba(224,240,248,0.3), transparent),
        radial-gradient(1px 1px at 45% 90%, rgba(224,240,248,0.25), transparent),
        radial-gradient(1px 1px at 15% 55%, rgba(224,240,248,0.2), transparent),
        radial-gradient(1px 1px at 92% 10%, rgba(224,240,248,0.3), transparent);
    animation: twinkle 4s ease-in-out infinite;
}

.star-layer.mid {
    background-image: radial-gradient(1.5px 1.5px at 20% 45%, rgba(224,240,248,0.5), transparent),
        radial-gradient(1.5px 1.5px at 50% 30%, rgba(224,240,248,0.4), transparent),
        radial-gradient(1.5px 1.5px at 75% 70%, rgba(224,240,248,0.5), transparent),
        radial-gradient(1.5px 1.5px at 40% 85%, rgba(224,240,248,0.4), transparent),
        radial-gradient(1.5px 1.5px at 88% 25%, rgba(224,240,248,0.5), transparent),
        radial-gradient(1.5px 1.5px at 8% 75%, rgba(224,240,248,0.4), transparent);
    animation: twinkle 6s ease-in-out infinite 1s;
}

.star-layer.close {
    background-image: radial-gradient(2px 2px at 25% 35%, rgba(224,240,248,0.7), transparent),
        radial-gradient(2px 2px at 60% 55%, rgba(224,240,248,0.65), transparent),
        radial-gradient(2px 2px at 80% 15%, rgba(224,240,248,0.7), transparent),
        radial-gradient(2px 2px at 35% 75%, rgba(224,240,248,0.6), transparent),
        radial-gradient(2px 2px at 95% 60%, rgba(224,240,248,0.7), transparent);
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Nebula accents */
#star-field::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    top: 10%;
    right: 15%;
    background: radial-gradient(ellipse, rgba(64, 240, 224, 0.03) 0%, transparent 70%);
    border-radius: 50%;
}

#star-field::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    bottom: 15%;
    left: 40%;
    background: radial-gradient(ellipse, rgba(240, 64, 160, 0.02) 0%, transparent 70%);
    border-radius: 50%;
}

/* Sidebar */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background: rgba(8, 12, 20, 0.95);
    border-right: 1px solid rgba(64, 240, 224, 0.15);
    z-index: 10;
    padding: 1.5rem 1rem;
    overflow-y: auto;
    transform: translateX(-240px);
    animation: sidebarSlide 0.5s ease 1s forwards;
    scrollbar-width: thin;
    scrollbar-color: #101820 #080C14;
}

@keyframes sidebarSlide {
    to { transform: translateX(0); }
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(64, 240, 224, 0.1);
}

.system-logo {
    width: 32px;
    height: 32px;
    border: 1.5px solid #40F0E0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 0.7rem;
    color: #40F0E0;
}

.system-label {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: #E0F0F8;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-title {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #40F0E0;
    margin-bottom: 0.75rem;
}

/* Status Items */
.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-dot.online {
    background: #40E080;
    box-shadow: 0 0 6px rgba(64, 224, 128, 0.5);
}

.status-dot.warning {
    background: #F040A0;
    box-shadow: 0 0 6px rgba(240, 64, 160, 0.5);
    animation: statusBlink 2s ease-in-out infinite;
}

@keyframes statusBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.status-text {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.7rem;
    color: #90B0C8;
}

/* Network Diagram */
.network-diagram {
    padding: 0.5rem 0;
}

.network-svg {
    width: 100%;
    height: auto;
}

.node-center {
    animation: nodePulse 3s ease-in-out infinite;
}

.node-outer {
    animation: nodePulse 3s ease-in-out infinite 0.5s;
}

.node-alert {
    animation: nodeAlert 1.5s ease-in-out infinite;
}

@keyframes nodePulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes nodeAlert {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Log Entries */
.log-entries {
    max-height: 120px;
    overflow-y: auto;
}

.log-entry {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.65rem;
}

.log-time {
    color: #40F0E0;
    opacity: 0.6;
}

.log-msg {
    color: #90B0C8;
}

.log-entry.alert .log-msg {
    color: #F040A0;
}

/* Main Display */
#main-display {
    margin-left: 240px;
    height: 100vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    z-index: 5;
    opacity: 0;
    animation: fadeIn 0.8s ease 1.5s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Display Screens */
.display-screen {
    background: rgba(16, 24, 32, 0.7);
    border: 1px solid rgba(64, 240, 224, 0.15);
    border-radius: 4px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.display-screen.visible {
    opacity: 1;
    transform: translateY(0);
}

.screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1.2rem;
    background: rgba(64, 240, 224, 0.05);
    border-bottom: 1px solid rgba(64, 240, 224, 0.1);
}

.screen-label {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: #40F0E0;
    text-transform: uppercase;
}

.screen-status {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.6rem;
    color: #40E080;
    animation: statusBlink 2s ease-in-out infinite;
}

.screen-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #40F0E0;
    opacity: 0.5;
}

.screen-content {
    padding: 1.5rem;
}

.screen-title {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 2.5vw, 2.5rem);
    letter-spacing: 0.03em;
    color: #E0F0F8;
    margin-bottom: 1rem;
}

.screen-body {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 0.95rem;
    line-height: 1.75;
    color: #90B0C8;
    max-width: 640px;
}

.hero-screen {
    min-height: 40vh;
    display: flex;
    flex-direction: column;
}

.hero-screen .screen-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Data Readout */
.data-readout {
    margin-top: 1.5rem;
}

.readout-bar {
    margin-bottom: 0.75rem;
}

.readout-label {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.7rem;
    color: #40F0E0;
    display: block;
    margin-bottom: 0.3rem;
}

.bar-track {
    width: 100%;
    max-width: 300px;
    height: 4px;
    background: #101820;
    border-radius: 2px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #40F0E0, #40E080);
    border-radius: 2px;
    transition: width 1s ease;
}

/* Responsive */
@media (max-width: 768px) {
    #sidebar {
        width: 100%;
        height: auto;
        position: relative;
        transform: translateX(0);
        animation: none;
        border-right: none;
        border-bottom: 1px solid rgba(64, 240, 224, 0.15);
    }

    #main-display {
        margin-left: 0;
        height: auto;
        opacity: 1;
        animation: none;
    }
}
