@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    background-color: #080808;
}

body {
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 24px 0 120px 0;
}

.bg-blur-yellow {
    position: absolute;
    width: 90vw;
    height: 90vw;
    max-width: 500px;
    max-height: 500px;
    background: #ffcc00;
    border-radius: 50%;
    filter: blur(130px);
    opacity: 0.14;
    top: -5%;
    left: -15%;
    z-index: 1;
    animation: floatYellow 9s infinite alternate ease-in-out;
    pointer-events: none;
}

.bg-blur-white {
    position: absolute;
    width: 85vw;
    height: 85vw;
    max-width: 450px;
    max-height: 450px;
    background: #ffffff;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.07;
    bottom: -5%;
    right: -15%;
    z-index: 1;
    animation: floatWhite 11s infinite alternate ease-in-out;
    pointer-events: none;
}

@keyframes floatYellow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 40px) scale(1.08); }
}

@keyframes floatWhite {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-40px, -50px) scale(1.12); }
}

.container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 460px;
    padding: 0 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glass-card {
    display: none;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    padding: 50px 32px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 
                inset 0 1px 2px rgba(255, 255, 255, 0.15);
    text-align: center;
    width: 100%;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

.glass-card.active-card {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.96); }
}

.title {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 40px;
    text-transform: uppercase;
    color: #ffffff;
    width: 100%;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    display: block;
}

.title span {
    color: #ffcc00;
    text-shadow: 0 0 25px rgba(255, 204, 0, 0.35);
}

.badge-container {
    display: flex;
    justify-content: center;
    margin-top: -25px;
    margin-bottom: 30px;
}

.promo-badge {
    display: inline-block;
    max-width: 100%;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.5px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.promo-badge span {
    color: #ffcc00;
    text-transform: uppercase;
}

.confirm-box {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 35px;
    text-align: center;
    max-width: 100%;
    overflow-wrap: break-word;
}

.confirm-text {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    line-height: 1.6;
    overflow-wrap: break-word;
    word-break: break-word;
}

.confirm-text .highlight {
    color: #ffcc00;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(255, 204, 0, 0.2);
    text-transform: uppercase;
    overflow-wrap: break-word;
    word-break: break-word;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

input[type="text"] {
    width: 100%;
    padding: 20px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    outline: none;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
    letter-spacing: 0;
}

input[type="text"]:focus {
    border-color: #ffcc00;
    background: rgba(0, 0, 0, 0.55);
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.2),
                inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.input-error {
    border-color: #ff4d4d !important;
    box-shadow: 0 0 20px rgba(255, 77, 77, 0.25),
                inset 0 1px 1px rgba(255, 255, 255, 0.05) !important;
}

.error-text {
    font-size: 0.8rem;
    color: #ff4d4d;
    font-weight: 600;
    margin-top: -8px;
    text-align: center;
    display: none;
}

.error-text.visible {
    display: block;
}

button {
    width: 100%;
    padding: 20px;
    background: rgba(255, 204, 0, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 204, 0, 0.3);
    border-radius: 16px;
    color: #ffcc00;
    font-size: 1.1rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2),
                inset 0 1px 2px rgba(255, 204, 0, 0.2);
}

button:hover {
    background: rgba(255, 204, 0, 0.2);
    border-color: #ffcc00;
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(255, 204, 0, 0.3),
                inset 0 1px 2px rgba(255, 204, 0, 0.4);
}

button:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(255, 255, 255, 0.05);
}

.hint-container {
    margin-top: 32px;
    text-align: left;
}

.hint-trigger {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.hint-trigger:hover {
    color: #ffcc00;
}

#tut-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

#tut-arrow.rotated {
    transform: rotate(180deg);
}

.tutorial-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tutorial-wrapper.open {
    grid-template-rows: 1fr;
}

.tutorial-content {
    overflow: hidden;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    margin-top: 16px;
    padding: 0 16px;
    transition: padding 0.4s ease;
}

.tutorial-wrapper.open .tutorial-content {
    padding: 20px 16px;
}

.tut-intro {
    font-size: 0.9rem;
    color: #ffffff;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 14px;
    border-left: 3px solid #ffcc00;
    padding-left: 8px;
}

.tut-list {
    list-style: none;
    counter-reset: tut-counter;
}

.tut-list li {
    counter-increment: tut-counter;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin-bottom: 12px;
    position: relative;
    padding-left: 28px;
}

.tut-list li::before {
    content: counter(tut-counter) ".";
    position: absolute;
    left: 0;
    top: 0;
    color: #ffcc00;
    font-weight: 900;
    font-size: 0.9rem;
}

.tut-list li:last-child {
    margin-bottom: 0;
}

.orders-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.orders-icon-box {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.2);
}

.orders-icon-box svg {
    width: 36px;
    height: 36px;
}

.orders-empty-text {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 8px;
}

.order-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 14px;
    text-align: left;
}

.order-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.order-promo {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffcc00;
    letter-spacing: 0.5px;
    word-break: break-all;
}

.order-status {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    white-space: nowrap;
    margin-left: 8px;
}

.order-status.run {
    background: rgba(255, 204, 0, 0.12);
    color: #ffcc00;
}

.order-status.done {
    background: rgba(61, 220, 132, 0.12);
    color: #3ddc84;
}

.order-status.cancel {
    background: rgba(255, 77, 77, 0.12);
    color: #ff6b6b;
}

.order-id {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 600;
    margin-bottom: 10px;
    word-break: break-all;
}

.order-amount {
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 14px;
}

.order-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.order-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffcc00, #ffe066);
    border-radius: 6px;
    transition: width 0.6s ease;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
}

.order-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

.loading-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.loading-circle-box {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-circle-box svg {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

.loading-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 6;
}

.loading-circle-progress {
    fill: none;
    stroke: #ffcc00;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 326.7;
    stroke-dashoffset: 326.7;
    filter: drop-shadow(0 0 8px rgba(255, 204, 0, 0.5));
    transition: stroke-dashoffset 0.1s linear;
}

.loading-seconds {
    position: absolute;
    font-size: 2rem;
    font-weight: 900;
    color: #ffcc00;
}

.loading-text {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 600;
    text-align: center;
    line-height: 1.5;
}

.loading-subtext {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
    text-align: center;
}

.bottom-navigation {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 420px;
    background: rgba(15, 15, 15, 0.4);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    display: flex;
    padding: 6px;
    z-index: 100;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7),
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    gap: 6px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 18px;
    text-align: center;
}

.nav-icon-wrapper {
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.nav-tab svg {
    width: 22px;
    height: 22px;
    transition: stroke 0.3s ease;
}

.nav-tab span {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.nav-tab.active {
    color: #ffcc00;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.nav-tab.active .nav-icon-wrapper {
    transform: translateY(-2px);
}

.nav-tab:not(.active):hover {
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 480px) {
    body {
        padding-bottom: 110px;
    }

    .glass-card {
        padding: 40px 20px;
        border-radius: 24px;
    }

    .title {
        font-size: 2.2rem;
        margin-bottom: 30px;
    }

    .confirm-box {
        padding: 18px;
        margin-bottom: 25px;
    }

    .confirm-text {
        font-size: 0.95rem;
    }

    input[type="text"], button {
        padding: 18px;
        font-size: 1rem;
        border-radius: 14px;
    }
    
    .hint-trigger {
        font-size: 0.85rem;
    }

    .bottom-navigation {
        bottom: 16px;
        width: calc(100% - 24px);
    }

    .nav-tab span {
        font-size: 0.7rem;
    }
}

@media (max-width: 380px) {
    .title {
        font-size: 1.8rem;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 520px;
        padding: 0 24px;
    }

    .glass-card {
        padding: 56px 48px;
        border-radius: 32px;
    }

    .title {
        font-size: 3rem;
    }

    input[type="text"] {
        cursor: text;
    }

    button {
        cursor: pointer;
    }

    .hint-trigger {
        cursor: pointer;
    }

    .nav-tab {
        cursor: pointer;
    }

    .bottom-navigation {
        max-width: 460px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 560px;
    }

    .glass-card {
        padding: 64px 56px;
    }

    .bg-blur-yellow,
    .bg-blur-white {
        width: 45vw;
        height: 45vw;
    }
}

@media (hover: hover) and (pointer: fine) {
    button:hover {
        transform: translateY(-2px);
    }

    button:active {
        transform: scale(0.98) translateY(0);
    }

    .nav-tab:not(.active):hover {
        background: rgba(255, 255, 255, 0.02);
    }
}
