*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body{
    background-color: #121212;
    color: white;
    min-height: 100vh;

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

    padding: 20px;
}

.container{
    width: 100%;
    max-width: 500px;

    background-color: #1e1e1e;
    padding: 25px;
    border-radius: 20px;

    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

h1,
h2{
    text-align: center;
    margin-bottom: 20px;
}

.calculator{
    margin-bottom: 30px;
}

#display{
    width: 100%;
    height: 70px;

    border: none;
    outline: none;

    border-radius: 12px;

    background-color: #2d2d2d;
    color: white;

    font-size: 2rem;
    text-align: right;

    padding: 15px;
    margin-bottom: 15px;
}

.buttons{
    display: grid;

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

    gap: 10px;
}

.buttons button{
    height: 60px;

    border: none;
    border-radius: 12px;

    background-color: #333;
    color: white;

    font-size: 1.2rem;
    cursor: pointer;

    transition: 0.3s;
}
/* AC */
.buttons button:nth-child(1){
    background-color: #e74c3c;
}

/* DEL */
.buttons button:nth-child(2){
    background-color: #f39c12;
}

/* العمليات */
.buttons button:nth-child(4),
.buttons button:nth-child(8),
.buttons button:nth-child(12),
.buttons button:nth-child(16),
.buttons button:nth-child(20){
    background-color: #3498db;
}

/* = */
.buttons button:nth-child(19){
    background-color: #2ecc71;
}

.buttons button:hover{
    background-color: #555;
}

.converter{
    border-top: 1px solid #444;
    padding-top: 20px;
}

.converter input,
.converter select{
    width: 100%;

    padding: 12px;
    margin-bottom: 12px;

    border: none;
    outline: none;

    border-radius: 10px;

    background-color: #2d2d2d;
    color: white;
}

#convertBtn{
    width: 100%;

    padding: 12px;

    border: none;
    border-radius: 10px;

    background-color: #00b894;
    color: white;

    font-size: 1rem;
    cursor: pointer;

    transition: 0.3s;
}

#convertBtn:hover{
    background-color: #00a383;
}

#result{
    text-align: center;
    margin-top: 15px;

    font-size: 1.2rem;
    font-weight: bold;
}

/* Responsive */

@media (max-width: 600px){

    .container{
        padding: 15px;
    }

    #display{
        font-size: 1.5rem;
        height: 60px;
    }

    .buttons button{
        height: 50px;
        font-size: 1rem;
    }

}