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

html, body {
    height: 100%;
    background: #0a0a0a;
    color: #c0c0c0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    line-height: 1.4;
    overflow-x: hidden;
}

/* Wall — full-screen text surface */
#wall {
    padding: 12px 16px;
    padding-bottom: 80px;
    word-break: break-all;
    white-space: pre-wrap;
    min-height: 100vh;
}

.seg {
    cursor: default;
    transition: color 0.2s;
}
.seg:hover {
    color: #fff;
}

/* Counter — top-right */
#counter {
    position: fixed;
    top: 16px;
    right: 16px;
    font-size: 13px;
    color: #555;
    z-index: 100;
    pointer-events: none;
    font-variant-numeric: tabular-nums;
}

/* Buy button — bottom-right */
#buy-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    background: #fff;
    color: #000;
    border: none;
    padding: 12px 28px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: transform 0.15s, box-shadow 0.15s;
}
#buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255,255,255,0.15);
}

/* Modal overlay */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 200;
    align-items: center;
    justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal-box {
    background: #111;
    border: 1px solid #333;
    padding: 32px;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-box h2 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 24px;
}

.modal-box label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-box input,
.modal-box textarea {
    display: block;
    width: 100%;
    background: #0a0a0a;
    border: 1px solid #333;
    color: #e0e0e0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    padding: 10px 12px;
    margin-bottom: 16px;
    outline: none;
}
.modal-box input:focus,
.modal-box textarea:focus {
    border-color: #666;
}

.modal-box textarea { resize: vertical; min-height: 80px; }

.modal-price {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 16px 0;
    font-variant-numeric: tabular-nums;
}
.modal-price .chars {
    font-size: 13px;
    color: #666;
    font-weight: 400;
}

.modal-submit {
    display: block;
    width: 100%;
    background: #fff;
    color: #000;
    border: none;
    padding: 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
}
.modal-submit:hover { background: #e0e0e0; }
.modal-submit:disabled { opacity: 0.4; cursor: not-allowed; }

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #666;
    font-size: 24px;
    cursor: pointer;
}
.modal-close:hover { color: #fff; }

.modal-error {
    color: #ff4444;
    font-size: 13px;
    margin-bottom: 12px;
    display: none;
}

/* Tooltip */
#tooltip {
    position: fixed;
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 6px 10px;
    font-size: 12px;
    color: #ccc;
    pointer-events: none;
    z-index: 150;
    display: none;
    white-space: nowrap;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}
#tooltip a { color: #88f; text-decoration: none; }

/* Typing animation for new purchases */
@keyframes glow-fade {
    0%   { color: #fff; text-shadow: 0 0 8px rgba(255,255,255,0.6); }
    100% { color: #c0c0c0; text-shadow: none; }
}
.seg--new {
    animation: glow-fade 2s ease-out forwards;
}

.typing-cursor {
    display: inline;
    animation: blink 0.6s step-end infinite;
    color: #fff;
}
@keyframes blink {
    50% { opacity: 0; }
}

/* Success page */
.success-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 24px;
}
.success-page h1 {
    font-size: 24px;
    color: #fff;
    margin-bottom: 12px;
}
.success-page p {
    color: #888;
    margin-bottom: 8px;
}
.success-page a {
    color: #fff;
    text-decoration: underline;
}

/* Error page */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 24px;
}
.error-page h1 {
    font-size: 20px;
    color: #ff4444;
    margin-bottom: 12px;
}
.error-page p { color: #888; }
.error-page a { color: #fff; }
