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

:root {
    --primary-red: #af2710;
    --light-red: #ef5350;
    --dark-red: #b71c1c;
    --bg-gray: #f5eede;
    --light-gray: #fafafa;
    --medium-gray: #e0e0e0;
    --text-dark: #333;
    --text-light: #666;
    --white: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--bg-gray) 0%, var(--light-gray) 100%);
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--light-red) 100%);
    color: var(--white);
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(211, 47, 47, 0.3);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 300;
}

main {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

section {
    margin-bottom: 35px;
}

section:last-child {
    margin-bottom: 0;
}

h2 {
    color: var(--primary-red);
    font-size: 1.4rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--medium-gray);
}

.header-with-reset {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.header-with-reset h2 {
    margin-bottom: 0;
    flex: 1;
}

.btn-reset {
    padding: 8px 16px;
    background: var(--white);
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-reset:hover {
    background: var(--primary-red);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(211, 47, 47, 0.2);
}

.btn-reset:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(211, 47, 47, 0.2);
}

h3 {
    color: var(--text-dark);
    font-size: 1.1rem;
    margin: 20px 0 10px;
}

.input-group {
    margin-bottom: 20px;
    position: relative;
}

.input-group.total {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--light-red) 100%);
    color: var(--white);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.2);
}

.input-group.total label {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 600;
}

.input-group.total input {
    background: var(--white);
    color: var(--primary-red);
    font-weight: 700;
    font-size: 1.5rem;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
}

input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    font-size: 1.1rem;
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    background: var(--light-gray);
    color: var(--text-dark);
    transition: all 0.3s ease;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-red);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

input[type="number"]:hover {
    border-color: var(--light-red);
}

.liter-display {
    display: block;
    margin-top: 5px;
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}

.recommendation {
    background: linear-gradient(135deg, #fff5f5 0%, #ffebee 100%);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-red);
}

.recommendation h2 {
    border-bottom: none;
    margin-bottom: 12px;
}

.recommendation ul {
    list-style: none;
    padding: 0;
}

.recommendation li {
    padding: 8px 0;
    color: var(--text-dark);
}

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

.info p {
    margin-bottom: 15px;
    color: var(--text-light);
}

.info ul {
    list-style: none;
    padding: 0;
}

.info li {
    padding: 6px 0 6px 25px;
    position: relative;
    color: var(--text-light);
}

.info li::before {
    content: "•";
    position: absolute;
    left: 8px;
    color: var(--primary-red);
    font-weight: bold;
    font-size: 1.2rem;
}

footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

footer p {
    margin: 10px 0;
}

.github-link a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.github-link a:hover {
    color: var(--light-red);
    border-bottom: 2px solid var(--light-red);
}

.github-link a:active {
    color: var(--dark-red);
}

/* Responsive Design */
@media (min-width: 768px) {
    .container {
        padding: 40px 20px;
    }

    header {
        padding: 40px 30px;
    }

    header h1 {
        font-size: 3rem;
    }

    main {
        padding: 35px;
    }

    h2 {
        font-size: 1.6rem;
    }
}

/* Animationen */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

input[type="number"]:focus {
    animation: pulse 0.5s ease;
}

/* Input Wrapper mit Buttons */
.input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.input-wrapper input[type="number"] {
    flex: 1;
}

/* Plus/Minus Buttons */
.btn-increase,
.btn-decrease {
    display: none; /* Standardmäßig versteckt */
    width: 45px;
    height: 45px;
    border: 2px solid var(--primary-red);
    background: var(--white);
    color: var(--primary-red);
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn-increase:hover,
.btn-decrease:hover {
    background: var(--primary-red);
    color: var(--white);
    transform: scale(1.05);
}

.btn-increase:active,
.btn-decrease:active {
    transform: scale(0.95);
    background: var(--dark-red);
    border-color: var(--dark-red);
}

/* Spezielle Styles für Total Input Buttons */
.input-group.total .btn-increase,
.input-group.total .btn-decrease {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.input-group.total .btn-increase:hover,
.input-group.total .btn-decrease:hover {
    background: var(--white);
    color: var(--primary-red);
}

.input-group.total .btn-increase:active,
.input-group.total .btn-decrease:active {
    background: rgba(255, 255, 255, 0.9);
}

/* Zeige Buttons auf mobilen Geräten */
@media (max-width: 767px) {
    .btn-increase,
    .btn-decrease {
        display: block;
    }

    /* Verstecke native number input Spinner auf mobilen Geräten */
    input[type="number"]::-webkit-inner-spin-button,
    input[type="number"]::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    input[type="number"] {
        -moz-appearance: textfield;
    }
}
