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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #FFCD00 0%, #FFCD00 33%, #003893 33%, #003893 66%, #CF142B 66%, #CF142B 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 500;
}

.card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #003893;
    font-size: 1.1rem;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #FFCD00;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus {
    border-color: #003893;
    box-shadow: 0 0 0 3px rgba(0, 56, 147, 0.1);
}

.btn-calcular {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #CF142B 0%, #003893 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 30px;
}

.btn-calcular:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(207, 20, 43, 0.4);
}

.btn-calcular:active {
    transform: translateY(0);
}

.resultados {
    border-top: 3px solid #FFCD00;
    padding-top: 25px;
}

.resultados h2 {
    color: #003893;
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
}

.resultado-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.resultado-item:hover {
    background: #e9ecef;
}

.resultado-item.total {
    background: linear-gradient(135deg, #FFCD00 0%, #FFE066 100%);
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 15px;
}

.resultado-item.dividido {
    background: linear-gradient(135deg, #003893 0%, #0052CC 100%);
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
}

.resultado-item .label {
    font-weight: 600;
}

.resultado-item .value {
    font-weight: bold;
    color: #CF142B;
}

.resultado-item.total .value,
.resultado-item.dividido .value {
    color: inherit;
}

footer {
    text-align: center;
    margin-top: 30px;
    color: white;
    font-size: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 500;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .card {
        padding: 25px;
    }

    .form-group label {
        font-size: 1rem;
    }

    .form-group input {
        padding: 12px;
    }

    .btn-calcular {
        padding: 15px;
        font-size: 1.1rem;
    }

    .resultados h2 {
        font-size: 1.3rem;
    }

    .resultado-item {
        padding: 12px;
        font-size: 0.95rem;
    }

    .resultado-item.total {
        font-size: 1.1rem;
    }

    .resultado-item.dividido {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.7rem;
    }

    .card {
        padding: 20px;
    }

    .resultado-item {
        flex-direction: column;
        gap: 5px;
    }

    .resultado-item .value {
        text-align: right;
    }
}
