:root {
    --background: #11131A;
    --text: #ffffff;
    --menu: #1a1a1a;
    --border: #444444;
    --accent: #3b82f6;
}

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

body {
    background: var(--background);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;
}

main {
    padding: 40px 20px 110px;
}

h1 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 25px;
}

.balance-box {
    width: 100%;
    padding: 25px;
    border: 2px solid var(--border);
    border-radius: 18px;
    background: #111111;
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
}

.balance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-value {
    font-size: 2rem;
    font-weight: bold;
}

.balance-toggle {
    background: transparent;
    border: none;

    color: white;

    font-size: 1.2rem;

    cursor: pointer;
}

.booking-list {
    display: none;

    margin-top: 12px;

    background: #111111;

    border: 1px solid #333;
    border-radius: 18px;

    overflow: hidden;
}

.booking-list.open {
    display: block;
}

.booking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px 18px;

    border-bottom: 1px solid #222;
}

.booking-item:last-child {
    border-bottom: none;
}

.booking-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.booking-name {
    color: white;
    font-size: 0.95rem;
}

.booking-time {
    color: #888888;
    font-size: 0.75rem;
}

.booking-amount {
    font-weight: 600;
    white-space: nowrap;
}

.booking-positive {
    color: #22c55e;
}

.booking-negative {
    color: #ef4444;
}

.view {
    display: none;
}

.active-view {
    display: block;
}

.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 90px;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    background: var(--menu);
    border-top: 1px solid #333;
    box-shadow: 0 -4px 15px rgba(255,255,255,0.05);
}

.nav-btn {
    background: transparent;
    border: none;
    color: #8a8a8a;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 0.75rem;
}

.nav-btn .icon {
    font-size: 1.3rem;
}

.nav-btn.active {
    color: #ffffff;
}

.nav-btn.active .icon {
    color: var(--accent);
}

.nav-btn.active::after {
    content: "";
    width: 24px;
    height: 3px;
    margin-top: 4px;
    background: var(--accent);
    border-radius: 10px;
}

.pay-btn .icon {
    font-size: 2.2rem;
}

.pay-btn.active .icon {
    color: #22c55e;
}

@media (min-width: 768px) {

    main {
        max-width: 700px;
        margin: 0 auto;
    }

    .balance-box {
        font-size: 2.5rem;
    }
}

@media (min-width: 1200px) {

    main {
        max-width: 900px;
    }

    .balance-box {
        font-size: 3rem;
    }
}

.primary-btn {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 16px;
    background: #2563eb;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.secondary-btn {
    width: 100%;
    margin-top: 15px;
    padding: 14px;
    border: none;
    border-radius: 16px;
    background: #333333;
    color: white;
    cursor: pointer;
}

#scannerContainer {
    margin-top: 20px;
}

#qrVideo {
    width: 100%;
    border-radius: 18px;
    background: #111111;
}

.topup-hint {
    width: 100%;
    margin-top: 25px;
}

.payment-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-item {
    width: 100%;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 16px;

    padding: 18px;

    background: #111111;
    color: white;

    border: 1px solid #333;
    border-radius: 14px;

    text-align: left;
    cursor: pointer;
}

.payment-name {
    flex: 1;
    min-width: 0;

    text-align: left;
    line-height: 1.4;
}

.payment-price {
    flex-shrink: 0;

    white-space: nowrap;

    font-weight: 600;
    text-align: right;
}

.payment-item:hover {
    background: #191919;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.show {
    display: flex;
}

.modal-content {
    width: 90%;
    max-width: 400px;
    padding: 25px;
    background: #111111;;
    border-radius: 18px;
    text-align: center;
}

.modal-content h2 {
    margin-bottom: 15px;
}

.modal-content p {
    margin-bottom: 25px;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 110px;

    transform: translateX(-50%);

    padding: 14px 22px;

    background: #15803d;
    color: white;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    z-index: 2000;
    transition: opacity 0.3s ease;
}

.toast.show {
    opacity: 1;
    visibility: visible;
}

.error-modal {
    border: 2px solid #dc2626;
    background: #2b0a0a;
}

.error-modal h2 {
    color: #ef4444;
    margin-bottom: 15px;
}

.error-modal p {
    color: #ffffff;
    margin-bottom: 20px;
}

.error-btn {
    width: 100%;

    padding: 14px;

    border: none;
    border-radius: 14px;

    background: #dc2626;
    color: white;

    font-size: 1rem;
    font-weight: 600;

    cursor: pointer;
}

.error-btn:hover {
    background: #b91c1c;
}