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

:root {
    --navy: #1a2e4a;
    --blue: #3b82f6;
    --blue-light: #60a5fa;
    --slate: #1e293b;
    --slate-mid: #94a3b8;
    --slate-light: #e2e8f0;
    --white: #ffffff;
    --green: #16a34a;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f0f4f8;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* - Card - */

.calculator {
    background-color: var(--white);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 8px 40px rgba(0, 0, 9, 0.1);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

h1 {
    font-size: 1.4rem;
    color: var(--navy);
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* - Inputs - */

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--slate-mid);
}

input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1.1rem;
    border: 2px solid var(--slate-light);
    border-radius: 8px;
    color: var(--slate);
    outline: none;
    transition: border-color 0.2s ease;
}

input:focus {
    border-color: var(--blue);
}

/* - Tip Buttons - */

.tip-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.tip-btn {
    padding: 12px 8px;
    font-size: 0.95rem;
    font-weight: 600;
    background-color: var(--slate-light);
    color: var(--slate);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tip-btn:hover {
    background-color: var(--blue);
    color: var(--white);
}

.tip-btn.active {
    background-color: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

/* - Results - */

.results {
    background-color: var(--navy);
    border-radius: 12px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-row span:first-child {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--slate-mid);
}

.result-row span:last-child {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
}

.result-row.highlight span:last-child {
    font-size: 1.8rem;
    color: #4ade80;
}

/* - Reset Buton - */

#reset-btn {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    font-weight: 700;
    background-color: var(--blue);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background-color 0.2s ease;
}

#reset-btn:hover {
    background-color: var(--blue-light);
}

/* - Split Section - */

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--slate);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--blue);
    cursor: pointer;
}

.split-section {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.35s ease;
}

.split-section.open {
    max-height: 120px;
    opacity: 1;
}

#per-person-row {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.35s ease;
}

#per-person-row.open {
    max-height: 60px;
    opacity: 1;
}