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

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    min-height: 100vh;
    background-image: url('./img/merlina2.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
}

.calculadora-contenedor {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 320px;
    width: 100%;
}

.calculadora-titulo {
    text-align: center;
    color: #ff6b6b;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
    font-weight: bold;
    letter-spacing: 1px;
}

.display {
    background: linear-gradient(135deg, #0f1419, #1a252f);
    border: 2px solid #333;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.3);
    padding: 10px;
}

#pantalla {
    background-color: transparent;
    border: none;
    color: #00ff88;
    font-size: 2rem;
    text-align: right;
    width: 100%;
    outLine: none;
    font-weight: 600;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    min-height: 40px;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.btn {
    border: none;
    border-radius: 12px;
    height: 60px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-number {
    background: linear-gradient(135deg, #4a5568, #2d3748);
    color: white;
    border: 1px solid #4a5568;
}

.btn-operator {
    background: linear-gradient(135deg, #ff6b6b, #e53e3e);
    color: white;
    border: 1px solid #ff6b6b;
}

.btn-equals {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    border: 1px solid #48bb78;
    grid-row: span 2;
}

.btn-clear {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
    border: 1px solid #ed8936;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

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

.audio-control {
    text-align: center;
    margin-top: 20px;
}

.wednesday-btn {
    background: linear-gradient(135deg, #6a0dad, #4b0082);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(106, 13, 173, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wednesday-btn:hover {
    background: linear-gradient(135deg, #8a2be2, #6a0dad);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(106, 13, 173, 0.6);
}

.error {
    color: #ff6b6b;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translate(0);
    }

    25% {
        transform: translateX(-5px);

    }

    75% {
        transform: translateX(5px);
    }
}

@media(prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.1s;
        animation-iteration-count: 1;
        transition-duration: 0.15s;
    }
}

@media screen and (min-width: 768px) {

    .calculadora-contenedor {
        max-width: 400px;
        padding: 30px;
    }

    .calculadora-titulo {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }

    #pantalla {
        font-size: 2.5rem;
        min-height: 50px;
    }

    .btn {
        height: 70px;
        font-size: 1.4rem;
    }

    .button-grid {
        gap: 15px;
        margin-bottom: 25px;
    }
}

@media screen and (min-width: 1024px) {

    .calculadora-contenedor {
        max-width: 450px;
        padding: 40px;
    }

    .calculadora-titulo {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    #pantalla {
        font-size: 3rem;
        min-height: 60px;
    }

    .btn {
        height: 80px;
        font-size: 1.6rem;

    }

    .button-grid {
        gap: 18px;
        margin-bottom: 30px;
    }

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

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .calculadora-contenedor {
        animation: fadeIn 0.6s ease-in-out;
    }

    .btn:focus {
        outline: 2px solid #00ff88;
        outline-offset: 2px;
    }

    body {
        background-image: url('./img/merlina.jpg');
        background-position: right center;
        background-attachment: fixed;
        align-items: center;
        padding-right: 100px;
    }
}