:root {
    --kakao-yellow: #ffe812;
    --kakao-black: #191919;
    --kakao-gray: #f2f2f2;
    --card-radius: 24px;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

body, html {
    min-height: 100vh;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
    
    background: var(--kakao-yellow);
    font-family: 'Spoqa Han Sans Neo', 'sans-serif';
    display: flex;
    align-items: center;
    justify-content: center;
  }

.container {
    background: white;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
    padding: 32px 24px;
    min-width: 320px;
    max-width: 360px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.amount-error {
    border: 2px solid #ff3131 !important;
    background: #fff6f6 !important;
    border-radius: 10px;
    transition: border 0.2s, background 0.2s;
  }

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text {
    font-weight: 700;
    font-size: 2rem;
    color: var(--kakao-black);
    letter-spacing: -1px;
}

.desc {
    color: #ff2222;
    font-size: 1.26rem;
    text-align: center;
    margin-top: -12px;
}

.amount-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
}

.amount-label {
    font-size: 1rem;
    color: #333;
    font-weight: 700;
    margin-bottom: 3px;
}

.amount-input-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #eee;
    border-radius: 12px;
    padding: 7px 14px;
    background: #fafafa;
}

.amount-input {
    margin-top: 4px;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    flex: 1;
    outline: none;
    padding: 4px 0;
    text-align: center;
    color: #191919;

}

.amount-input:focus {
    background: transparent;
}

.amount-input::-webkit-outer-spin-button,
.amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.amount-input[type="number"] {
    -moz-appearance: textfield;
}

.amount-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 2px;
}

.amount-btn {
    min-width: 100px;
    background: var(--kakao-gray);
    border: none;
    border-radius: 10px;
    padding: 7px 18px;
    font-size: 1rem;
    font-weight: 500;
    color: #191919;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.amount-btn:hover,
.amount-btn:active {
    background: #ffe926;
    color: #000000;
}


.reset-btn {
    min-width: 100px;
    background: var(--kakao-gray);
    border: none;
    border-radius: 10px;
    padding: 7px 18px;
    font-size: 1rem;
    font-weight: 500;
    color: #191919;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.reset-btn:hover {
    background: #ff3131;
    color: #fff;
}

.pay-btn {
    width: 100%;
    background: var(--kakao-black);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 14px 0;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 6px;
}

.pay-btn:hover {
    background: #333;
}

.amount-btn:active {
    background: #ffe200;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10) inset;
    transform: translateY(2px) scale(0.97);
}

.reset-btn:active {
    background: #d81a1a;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10) inset;
    transform: translateY(2px) scale(0.97);
}

.pay-btn:active {
    background: #2d2d2d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.11) inset;
    transform: translateY(2px) scale(0.98);
}



.modal-bg {
    position: fixed;
    z-index: 1000;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.26);
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeInBg 0.3s;
  }
  @keyframes fadeInBg {
    from { background: rgba(0,0,0,0);}
    to { background: rgba(0,0,0,0.26);}
  }
  .modal-bg.show { display: flex; }
  
  .modal-window {
    
    position: relative;
    background: #fff;
    border-radius: 18px;
    padding: 32px 22px 22px 22px;
    min-width: 270px;
    max-width: 88vw;
    box-shadow: 0 12px 36px rgba(0,0,0,0.13);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: modalUp 0.28s cubic-bezier(.46,1.41,.54,1.02);
  }

  
.modal-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: #aaa;
    cursor: pointer;
    z-index: 2;
    width: 32px;
    height: 32px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
    outline: none;
  }
  .modal-close-btn:hover {
    background: #f0f0f0;
    color: #555;
  }
  .modal-close-btn:active {
    background: #e0e0e0;
    color: #222;
  }
  @keyframes modalUp {
    from { transform: translateY(50px) scale(0.93); opacity: 0; }
    to { transform: none; opacity: 1; }
  }
  .modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #191919;
    margin-bottom: 18px;
  }
  .modal-pin-box {
    display: flex;
    gap: 11px;
    margin-bottom: 16px;
  }
  .pin-input {
    width: 58px;
    height: 58px;
    font-size: 2.0rem;
    text-align: center;
    border: 1.5px solid #d1d1d1;
    border-radius: 10px;
    outline: none;
    background: #fafafa;
    transition: border 0.17s;
  }
  .pin-input:focus {
    border: 1.5px solid #ffe812;
    background: #fffde9;
  }
  .modal-btns {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 14px;
  }
  .modal-send-btn, .modal-cancel-btn {
    flex: 1;
    padding: 12px 0;
    font-size: 1.05rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    background: var(--kakao-yellow, #ffe812);
    color: #191919;
    transition: background 0.17s;
  }
  .modal-cancel-btn {
    background: #eee;
    color: #666;
  }
  .modal-msg {
    color: #ff3131;
    font-size: 0.93rem;
    height: 22px;
    margin-bottom: 5px;
    text-align: center;
    display:none;
  }


  .modal-owner-box {
    width: 100%;
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
  }
  .owner-input {
    width: 70%;
    max-width: 240px;
    font-size: 1.08rem;
    padding: 11px 13px;
    border: 1.3px solid #d1d1d1;
    border-radius: 8px;
    outline: none;
    background: #fafafa;
    text-align: center;
    transition: border 0.18s;
  }
  .owner-input:focus {
    border: 1.5px solid #ffe812;
    background: #fffde9;
  }

@media (max-width: 500px) {
    .container {
        min-width: unset;
        max-width: 80%;
        padding: 20px 8px;
    }

    .logo-text {
        font-size: 1.8rem;
    }

    .amount-btn,
    .reset-btn {
        flex: 1 1 22%;
        min-width: 90px;
        padding: 8px 0;
        font-size: 0.97rem;
    }
}