:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --bg: #f3f4f6;
    --card-bg: #ffffff;
    --text: #1f2937;
    --danger: #ef4444;
    --success: #10b981;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: 40px;
}

header {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary);
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

h2 {
    margin-top: 0;
    font-size: 1.2rem;
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

label {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 4px;
}

input {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    margin-bottom: 12px;
}

input[readonly] {
    background-color: #e5e7eb;
    color: #4b5563;
    font-weight: bold;
    text-align: center;
}

.full-width {
    width: 100%;
}

.inputs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.inputs-grid input {
    margin-bottom: 0;
    text-align: center;
}

.presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.preset-btn {
    background: #fff;
    border: 1px solid #d1d5db;
    padding: 8px 4px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
}

.btn-primary:active {
    background: var(--primary-dark);
}

.drinks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drink-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
}

.drink-info div:first-child {
    font-weight: bold;
}

.drink-info div:last-child {
    font-size: 0.8rem;
    color: #6b7280;
}

.btn-delete {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 5px;
}

.stats-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.tab-btn {
    background: #e5e7eb;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    white-space: nowrap;
    cursor: pointer;
}

.tab-btn.active {
    background: var(--text);
    color: white;
}

.stats-result {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    text-align: center;
}

.stat-item {
    background: #f9fafb;
    padding: 10px 5px;
    border-radius: 8px;
}

.stat-item .label {
    display: block;
    font-size: 0.75rem;
    margin-bottom: 4px;
}

.stat-item .value {
    display: block;
    font-weight: bold;
    font-size: 1.1rem;
}

.value.danger { color: var(--danger); }
.value.success { color: var(--success); }