/* Ultra-dark Core */
:root {
    --bg-color: #000000;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    background-color: #0f0f11; /* 稍微提升背景明度，讓黑色容器更顯眼 */
    margin: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}

/* Dashboard Container - iPhone 12 Aspect Ratio (844x390) */
.dashboard-container {
    width: 844px;
    height: 390px;
    max-width: 844px; /* 強制鎖定寬度 */
    max-height: 390px;
    background-color: var(--bg-color);
    position: relative;
    overflow: hidden;
    aspect-ratio: 844 / 390;
    
    /* 強化視覺界線 */
    box-shadow: 0 40px 100px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 48px; 
}

/* Mobile Responsive Switch */
@media (max-width: 844px) {
    body {
        background-color: var(--bg-color);
    }
    .dashboard-container {
        width: 100vw;
        height: 100vh;
        max-width: none !important;
        max-height: none !important;
        border: none;
        border-radius: 0;
        box-shadow: none;
        aspect-ratio: auto;
    }
}

/* Safe Area & Scaling */
.safe-area-left { padding-left: env(safe-area-inset-left); }
.safe-area-right { padding-right: env(safe-area-inset-right); }

/* Glassmorphism Refined */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
}

/* Speedometer Typography */
@font-face {
    font-family: 'TeslaDigit';
    src: url('https://fonts.googleapis.com/css2?family=Outfit:wght@600&display=swap');
}

.speed-text {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.06em;
}

/* Performance Mode Border Effect */
.performance-active {
    box-shadow: inset 0 0 60px rgba(220, 38, 38, 0.3);
    border: 2px solid rgba(220, 38, 38, 0.2) !important;
}

/* Hide Scrollbars */
::-webkit-scrollbar {
    display: none;
}
