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

:root {
    --bg: #09090b;
    --bg-secondary: #18181b;
    --bg-tertiary: #27272a;
    --border: #27272a;
    --text: #fafafa;
    --text-secondary: #a1a1aa;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --success: #22c55e;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

/* Layout */
.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 16px;
}

.logo img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.btn-connect {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-connect:hover {
    background: var(--bg-tertiary);
}

/* Main Content */
.main {
    padding: 32px 0 40px;
}

/* Token Header */
.token-header {
    text-align: center;
    margin-bottom: 24px;
}

.token-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 16px;
    border: 2px solid var(--border);
}

.token-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.token-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Info Card */
.info-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-row:first-child {
    padding-top: 0;
}

.info-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.info-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    text-align: right;
}

.info-value.address {
    font-size: 12px;
    font-family: ui-monospace, monospace;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Claim Button */
.btn-claim {
    width: 100%;
    background: var(--text);
    color: var(--bg);
    border: none;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-claim:hover {
    opacity: 0.9;
}

.btn-claim:active {
    opacity: 0.8;
}

.btn-claim:disabled {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.btn-claim.loading {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: wait;
    pointer-events: none;
}

.btn-claim.loading .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--text-secondary);
    border-top-color: var(--text);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

.btn-claim.success {
    background: var(--success);
    color: white;
    pointer-events: none;
}

.btn-claim svg {
    width: 18px;
    height: 18px;
}

/* Notice */
.notice {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.5;
}

/* Error Message */
.message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    color: #fca5a5;
    text-align: center;
    margin-bottom: 16px;
    display: none;
}

/* Eligibility Card */
.eligibility-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
    animation: cardReveal 0.6s ease-out;
}

.eligibility-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #22c55e, #3b82f6, #a855f7, #22c55e);
    background-size: 400% 400%;
    border-radius: 14px;
    z-index: -1;
    animation: borderGlow 3s ease infinite;
    opacity: 0.7;
}

@keyframes borderGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes cardReveal {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.eligibility-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(34, 197, 94, 0.1);
    border-bottom: 1px solid var(--border);
}

.eligibility-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--success);
    font-size: 13px;
    font-weight: 600;
}

.badge-icon {
    width: 18px;
    height: 18px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.eligibility-wallet {
    font-size: 12px;
    font-family: ui-monospace, monospace;
    color: var(--text-secondary);
}

.eligibility-body {
    padding: 20px 16px;
    text-align: center;
}

.eligibility-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.eligibility-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    position: relative;
}

/* Mystery box - before reveal */
.eligibility-amount.mystery {
    min-height: 60px;
}

.eligibility-amount.mystery .amount-value,
.eligibility-amount.mystery .amount-symbol {
    opacity: 0;
    visibility: hidden;
}

.mystery-overlay {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 1;
}

.eligibility-amount.mystery .mystery-overlay {
    display: flex;
}

.mystery-box {
    font-size: 32px;
    animation: mysteryPulse 1.5s ease-in-out infinite;
}

.mystery-text {
    font-size: 14px;
    color: var(--text-secondary);
    animation: mysteryFade 1.5s ease-in-out infinite;
}

@keyframes mysteryPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    50% { transform: scale(1.15) rotate(5deg); }
    75% { transform: scale(1.1) rotate(-3deg); }
}

@keyframes mysteryFade {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Reveal animation */
.eligibility-amount.revealing .amount-value,
.eligibility-amount.revealing .amount-symbol {
    visibility: visible;
    opacity: 1;
    animation: revealNumber 0.8s ease-out;
}

@keyframes revealNumber {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.amount-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text);
    transition: all 0.3s ease;
}

.amount-value.counting {
    background: linear-gradient(90deg, var(--text), var(--success), var(--text));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerText 3s ease-in-out;
}

@keyframes shimmerText {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.amount-symbol {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.eligibility-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.eligibility-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.eligibility-row span:first-child {
    color: var(--text-secondary);
}

.status-ready {
    color: var(--success);
    font-weight: 500;
}

/* Steps */
.steps {
    margin-top: 32px;
}

.steps-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.step {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.step:last-child {
    border-bottom: none;
}

.step-num {
    width: 24px;
    height: 24px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    transition: all 0.3s;
}

.step.completed .step-num {
    background: var(--success);
    color: white;
}

.step.completed .step-num::before {
    content: '✓';
    font-size: 14px;
}

.step.completed .step-num span {
    display: none;
}

.step.active .step-num {
    background: var(--accent);
    color: white;
}

.step-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.step-content p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    padding: 20px 0;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-left {
    font-size: 13px;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text);
}

.social-links {
    display: flex;
    gap: 8px;
}

.social-link {
    width: 32px;
    height: 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.social-link:hover {
    background: var(--bg-tertiary);
}

.social-link img {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* Loading */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .token-name {
        font-size: 22px;
    }

    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}
