:root {
    --bg: #000000;
    --card: #1c1c1e;
    --accent: #0a84ff;
    --text: #ffffff;
    --secondary-text: #8e8e93;
}

body {
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
}

.iphone {
    width: 390px;
    height: 844px;
    background: var(--bg);
    border-radius: 50px;
    position: relative;
    border: 10px solid #333;
    overflow: hidden;
    color: var(--text);
}

.status-bar {
    padding: 15px 35px;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
}

.dynamic-island {
    width: 120px;
    height: 35px;
    background: black;
    border-radius: 20px;
}

.category-pill {
    background: var(--card);
    color: var(--accent);
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 16px;
    margin: 20px auto;
    display: block;
    appearance: none;
    text-align: center;
}

.display-area {
    padding: 20px;
    height: 250px;
}

.unit-row {
    padding: 20px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.unit-row.active {
    background: rgba(255,255,255,0.05);
}

.unit-label {
    background: none;
    border: none;
    color: var(--secondary-text);
    font-size: 18px;
    display: block;
}

.value-display {
    font-size: 48px;
    font-weight: 200;
    margin-top: 5px;
    overflow-x: auto;
}

.result { color: var(--accent); }

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 20px;
    background: var(--card);
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    height: 400px;
}

.key {
    background: #3a3a3c;
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 24px;
    font-weight: 500;
    transition: opacity 0.1s;
}

.key:active { opacity: 0.5; }
.key.action { background: #636366; }

.home-bar {
    width: 140px;
    height: 5px;
    background: white;
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 10px;
}
