body {
    font-family: 'Space Mono', monospace;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0px 12px 180px 12px;
    max-width: 100%;
    user-select: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    scrollbar-width: none;
}

a { text-decoration: none; color: var(--text); }
button, a, input, label, textarea, select, div { -webkit-tap-highlight-color: transparent; }

@font-face { font-family: 'Monorama'; src: url('../fonts/Monorama.ttf') format('truetype'); }

.top-bar {
    background-color: transparent;
    padding: 3rem 1rem 0;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 100;
    animation: fadeIn 1.7s forwards;
}

.top-bar > div { display: flex; align-items: center; gap: 12px; }

.top-bar a {
    text-decoration: none;
    font-size: 15px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.floating-bar {
    position: fixed;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 370px;
    background-color: var(--card);
    border-radius: 34px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    border: 0.5px solid var(--border);
}

.floating-bar > div {
    display: flex;
    gap: 69px;
    align-items: center;
}

.floating-bar i { color: var(--text); }
.floating-bar a {
    text-decoration: none;
    font-size: 15px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.more-options {
    background-color: transparent;
    color: var(--text);
    border: 0;
    font-size: 2rem;
    font-weight: 100;
}

.app-title {
    font-family: 'Space Mono', monospace;
    color: var(--text);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.app-title a {
    font-size: 1.2rem;
    color: inherit;
    text-decoration: none;
    position: relative;
}

.dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 100%;
    --base-delay: 100ms;
    --stagger: 80ms;
    scrollbar-width: none;
}

.card {
    background: var(--card);
    border: 0.5px solid var(--border);
    border-left: 0.5px solid var(--border);
    padding: 1rem;
    position: relative;
    overflow: hidden;
    transform: translateY(40px);
    transition: all 0.3s ease;
}

.card.tapped {
    filter: brightness(1);
    border-left: 3px solid var(--accent);
    border-color: var(--accent);
}
.card.tapped::before { opacity: 1; }
.dashboard > .card { animation-delay: calc(var(--order) * var(--stagger) + var(--base-delay)); }
.card-content { animation: fadeIn 1s forwards; }

.card-header {
    color: var(--accent);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.25rem;
    border-bottom: 0.5px solid var(--border);
    padding-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scramble-char { opacity: 0.1; color: inherit; }

.card-value {
    width: fit-content;
    font-size: 2rem;
    font-family: 'Space Mono', monospace;
    margin: 0;
}

.card-unit { text-transform: uppercase; font-size: 0.8rem; color: #a3a3a3; }

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: var(--r50);
    display: inline-block;
    margin-right: 10px;
    margin-left: 5px;
    animation-delay: 2s;
}

.status-indicator-orange {
    width: 10px;
    height: 10px;
    border-radius: var(--r50);
    display: inline-block;
    margin-right: 8px;
    animation-delay: 2s;
}

.status-good { background-color: var(--accent); }
.status-warning { background-color: var(--status-warning); }
.status-critical { background-color: var(--status-critical); }

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    --stagger: 40ms;
}

.fuel-gauge {
    height: 3px;
    background: var(--border);
    border-right: 0.5px solid var(--accent);
    margin-top: 15px;
    overflow: hidden;
    position: relative;
}

.fuel-progress {
    height: 100%;
    background: var(--accent);
    width: 0;
    transform-origin: left;
    animation: fillGauge 3s forwards cubic-bezier(0.4, 0, 0.2, 1);
    --fuel-percentage: 65%;
}

.alert {
    position: fixed;
    top: 6%;
    right: 3%;
    padding: 10px 15px;
    background-color: var(--card);
    color: var(--bg);
    border-left: 1px solid var(--accent);
    opacity: 0;
    width: fit-content;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 1000;
    letter-spacing: 0.05rem;
    font-size: 0.9em;
    font-family: 'Space Mono', monospace;
    transform: translateX(100px);
}

.alert.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0px);
    transition: transform 0.3s;
    animation: fade-text 1s forwards;
    animation-delay: 2500ms;
}

.alert.message { background-color: var(--card); color: var(--fg); }
.alert.error { background-color: #ff0000; color: #222; }
.fa-sliders { transform: rotate(90deg); }

.warning-indicators {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 15px;
}

.indicator-item { display: flex; align-items: center; font-size: 14px; }

/* Service Indicator */
.progress-bar {
    height: 3px;
    background: var(--border);
    border-right: 0.5px solid var(--accent);
    margin-top: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    animation: fillGauge 3s forwards cubic-bezier(0.4, 0, 0.2, 1);
    --fuel-percentage: 65%;
}

.meter-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.meter-item { text-align: center; }
.meter-label {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: var(--text1);
    margin-bottom: 5px;
}

.meter-value { font-size: 1.4em; font-weight: 400; }
.meter-unit { font-size: 11px; margin-top: 5px; color: var(--text1); }

.eco-indicator { text-align: left; }

.eco-bar {
    height: 3px;
    background: var(--status-critical);
    margin-top: 8px;
    overflow: hidden;
}

.eco-fill {
    height: 100%;
    background: var(--accent);
    width: 100%;
    animation: pulse-eco 2s infinite;
}

.hex-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 15px 0 0;
}

.hex-item {
    width: 60px;
    height: 65px;
    position: relative;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transition: all 0.3s ease;
    margin: 4px;
}

.hex-inner {
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hex-corner {
    position: absolute;
    width: 100%;
    height: 100%;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: transparent;
    z-index: -1;
    transition: all 0.3s ease;
}

.hex-icon { font-size: 15px; margin-bottom: 5px; color: #888; }

.hex-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #888;
}

.shimmer {
    color: transparent;
    background: linear-gradient(90deg, var(--text) 0%, var(--bg) 25%, var(--bg) 75%, var(--text) 100%);
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    animation-name: shimmerMove, shimmerReveal;
    animation-duration: 1s, 0.6s;
    animation-timing-function: ease-out, ease-out;
    animation-fill-mode: forwards, forwards;
    animation-delay: 4.5s, 5.5s;
}
