/* How It Works Link */
#how-it-works {
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

#how-it-works:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* How It Works Popup */
.hiw-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.hiw-popup-overlay.active {
    display: flex;
}

.hiw-popup {
    background: var(--panel, #151922);
    border: 1px solid var(--border, #273042);
    border-radius: 16px;
    width: 100%;
    max-width: 530px;
    max-height: 90vh;
    overflow-y: auto;
}

.hiw-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0;
}

.hiw-popup-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--text, #e9eef7);
}

.hiw-popup-close {
    background: none;
    border: none;
    color: var(--muted, #8b95a7);
    cursor: pointer;
    padding: 4px;
}

.hiw-popup-close:hover {
    color: var(--text, #e9eef7);
}

.hiw-popup-body {
    padding: 24px;
}

.hiw-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hiw-list li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    font-size: 18px;
    line-height: 1.5;
    color: var(--text, #e9eef7);
    padding-right: 20px;
}

.hiw-check {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: url('/images/check.png') center / contain no-repeat;
    border-radius: 6px;
}

.hiw-highlight {
    color: var(--accent, #8bdc65);
    font-weight: 500;
}

.hiw-popup-footer {
    padding: 8px 24px 34px;
    display: flex;
    justify-content: center;
}

.hiw-create-btn {
    background: var(--accent, #8bdc65);
    color: var(--bg, #0f1216);
    border: none;
    border-radius: 10px;
    padding: 14px 32px;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.hiw-create-btn:hover {
    opacity: 0.9;
}

@media (max-width: 600px) {
    .hiw-list li {
        font-size: 16px;
    }

    .hiw-check {
        width: 24px;
        height: 24px;
    }
}

/* Telegram QR Popup */
.tg-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.tg-popup-overlay.active {
    display: flex;
}

.tg-popup {
    background: var(--panel, #151922);
    border: 1px solid var(--border, #273042);
    border-radius: 16px;
    width: 100%;
    max-width: 530px;
    max-height: 90vh;
    overflow-y: auto;
}

.tg-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0;
}

.tg-popup-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--text, #e9eef7);
}

.tg-popup-close {
    background: none;
    border: none;
    color: var(--muted, #8b95a7);
    cursor: pointer;
    padding: 4px;
}

.tg-popup-close:hover {
    color: var(--text, #e9eef7);
}

.tg-popup-body {
    padding: 24px;
    text-align: center;
}

.tg-popup-desc {
    color: var(--text, #e9eef7);
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 24px;
    text-align: left;
}

.tg-popup-desc a {
    color: var(--accent, #8bdc65);
    text-decoration: none;
}

.tg-popup-desc a:hover {
    text-decoration: underline;
}

.tg-qr-img {
    width: 200px;
    height: 200px;
    border-radius: 16px;
    background: url("/images/frame.png") center / cover no-repeat;
    background-color: #0b0f18;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.tg-qr-img .sb-pill-bg {
    background: var(--accent, #8bdc65);
    width: 52px;
    height: 52px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
}

.tg-qr-img .check {
    color: var(--bg, #0f1216);
    font-size: 36px;
    margin: 0;
    padding: 0;
}

.tg-popup-footer {
    padding: 8px 24px 34px;
    display: flex;
    justify-content: center;
}

.tg-visit-btn {
    background: var(--accent, #8bdc65);
    color: var(--bg, #0f1216);
    border: none;
    border-radius: 10px;
    padding: 14px 32px;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.tg-visit-btn:hover {
    opacity: 0.9;
}

@media (max-width: 600px) {
    .tg-qr-img {
        width: 160px;
        height: 160px;
    }

    .tg-qr-img .sb-pill-bg {
        width: 40px;
        height: 40px;
    }

    .tg-qr-img .check {
        font-size: 28px;
    }
}
