body {
    background-image: linear-gradient(to bottom, #777, #000);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: Arial, sans-serif;
}

.atm {
    background-color: #bfc3c8;
    width: 90vw;
    max-width: 400px;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0px 4px 15px rgba(0,0,0,0.3);
    position: relative;
}

.atm-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.atm-header img {
    height: 50px;
    width: auto;
}

.atm-screen {
    background-color: white;
    color: black;
    font-family: monospace;
    height: 260px;
    max-width: 100%;
    border: 20px solid #333;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    margin-bottom: 10px;
    font-size: 12px;
    text-align: center;
    box-sizing: border-box;
    border-radius: 4px;
}

.slot-container {
    display: flex;
    padding: 15px 0;
}

.atm-information {
    margin: 4px;
    margin-right: 20px;
    word-wrap: break-word;
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 2;
}

.atm-screen:has(.illustration.hidden) .atm-information {
    grid-column: 1 / span 2;
    margin-right: 4px;
}

.illustration.show {
    grid-column: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 4px;
}

.illustration.show img {
    object-fit: contain;
    max-height: 140px;
    width: auto;
}

.illustration.hidden {
    display: none;
}

.atm-menu {
    grid-column: 1 / span 2;
    padding: 5px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.menu-line {
    display: flex;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    padding: 5px 0;
}

.menu-line span {
    color: black;
    display: flex;
    align-items: flex-end;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.card-slot {
    flex: 1;
    background-color: #222;
    height: 15px;
    border: 2px solid #666;
    border-radius: 8px;
    margin-top: 10px;
    position: relative;
    cursor: pointer;
}

.card-slot:has(> img.inserted),
.card-slot:has(> img.eject) {
    overflow: hidden;
}

.card {
    width: 100%;
    height: auto;
    margin: 0 auto;
    transition: transform 0.6s ease;
    transform: perspective(200px) rotateX(30deg);
    position: relative;
    z-index: 10;
}

.card.inserted { 
    transform: translateY(-150px); 
}

.card.eject {
    transform: translateY(-125px); 
}

.card.taken { 
    transform: translateY(30px); 
    transform: perspective(200px) rotateX(30deg);
}

.money-slot {
    background-color: #555;
    height: 60px;
    border-radius: 4px;
    border: 2px solid #888;
    padding: 8px;
    margin-left: 10px;
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-right: 20px;
    transform: perspective(250px) rotateX(30deg);
}

.money {
    width: 80%;
    margin-top: -200px;
    transition: margin-top 0.6s ease, transform 0.6s ease;
    transform: perspective(400px) rotateX(30deg);
    cursor: pointer;
}

.money.show { 
    margin-top: 0; 
}

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

.keypad button {
    height: 50px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 4px;
    border: none;
    background-color: #ddd;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.keypad button:active {
    background-color: #666;
}

.keypad .cancel,
.keypad .correction,
.keypad .confirm { 
    font-size: 14px;
    position: relative;
}

.keypad .cancel::after,
.keypad .confirm::after,
.keypad .correction::after { 
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 4px; /* Atur posisi garis */
    width: 80%;
    height: 6px; /* Ketebalan garis */
    border-radius: 2px; /* Efek lengkungan */
}

.keypad .correction::after {
    background-color: #f3c623; /* Warna garis */
}

.keypad .confirm::after { 
    background-color: #4CAF50; 
}

.keypad .cancel::after {
    background-color: #d9534f; 
}


.money-stack-container {
    position: relative;
    margin: 0 auto;
    cursor: pointer;
    display: flex;
    justify-content: center;
    padding: 10px;
}

.money.stack {
    position: absolute;
    left: calc(var(--stack-offset) * 2px);
    top: calc(var(--stack-offset) * -3px);
    width: 200px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    border-radius: 4px;
    opacity: 0;
}

.money.stack.show {
    opacity: 1;
}

.stack-more {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #222;
    font-weight: bold;
    text-shadow: 1px 1px 0 white;
    user-select: none;
}
