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

body {
    background-color: #1a1a2e;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

h1 {
    color: #e94560;
    font-size: 24px;
}

.calculatrice {
    background-color: #16213e;
    border-radius: 16px;
    padding: 24px;
    width: 340px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

#expression {
    color: #a8a8b3;
    font-size: 14px;
    text-align: right;
    min-height: 20px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#affichage {
    background-color: #0f3460;
    color: #ffffff;
    font-size: 36px;
    text-align: right;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
    word-break: break-all;
}

.boutons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

button {
    border: none;
    border-radius: 8px;
    padding: 16px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.1s;
}

button:hover {
    opacity: 0.8;
}

button:active {
    opacity: 0.6;
    transform: scale(0.96);
}

.btn-chiffre {
    background-color: #0f3460;
    color: #ffffff;
}

.btn-operateur {
    background-color: #e94560;
    color: #ffffff;
}

.btn-scientifique {
    background-color: #533483;
    color: #ffffff;
    font-size: 14px;
}

.btn-special {
    background-color: #444;
    color: #ffffff;
}

.btn-egal {
    background-color: #2ecc71;
    color: #ffffff;
}