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

a {
    text-decoration: none;
}

body {
    background: #010101;
}

main {
    padding: 64px 64px 192px;
    display: flex;
    gap: 16px;
    flex-direction: column;
}

.single-screen {
    padding: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100dvh;
}

form {
    width: 100%;
}

h1 {
    font-size: 32px;
    margin: 16px 0;
}

.amount {
    opacity: 0.5;
}

.amount.amount--active {
    opacity: 1;
}

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    gap: 16px;
    width: min(100dvw - 128px, 3 * ((100dvh - 128px) / 6));
    height: min(100dvh - 128px, 6 * ((100dvw - 128px) / 3));
}

.keypad.keypad--4 {
    grid-template-columns: repeat(4, 1fr);
    width: min(100dvw - 128px, 4 * ((100dvh - 128px) / 9));
    height: min(100dvh - 128px, 9 * ((100dvw - 128px) / 4));
}

.keypad__element {
    aspect-ratio: 1 / 1;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333333;
    font-size: 32px;
    user-select: none;

    overflow: hidden;
    position: relative;
    transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.1s ease;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

.keypad__element:active,
.button:active {
    transform: scale(0.95);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 600ms linear;
    background-color: rgba(255, 255, 255, 0.5);
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.keypad__element.keypad__element--primary {
    background: #fd9500;
}

.keypad__element.keypad__element--secondary {
    background: #a5a5a5;
    color: #333333;
}

.keypad__element.keypad__element--disabled {
    opacity: 0.5;
}

.keypad__element.keypad__element--display {
    aspect-ratio: auto;
    background: transparent;
    grid-column: span 3;
    justify-content: end;
}

.keypad__element.keypad__element--enter {
    aspect-ratio: auto;
    background: #fd9500;
    grid-column: span 3;
}

.keypad__element.keypad__element--empty {
    background: transparent;
}

.card {
    background: #1e1e1e;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.card .card__title {
    font-size: 24px;
    font-weight: bold;
}

.transactions {
    list-style: none;
    width: 100%;
}

.transaction {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    font-size: 12px;
    text-decoration: none;
}

.transaction__right,
.transaction__left {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.transaction__icon {
    font-size: 16px;
}

.transaction__time {
    opacity: 0.5;
}

.transaction__currency {
    font-weight: bold;
    opacity: 0.5;
}

.transaction__edit {
    display: flex;
}

.transaction__edit svg {
    width: 16px;
    fill: #fff;
}

input, button {
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
    width: 100%;
    border: 0;
    font-size: 16px;
    display: block;
}

input {
    color: #333;
}

button {
    background: #4f8914;
}

.danger {
    color: #b91c1c;
    border: 1px solid #b91c1c;
    background: transparent;
}

.date {
    font-size: 12px;
    font-weight: bold;
    width: 100%;
    display: flex;
    justify-content: space-between;
}

hr {
    width: 100%;
    opacity: 0.1;
    height: 1px;
    display: block;
    border: 0;
    background: white;
}

footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 64px;
}

nav {
    display: flex;
    justify-content: center;
}

.button {
    aspect-ratio: 1 / 1;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333333;
    font-size: 32px;
    width: 64px;
    border: 0;
    user-select: none;
    overflow: hidden;
    position: relative;
    transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.1s ease;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

.button--purple {
    background: #522790;
    font-size: 16px;
}

.loader {
    width: 1.25rem;
    height: 1.25rem;
    border: 3px solid rgba(255, 255, 255, 0);
    border-top-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: turbo-spin 0.6s linear infinite;
}

/* Animation */
@keyframes turbo-spin {
    to {
        transform: rotate(360deg);
    }
}

.transaction-edit-header {
    width: 100%;
    display: flex;
    justify-content: center;
}
