/* Campaign page — extends mini app theme (app.css) */

body {
    padding-bottom: 82px;
}

.page {
    display: block !important;
    max-width: 520px;
    margin: 0 auto;
    padding-bottom: 24px;
}

.page .hero-desc strong {
    color: var(--gold);
    font-weight: 700;
}

.campaign-stats {
    padding: 14px 16px;
    margin-bottom: 16px;
    border-radius: 16px;
}

.campaign-stats .pstat-val {
    font-family: Orbitron, sans-serif;
    font-size: 1rem;
}

.stash-card {
    margin-bottom: 20px;
}

.hero-banner--compact {
    margin-bottom: 12px;
}

.hero-banner--compact .hero-title {
    font-size: 2rem;
}

.stash-amount-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin: 12px 0 14px;
    font-family: Orbitron, sans-serif;
}

.stash-amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(231, 201, 119, 0.45);
}

.stash-amount-sep {
    color: var(--muted);
    font-size: 1.25rem;
}

.stash-amount-max {
    font-size: 1.1rem;
    color: var(--muted);
    font-weight: 600;
}

.stash-progress-wrap {
    margin-bottom: 14px;
}

.stash-progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.stash-progress-meta span:first-child {
    color: var(--cyan);
    font-family: Orbitron, sans-serif;
}

.stash-progress-track {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--glass-border-light);
    overflow: visible;
}

.stash-progress-fill {
    position: relative;
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--rose-deep), var(--gold), var(--cyan));
    box-shadow: 0 0 16px rgba(231, 201, 119, 0.5);
    transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 1;
}

.stash-progress-glow {
    position: absolute;
    top: 50%;
    left: 0;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border-radius: 50%;
    background: var(--gold-light);
    box-shadow:
        0 0 12px var(--gold),
        0 0 28px rgba(231, 201, 119, 0.8),
        0 0 48px rgba(170, 205, 242, 0.4);
    transition: left 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 2;
    pointer-events: none;
}

.stash-countdown-row {
    margin-top: 4px;
}

.claim-zone {
    padding: 22px 18px 20px;
    margin: 24px 0 16px;
    border-radius: 20px;
}

/* Secure allocation card */
.secure-zone {
    position: relative;
    padding: 22px 18px 20px;
    margin: 24px 0 16px;
    border-radius: 20px;
    overflow: hidden;
    text-align: center;
}

.secure-gem {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.secure-gem__icon {
    font-size: 1.85rem;
    line-height: 1;
    z-index: 1;
    filter:
        drop-shadow(0 0 8px rgba(255, 255, 255, 0.95))
        drop-shadow(0 0 18px rgba(170, 205, 242, 0.85))
        drop-shadow(0 0 32px rgba(231, 201, 119, 0.45));
    animation: gemPulse 3s ease-in-out infinite;
}

.secure-gem__shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 38%, rgba(255, 255, 255, 0.14) 50%, transparent 62%);
    transform: rotate(25deg);
    animation: gemShine 4s ease-in-out infinite;
}

@keyframes gemPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

@keyframes gemShine {
    0%, 100% { opacity: 0.35; transform: rotate(25deg) translateX(-8%); }
    50% { opacity: 1; transform: rotate(25deg) translateX(8%); }
}

.secure-zone__title {
    font-family: Orbitron, sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin: 0 48px 8px 0;
    text-align: left;
}

.secure-zone__desc {
    font-size: 0.82rem;
    text-align: left;
    line-height: 1.5;
    margin-bottom: 18px;
    max-width: 34ch;
}

.connect-ton-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 20px 22px;
    margin: 4px 0 12px;
    border: 1px solid rgba(130, 200, 255, 0.45);
    border-radius: 16px;
    font-family: Orbitron, sans-serif;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #6ec8ff 0%, #3b8ef7 42%, #1f6fe0 100%);
    box-shadow:
        0 0 36px rgba(59, 142, 247, 0.55),
        0 10px 32px rgba(31, 111, 224, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.38);
    transition: transform 0.22s ease, box-shadow 0.25s ease, filter 0.22s ease;
}

.connect-ton-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.07);
    box-shadow:
        0 0 52px rgba(110, 200, 255, 0.7),
        0 14px 40px rgba(59, 142, 247, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.connect-ton-btn:active {
    transform: translateY(1px) scale(0.99);
}

.connect-ton-btn__gem {
    font-size: 1.25rem;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9));
}

.trust-badges {
    font-size: 0.68rem;
    line-height: 1.55;
    letter-spacing: 0.02em;
    margin-bottom: 18px;
    opacity: 0.72;
}

.wallet-bound-badge {
    display: inline-block;
    padding: 10px 16px;
    margin-bottom: 12px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--success);
    background: rgba(95, 214, 160, 0.12);
    border: 1px solid rgba(95, 214, 160, 0.32);
}

.wallet-bound-addr {
    font-family: Orbitron, sans-serif;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.wallet-bound-msg {
    font-size: 0.78rem;
    line-height: 1.5;
    margin-bottom: 18px;
    max-width: 36ch;
    margin-left: auto;
    margin-right: auto;
}

.secure-zone__claim {
    margin-top: 4px;
    padding: 18px 20px !important;
    font-size: 1rem !important;
    letter-spacing: 0.08em;
}

.ton-connect-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* FAQ accordion */
.faq {
    margin: 0 0 16px;
    padding: 4px 0;
    border-radius: 16px;
    overflow: hidden;
}

.faq__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-bottom: 1px solid var(--glass-border-light);
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
}

.faq__item:last-of-type {
    border-bottom: none;
}

.faq__item:hover {
    background: rgba(130, 169, 230, 0.06);
}

.faq__item[aria-expanded="true"] {
    background: rgba(130, 169, 230, 0.08);
}

.faq__item[aria-expanded="true"] .faq__chev {
    transform: rotate(180deg);
    color: var(--cyan);
}

.faq__q {
    flex: 1;
    line-height: 1.4;
}

.faq__chev {
    flex-shrink: 0;
    margin-left: auto;
    font-size: 0.65rem;
    color: var(--muted);
    opacity: 0.65;
    transition: transform 0.25s ease, color 0.2s ease;
}

.faq__a {
    padding: 0 16px 14px;
    border-bottom: 1px solid var(--glass-border-light);
}

.faq__a[hidden] {
    display: none;
}

.faq__a p {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--muted);
}

.faq__item:last-of-type + .faq__a {
    border-bottom: none;
}

.claim-zone__title {
    font-family: Orbitron, sans-serif;
    font-size: 1rem;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
    text-align: center;
}

.claim-zone__sub {
    font-size: 0.8rem;
    text-align: center;
    margin-bottom: 18px;
}

.wallet-paste-hint {
    font-size: 0.72rem;
    line-height: 1.45;
    margin: 0 0 14px;
    text-align: center;
}

.wallet-paste-hint--ok {
    color: var(--success);
}

.wallet-actions {
    display: flex;
    justify-content: center;
    margin: -6px 0 10px;
}

.wallet-clear-btn {
    border: 1px solid var(--glass-border-light);
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.wallet-clear-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    color: var(--text);
}

.field-label--lg {
    font-size: 0.68rem;
    text-align: center;
}

.field-input--hero {
    padding: 16px 18px;
    font-size: 0.95rem;
    text-align: center;
    border-radius: 14px;
    margin-bottom: 14px;
    border-width: 1.5px;
}

.field-input--hero:focus {
    box-shadow: 0 0 0 3px var(--rose-soft), 0 0 24px rgba(130, 169, 230, 0.2);
}

.claim-zone__btn {
    margin-top: 6px;
    padding: 18px 20px !important;
    font-size: 1rem !important;
    letter-spacing: 0.08em;
}

.partners {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px 20px;
    padding: 20px 12px 28px;
    opacity: 0.5;
}

.partners__item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.04em;
}

.partners__item strong {
    color: var(--grey-dark);
    font-weight: 700;
}

.partners__logo-box {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.partners__logo {
    object-fit: contain;
    filter: grayscale(0.15);
}

.partners__logo--ton {
    width: 34px;
    height: 34px;
}

.partners__logo--telegram {
    width: 28px;
    height: 28px;
}

.partners__dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--muted);
    opacity: 0.4;
}

.stash-card .player-meta {
    line-height: 1.45;
    max-width: 28ch;
}

.stash-card .player-meta--max {
    color: var(--gold);
}

.stash-avatar {
    font-size: 1.6rem !important;
    font-family: inherit !important;
    color: var(--gold) !important;
}

.countdown-val {
    font-size: 0.82rem !important;
    letter-spacing: 0.02em;
}

.wallet-block {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--glass-border-light);
}

.field-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}

.field-optional {
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    opacity: 0.7;
}

.field-input {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 12px;
    border-radius: 12px;
    border: 1px solid var(--glass-border-light);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field-input:focus {
    border-color: var(--rose-bright);
    box-shadow: 0 0 0 2px var(--rose-soft);
}

.field-input:disabled {
    opacity: 0.5;
}

.memo-warning {
    font-size: 0.72rem;
    line-height: 1.5;
    color: var(--gold);
    margin: -4px 0 14px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(231, 201, 119, 0.08);
    border: 1px solid rgba(231, 201, 119, 0.2);
}

.claim-note {
    font-size: 0.75rem;
    text-align: center;
    margin-top: 10px;
    line-height: 1.45;
}

#claim-btn {
    margin-top: 4px;
}

#claim-btn.claim-done {
    opacity: 0.92;
    background: linear-gradient(135deg, rgba(95, 214, 160, 0.35), rgba(46, 160, 110, 0.5)) !important;
    border: 1px solid rgba(95, 214, 160, 0.45);
    box-shadow: 0 0 24px rgba(95, 214, 160, 0.25) !important;
    color: #e8fff4 !important;
}

/* Success congratulations modal */
.success-overlay {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(10px);
}

.success-overlay[hidden] {
    display: none !important;
}

.success-panel {
    position: relative;
    width: min(100%, 380px);
    padding: 32px 24px 24px;
    border-radius: 22px;
    text-align: center;
    overflow: hidden;
    border: 1px solid rgba(231, 201, 119, 0.35);
    box-shadow:
        0 0 48px rgba(95, 214, 160, 0.15),
        0 24px 64px rgba(0, 0, 0, 0.55);
    animation: successPop 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes successPop {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.success-glow {
    position: absolute;
    top: -40%;
    left: 50%;
    width: 120%;
    height: 80%;
    transform: translateX(-50%);
    background: radial-gradient(ellipse, rgba(231, 201, 119, 0.22) 0%, rgba(95, 214, 160, 0.12) 40%, transparent 70%);
    pointer-events: none;
}

.success-trophy {
    font-size: 2.75rem;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 16px rgba(231, 201, 119, 0.65));
}

.success-title {
    font-family: Orbitron, sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 14px;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(231, 201, 119, 0.45);
}

.success-desc {
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--muted);
    margin-bottom: 22px;
}

.success-close {
    width: 100%;
    padding: 16px 20px !important;
    background: linear-gradient(135deg, rgba(95, 214, 160, 0.9), rgba(46, 180, 120, 0.95)) !important;
    box-shadow: 0 8px 28px rgba(95, 214, 160, 0.35) !important;
    font-size: 0.9rem !important;
    letter-spacing: 0.04em;
}

.task-item--done {
    opacity: 0.55;
}

/* Verify overlay */
.verify-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

.verify-overlay[hidden] {
    display: none !important;
}

.verify-panel {
    width: min(100%, 360px);
    padding: 28px 24px;
    border-radius: 20px;
    text-align: center;
}

.verify-spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto 16px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: verify-spin 0.9s linear infinite;
}

@keyframes verify-spin {
    to { transform: rotate(360deg); }
}

.verify-title {
    font-family: Orbitron, sans-serif;
    font-size: 1rem;
    margin-bottom: 6px;
}

.verify-sub {
    font-size: 0.78rem;
    margin-bottom: 18px;
}

.verify-list {
    list-style: none;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.verify-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--muted);
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.verify-li--active {
    color: var(--text) !important;
    border-color: var(--glass-border) !important;
    background: rgba(130, 169, 230, 0.08) !important;
}

.verify-li--done {
    color: var(--success) !important;
    border-color: rgba(95, 214, 160, 0.25) !important;
}

.verify-icon {
    font-size: 0.9rem;
    width: 18px;
    text-align: center;
}

.secure-zone__claim.claim-locked,
.secure-zone__claim:disabled:not(.claim-done) {
    opacity: 0.38;
    cursor: not-allowed;
    pointer-events: none;
    text-transform: uppercase;
    font-size: 0.88rem !important;
    letter-spacing: 0.06em;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--glass-border-light);
    box-shadow: none !important;
    color: var(--muted) !important;
    filter: none;
}

.secure-zone__claim:not(:disabled):not(.claim-done) {
    opacity: 1;
    cursor: pointer;
    pointer-events: auto;
}

.claim-locked {
    margin-top: 14px;
    opacity: 0.42;
    cursor: not-allowed;
    text-transform: uppercase;
    font-size: 0.78rem !important;
    letter-spacing: 0.06em;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid var(--glass-border-light);
    box-shadow: none !important;
}

.campaign-hero-art {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    margin-bottom: 18px;
    border-radius: 18px;
    text-align: center;
}

.campaign-hero-art img {
    filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.55));
    animation: packFloat 4s ease-in-out infinite;
}

@keyframes packFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.section-lead {
    font-size: 0.82rem;
    margin: -6px 0 14px;
    line-height: 1.5;
}

.login-prompt {
    text-align: center;
    font-size: 0.8rem;
    margin-top: 8px;
}

.locked-phases {
    margin: 16px 0;
}

.quick-chip--locked {
    opacity: 0.38;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-item--locked {
    opacity: 0.35;
    pointer-events: none;
}

.nav-item--link {
    text-decoration: none;
    color: inherit;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--muted);
}

.toast {
    position: fixed;
    bottom: 88px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    padding: 12px 18px;
    border-radius: 14px;
    background: var(--panel-2);
    border: 1px solid var(--glass-border);
    font-size: 0.85rem;
    z-index: 400;
    transition: transform 0.3s ease;
    max-width: min(90vw, 360px);
    text-align: center;
    box-shadow: var(--shadow);
}

.toast--show {
    transform: translateX(-50%) translateY(0);
}

.toast--error {
    border-color: rgba(255, 100, 100, 0.4);
}

.task-item .task-reward {
    font-size: 0.72rem;
    color: var(--gold);
    font-weight: 700;
    margin-top: 2px;
}

.task-item .task-step {
    font-size: 0.68rem;
    color: var(--cyan);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.task-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.task-actions .action-btn,
.task-actions button {
    width: auto;
    min-width: 88px;
    margin-top: 0 !important;
    padding: 8px 12px !important;
    font-size: 0.72rem !important;
}

.task-actions a.action-btn {
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 521px) {
    body {
        border-left: 1px solid var(--glass-border-light);
        border-right: 1px solid var(--glass-border-light);
        max-width: 520px;
        margin: 0 auto;
    }
}
