:root {
    --bg: #052b1c;
    --gold: #ffd700;
    --gold2: #d4af37;
    --card: rgba(255, 215, 0, 0.10);
    --stroke: rgba(255, 215, 0, 0.65);
    --text: rgba(255, 255, 255, 0.92);
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 10%, rgba(255, 215, 0, 0.12), transparent 45%),
        radial-gradient(circle at 70% 80%, rgba(255, 215, 0, 0.10), transparent 50%),
        var(--bg);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

#fireworksCanvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.wrap {
    position: relative;
    z-index: 2;
    width: min(820px, 96vw);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: stretch;
}

.card {
    border-radius: 20px;
    border: 2px solid var(--stroke);
    background: var(--card);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.16);
    backdrop-filter: blur(8px);
    padding: 18px;
}

.title {
    grid-column: 1 / -1;
    text-align: center;
    user-select: none;
    padding: 22px 18px;
}

.title .sub {
    margin: 0 0 10px;
    letter-spacing: 8px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.95rem;
}

.title h1 {
    margin: 0;
    text-transform: uppercase;
    font-size: clamp(1.9rem, 5vw, 3.2rem);
    background: linear-gradient(45deg, var(--gold), #fff, var(--gold2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

.title p {
    margin: 12px 0 0;
    color: var(--text);
    font-size: 0.98rem;
    line-height: 1.35;
}

.qrBox {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.qrFrame {
    width: min(340px, 80vw);
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    border: 2px dashed rgba(255, 215, 0, 0.55);
    background: rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qrFrame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.qrHint {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.95rem;
}

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

.row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.10);
}

.label {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9rem;
    white-space: nowrap;
}

.value {
    color: #fff;
    font-weight: 650;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
}

.btnRow {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.btn {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 215, 0, 0.65);
    background: rgba(0, 0, 0, 0.15);
    color: #fff;
    cursor: pointer;
    user-select: none;
    transition: transform .12s ease, background .12s ease;
}

.btn:hover {
    transform: translateY(-1px);
    background: rgba(0, 0, 0, 0.22);
}

.btn:active {
    transform: translateY(0px) scale(0.99);
}

input[type="file"] {
    display: none;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 215, 0, 0.55);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    z-index: 5;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

@media (max-width: 860px) {
    .wrap {
        grid-template-columns: 1fr;
    }

    .value {
        max-width: 68%;
    }
}