@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@200;300;400;500&family=JetBrains+Mono:wght@200;400&display=swap');

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

body {
    background-color: #02040a;
    color: #e2e8f0;
    font-family: 'Space Grotesk', sans-serif;
    overflow: hidden;
    height: 100vh;
}

#boot-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #02040a; z-index: 100;
    display: flex; justify-content: center; align-items: center;
    text-align: center; transition: opacity 0.5s ease;
}

.boot-content .logo { font-size: 3rem; font-weight: 200; letter-spacing: 10px; margin-bottom: 1rem; color: #fff; text-shadow: 0 0 20px rgba(255,255,255,0.2); }
.boot-content .subtitle { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: #64748b; margin-bottom: 2.5rem; letter-spacing: 2px; }

#btn-init {
    background: transparent; border: 1px solid rgba(255,255,255,0.2);
    color: #fff; padding: 12px 30px; font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem; cursor: pointer; transition: all 0.3s ease;
}
#btn-init:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.6); box-shadow: 0 0 15px rgba(255,255,255,0.1); }
.hint { margin-top: 1.5rem; font-size: 0.7rem; color: #475569; }

#bg-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.vignette {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, transparent 30%, rgba(2,4,10,0.85) 100%);
    z-index: 2; pointer-events: none;
}

.hud {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 2rem;
    pointer-events: none;
}

.hud-header {
    display: flex; justify-content: space-between; align-items: center;
    font-family: 'JetBrains Mono', monospace; font-size: 0.8rem;
    color: rgba(255,255,255,0.5); letter-spacing: 2px;
    border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 0.8rem; flex-shrink: 0;
}

.brand { display: flex; align-items: center; gap: 10px; text-shadow: 0 0 10px rgba(255,255,255,0.2); }
.pulse-dot {
    width: 6px; height: 6px; background-color: #38bdf8; border-radius: 50%;
    box-shadow: 0 0 10px #38bdf8, 0 0 20px #38bdf8; animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ä¸­é—´åŒºåŸŸæŽ§åˆ¶ */
.center-stage {
    flex: 1;
    display: grid;
    place-items: center;
    position: relative;
    min-height: 0; /* å…³é”®ï¼šé˜²æ­¢ flex child æ’‘ç ´çˆ¶å®¹å™¨ */
    padding: 10px 0; /* ç»™ä¸Šä¸‹ç•™ç‚¹å‘¼å¸ç©ºé—´ */
}

#ring-canvas {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    /* å¤§å¹…ç¼©å°åœ†çŽ¯çš„æœ€å¤§å°ºå¯¸ï¼Œé˜²æ­¢æŒ¤åŽ‹åº•éƒ¨ç»ˆç«¯ */
    max-width: 420px;
    /* max-height: 42vh; */
    object-fit: contain;
    pointer-events: none;
}

.time-readout { grid-area: 1 / 1; text-align: center; z-index: 15; }
.time-digits {
    /* åŒæ­¥ç¼©å°æ•°å­—å­—ä½“ */
    font-size: 3rem; font-weight: 200; letter-spacing: 4px; color: #fff;
    text-shadow: 0 0 30px rgba(255,255,255,0.3);
    display: flex; align-items: baseline; justify-content: center;
}
.colon { font-size: 2rem; margin: 0 5px; color: rgba(255,255,255,0.2); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }

.time-labels {
    display: flex; justify-content: center; 
    /* åŒæ­¥ç¼©å°åº•éƒ¨é—´è· */
    gap: 3.2rem; margin-top: 5px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.6rem;
    color: rgba(255,255,255,0.4); letter-spacing: 4px; text-shadow: 0 0 5px rgba(255,255,255,0.2);
}

.hud-footer {
    display: flex;
    justify-content: center;
    pointer-events: auto;
    flex-shrink: 0;
    padding-top: 1rem;
}

.terminal {
    width: 100%;
    max-width: 550px;
    background: rgba(10, 15, 25, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(56, 189, 248, 0.05);
    border-radius: 8px;
    padding: 1.2rem 1.8rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    transition: box-shadow 0.3s ease;
}
.terminal:focus-within {
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
}

.logs {
    max-height: 120px;
    overflow-y: auto; margin-bottom: 1rem;
    display: flex; flex-direction: column; gap: 8px;
    padding-right: 5px;
}
.logs::-webkit-scrollbar { width: 4px; }
.logs::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, 0.3); border-radius: 2px; }

.log-line.sys { color: rgba(255,255,255,0.5); }
.log-line.usr { color: #38bdf8; text-shadow: 0 0 8px rgba(56,189,248,0.5); }

.input-line {
    display: flex; align-items: center; gap: 10px;
    border-top: 1px dashed rgba(56, 189, 248, 0.2); padding-top: 1rem;
}
.prompt { color: #10b981; text-shadow: 0 0 5px rgba(16, 185, 129, 0.5); }
#trace-input {
    flex: 1; background: transparent; border: none; color: #fff;
    font-family: inherit; font-size: 0.9rem; outline: none;
    text-shadow: 0 0 5px rgba(255,255,255,0.3);
}

@media (max-width: 768px) {
    .hud { padding: 1rem; }
    .time-digits { font-size: 2rem; }
    .colon { font-size: 1.5rem; margin: 0; }
    .time-labels { gap: 2.2rem; font-size: 0.5rem; }
    .terminal { padding: 1rem; }
    .logs { max-height: 80px; }
    #ring-canvas {max-width: 800px;min-width: 500px;max-height: 60vh;}
}

div#app {
    height: 100%;
}