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

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #2a2a2a;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    color: #e8e8e8;
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 4px;
}

header p {
    color: #888;
    font-size: 0.9rem;
    font-weight: 400;
}

.calculator {
    background: #1a1a1a;
    border-radius: 30px;
    padding: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.display {
    background: #b8e6c4;
    border-radius: 15px;
    padding: 15px 10px;
    width: 60px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.display span {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 1.8rem;
    font-weight: 400;
    color: #1a1a1a;
    white-space: nowrap;
    max-height: 250px;
    overflow: hidden;
}

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

.btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.1s, filter 0.1s;
}

.btn:hover {
    filter: brightness(0.95);
}

.btn:active {
    transform: scale(0.95);
}

.btn.number {
    background: #e8e8e8;
    color: #1a1a1a;
}

.btn.function {
    background: #a8d4f0;
    color: #1a1a1a;
}

.btn.operator {
    background: #f5d87a;
    color: #1a1a1a;
}

.btn.wide {
    grid-column: span 2;
    width: 100%;
}
