@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    font-family: 'Poppins', Arial, sans-serif;

    background:
        radial-gradient(circle at 10% 10%, #ff4f8b 0%, transparent 25%),
        radial-gradient(circle at 90% 15%, #e9003f 0%, transparent 25%),
        radial-gradient(circle at 80% 90%, #ff3d78 0%, transparent 25%),
        linear-gradient(135deg, #21000d, #4b001d, #180008);

    padding: 30px 15px;
}


/* CONTENEDOR PRINCIPAL */

.calculadora {
    width: 390px;
    max-width: 100%;

    padding: 32px;

    background: rgba(10, 5, 8, 0.88);

    border: 2px solid #ff315f;
    border-radius: 30px;

    box-shadow:
        0 0 20px rgba(255, 49, 95, 0.5),
        0 20px 60px rgba(0, 0, 0, 0.6);

    backdrop-filter: blur(15px);
}


/* TITULO */

h1 {
    margin: 0 0 25px;

    text-align: center;

    font-size: 2.4rem;
    font-weight: 800;

    color: #ffffff;

    text-shadow:
        0 0 10px rgba(255, 60, 120, 0.7);
}

h1::first-letter {
    color: #ff3f78;
}


/* PANTALLA */

#pantalla {
    width: 100%;
    height: 100px;

    margin-bottom: 25px;

    padding: 15px 20px;

    border: 2px solid #ff3970;
    border-radius: 22px;

    outline: none;

    background:
        linear-gradient(
            135deg,
            rgba(255, 75, 130, 0.18),
            rgba(20, 5, 12, 0.95)
        );

    color: #ffffff;

    font-family: 'Poppins', Arial, sans-serif;

    font-size: 2.5rem;
    font-weight: 700;

    text-align: right;

    box-shadow:
        inset 0 0 25px rgba(255, 40, 100, 0.15),
        0 0 12px rgba(255, 40, 100, 0.35);
}


/* BOTONES */

.botones {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 12px;
}


/* TODOS LOS BOTONES */

button {
    height: 70px;

    border: 1px solid rgba(255, 255, 255, 0.15);

    border-radius: 20px;

    background:
        linear-gradient(
            145deg,
            #30252d,
            #171217
        );

    color: #ffffff;

    font-family: 'Poppins', Arial, sans-serif;

    font-size: 1.35rem;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 6px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.08);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}


/* EFECTO AL PASAR EL MOUSE */

button:hover {
    transform: translateY(-4px);

    box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.45),
        0 0 15px rgba(255, 55, 110, 0.35);
}


/* EFECTO AL PRESIONAR */

button:active {
    transform: scale(0.94);
}


/* OPERADORES ROSADOS */

.operador {
    background:
        linear-gradient(
            145deg,
            #ff70a0,
            #ec2470
        );

    color: white;

    border: 1px solid #ff8db3;

    box-shadow:
        0 6px 15px rgba(255, 35, 105, 0.35);
}

.operador:hover {
    background:
        linear-gradient(
            145deg,
            #ff8ab2,
            #ff2f79
        );

    box-shadow:
        0 0 20px rgba(255, 60, 120, 0.6);
}


/* BOTON C */

#borrar {
    background:
        linear-gradient(
            145deg,
            #ff6d98,
            #e91e5b
        );

    color: white;

    border: 1px solid #ff8aaa;
}


/* BOTON IGUAL */

#igual {
    background:
        linear-gradient(
            145deg,
            #ff78a5,
            #ff174f
        );

    color: white;

    border: 1px solid #ff9ab8;

    box-shadow:
        0 8px 20px rgba(255, 25, 75, 0.45);
}

#igual:hover {
    background:
        linear-gradient(
            145deg,
            #ff94b7,
            #ff245b
        );

    box-shadow:
        0 0 25px rgba(255, 50, 100, 0.7);
}


/* ESTILO ESPECÍFICO PARA EL BOTÓN PORCENTAJE (%) */
#porcentaje {
    background:
        linear-gradient(
            145deg,
            #ff70a0,
            #ec2470
        );
    color: white;
    border: 1px solid #ff8db3;
    box-shadow: 0 6px 15px rgba(255, 35, 105, 0.35);
}

#porcentaje:hover {
    background:
        linear-gradient(
            145deg,
            #ff8ab2,
            #ff2f79
        );
    box-shadow: 0 0 20px rgba(255, 60, 120, 0.6);
}


/* BOTON VOLVER */

.volver {
    display: block;

    width: fit-content;

    margin: 25px auto 0;

    padding: 12px 25px;

    border: 2px solid #ff2860;

    border-radius: 30px;

    color: #ff91b4;

    background: rgba(255, 35, 90, 0.05);

    text-decoration: none;

    font-size: 0.95rem;
    font-weight: 600;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.volver:hover {
    color: white;

    background: linear-gradient(
        135deg,
        #ff3972,
        #e90043
    );

    box-shadow:
        0 0 18px rgba(255, 45, 100, 0.55);

    transform: translateY(-2px);
}


/* RESPONSIVE PARA CELULARES */

@media (max-width: 450px) {

    .calculadora {
        padding: 22px;

        border-radius: 25px;
    }

    h1 {
        font-size: 2rem;
    }

    #pantalla {
        height: 85px;
        font-size: 2rem;
    }

    button {
        height: 60px;

        font-size: 1.15rem;

        border-radius: 16px;
    }

    .botones {
        gap: 8px;
    }
}