:root {
    --bg-light: #ffffff;
    --text-light: #1d1d1f;
    --bg-dark: #000000;
    --text-dark: #f5f5f7;
    --accent: #ff4500; /* Rabbit R1 orange */
    --device-color: #ff4500;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #121212;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.navbar {
    width: 100%;
    height: 52px;
    background-color: rgba(255, 69, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    border-bottom: 1px solid rgba(255, 69, 0, 0.3);
}

.nav-links {
    list-style: none;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: background 0.3s;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.simulator-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.device-case {
    background-color: var(--device-color);
    width: 340px;
    height: 340px;
    border-radius: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), inset 0 2px 10px rgba(255,255,255,0.3);
    position: relative;
}

/* Screen on the left */
.device-screen {
    width: 220px;
    height: 220px;
    background-color: #050505;
    border-radius: 24px;
    padding: 12px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 8x8 LED Matrix */
.led-matrix {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 2px;
    width: 100%;
    height: 100%;
}

.led {
    width: 100%;
    height: 100%;
    background-color: #111; /* Off color */
    border-radius: 50%;
    box-shadow: inset 0 0 2px rgba(0,0,0,0.5);
    transition: background-color 0.05s;
}

/* Controls on the right */
.controls-area {
    width: 70px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.rotary-encoder-container {
    background: #222;
    border-radius: 35px;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5), 0 2px 5px rgba(255,255,255,0.2);
}

.encoder-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 20px;
    padding: 10px;
    transition: color 0.2s;
}

.encoder-btn:hover {
    color: #fff;
}

.encoder-main-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, #444, #222);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4), inset 0 2px 2px rgba(255,255,255,0.1);
    transition: transform 0.1s, box-shadow 0.1s;
}

.encoder-main-btn:active {
    transform: scale(0.95);
    box-shadow: 0 1px 3px rgba(0,0,0,0.4), inset 0 2px 5px rgba(0,0,0,0.5);
}

.controls-hint {
    font-size: 10px;
    color: rgba(0, 0, 0, 0.6);
    text-align: center;
    margin-top: 10px;
    font-weight: 600;
}
