:root {
    --bg: #1a1a2e;
    --surface: #16213e;
    --primary: #e94560;
    --text: #eee;
    --text-muted: #aaa;
    --border: #333;
    --radius: 8px;
    --spacing: 1rem;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding: var(--spacing);
}

header h1 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.tabs {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    padding-bottom: 0.25rem;
}

.tab {
    flex: 1;
    min-width: 70px;
    padding: 0.75rem 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: var(--radius) var(--radius) 0 0;
    cursor: pointer;
    font-size: 0.85rem;
    text-align: center;
    transition: all 0.2s;
}

.tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.tool-panel {
    display: none;
}

.tool-panel.active {
    display: block;
}

.input-group {
    margin-bottom: 0.75rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius);
    font-size: 1rem;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.btn {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.9rem;
}

.btn:hover { opacity: 0.9; }

.results {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.results p {
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.results strong {
    color: var(--primary);
}

.recipe-inputs {
    margin-bottom: 0.5rem;
}

.recipe-input-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.recipe-input-row input {
    flex: 1;
}

.timer-list {
    margin-bottom: 1rem;
}

.timer-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.timer-item .timer-name {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.timer-item .timer-time {
    font-size: 1.5rem;
    font-variant-numeric: tabular-nums;
}

.timer-item .timer-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.timer-item.finished {
    border-color: var(--primary);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.converter-type-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.converter-tab {
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
}

.converter-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

@media (min-width: 600px) {
    body { max-width: 600px; margin: 0 auto; }
    .recipe-input-row { flex-wrap: nowrap; }
}
