* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    position: fixed;
    top: 0;
    left: 0;
}

.app-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Background gradient */
.background-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a7a3a 0%, #0d4620 50%, #1a7a3a 100%);
    z-index: -1;
}

/* Status bar - Live indicator */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 204, 0, 0.1);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #FF4444;
    border-radius: 50%;
    animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }
    50% {
        opacity: 0.8;
    }
}

.live-text {
    font-size: 12px;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.limited-badge {
    background: rgba(255, 204, 0, 0.2);
    border: 1px solid rgba(255, 204, 0, 0.4);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 11px;
    color: #FFCC00;
    font-weight: 700;
    white-space: nowrap;
}

/* Content wrapper */
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px 16px;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
}

.content-wrapper::-webkit-scrollbar {
    display: none;
}

/* Success section */
.success-section {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    text-align: center;
    padding: 8px 0;
}

/* Coin container with 3D effect */
.coin-container {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto;
    flex-shrink: 0;
}

.coin {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: coinBounce 0.8s ease-out;
}

.coin-main {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
    left: 10px;
    top: 10px;
    z-index: 3;
    box-shadow: 
        inset -2px -2px 5px rgba(0, 0, 0, 0.2),
        inset 2px 2px 5px rgba(255, 255, 255, 0.3),
        0 10px 30px rgba(0, 0, 0, 0.3);
}

.coin-inner {
    font-size: 32px;
    color: #000;
    font-weight: 900;
    line-height: 1;
}

.coin-amount {
    font-size: 28px;
    color: #000;
    font-weight: 900;
    line-height: 1;
    margin-top: 2px;
}

.coin-side {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
    opacity: 0.7;
}

.coin-left {
    left: -15px;
    top: 25px;
    width: 70px;
    height: 70px;
    animation: coinSideBounce 0.8s ease-out 0.1s backwards;
    z-index: 1;
}

.coin-right {
    right: -15px;
    top: 25px;
    width: 70px;
    height: 70px;
    animation: coinSideBounce 0.8s ease-out 0.2s backwards;
    z-index: 1;
}

@keyframes coinBounce {
    0% {
        transform: scale(0) translateY(30px);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes coinSideBounce {
    0% {
        transform: scale(0) translateX(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

/* Success message */
.success-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.checkmark {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00C853 0%, #00AA47 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(0, 200, 83, 0.3);
    animation: checkmarkPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

.success-message h1 {
    font-size: 22px;
    color: #fff;
    font-weight: 700;
    margin: 4px 0;
    line-height: 1.2;
}

.sub-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Balance box */
.balance-box {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 204, 0, 0.3);
    border-radius: 10px;
    padding: 10px 14px;
    margin-top: 6px;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.balance-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.balance-amount {
    font-size: 28px;
    color: #FFCC00;
    font-weight: 700;
    margin-bottom: 2px;
    line-height: 1;
}

.balance-hint {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
}

/* CTA Section */
.cta-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
    flex-shrink: 0;
    width: 100%;
    padding: 0 12px;
}

.cta-btn {
    width: 100%;
    padding: 18px 16px;
    background: linear-gradient(135deg, #FFCC00 0%, #FFB84D 100%);
    color: #000;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 10px 28px rgba(255, 204, 0, 0.35);
    letter-spacing: 0.8px;
    -webkit-appearance: none;
    appearance: none;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1.2;
}

.cta-btn:active {
    transform: scale(0.96);
    box-shadow: 0 6px 16px rgba(255, 204, 0, 0.25);
}

.cta-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-subtitle {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin: 0;
}

/* Footer hint */
.footer-hint {
    text-align: center;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
    padding: 4px 0 0 0;
    flex-shrink: 0;
    margin: 0;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 1000;
    gap: 16px;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 204, 0, 0.2);
    border-top: 3px solid #FFCC00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-overlay p {
    font-size: 14px;
    color: #fff;
    font-weight: 600;
}

/* Responsive */
@media (max-height: 650px) {
    .success-section {
        gap: 8px;
    }

    .coin-container {
        width: 90px;
        height: 90px;
    }

    .coin {
        width: 80px;
        height: 80px;
    }

    .coin-inner {
        font-size: 24px;
    }

    .coin-amount {
        font-size: 20px;
    }

    .success-message h1 {
        font-size: 18px;
        margin: 2px 0;
    }

    .sub-text {
        font-size: 11px;
    }

    .balance-box {
        padding: 8px 12px;
    }

    .balance-label {
        font-size: 9px;
    }

    .balance-amount {
        font-size: 22px;
    }

    .cta-btn {
        padding: 11px 14px;
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .content-wrapper {
        padding: 16px 12px;
    }

    .success-message h1 {
        font-size: 24px;
    }

    .cta-btn {
        padding: 14px 16px;
        font-size: 14px;
    }

    .balance-box {
        padding: 12px 14px;
    }
}

@media (min-width: 768px) {
    .app-container {
        max-width: 480px;
        margin: 0 auto;
        border: 1px solid rgba(255, 204, 0, 0.2);
        height: 100vh;
    }
}
