* {
    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;
    background: linear-gradient(135deg, #1a4d2e 0%, #0d2818 50%, #1a4d2e 100%);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
}

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

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 12px 16px 8px;
    background: linear-gradient(180deg, rgba(26, 77, 46, 0.8) 0%, rgba(13, 40, 24, 0.6) 100%);
    border-bottom: 1px solid rgba(255, 204, 0, 0.15);
    flex-shrink: 0;
}

.hero-badge {
    font-size: 36px;
    margin-bottom: 6px;
    animation: bounce 2s ease-in-out infinite;
}

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

.hero-section h1 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.2;
    color: #fff;
}

.hero-subtitle {
    font-size: 12px;
    color: #ddd;
    margin-bottom: 6px;
}

.reward-hint {
    background: rgba(255, 204, 0, 0.15);
    border: 1px solid rgba(255, 204, 0, 0.3);
    border-radius: 6px;
    padding: 6px 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #FFCC00;
    font-weight: 600;
}

.hint-icon {
    font-size: 14px;
}

/* Quiz Section */
.quiz-section {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px 120px 16px;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

.quiz-section::-webkit-scrollbar {
    display: none;
}

.question-box {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.question-label {
    font-size: 10px;
    color: #FFCC00;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    margin-bottom: 6px;
}

.question-text {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

/* Options */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.option-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 204, 0, 0.2);
    border-radius: 8px;
    padding: 10px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    flex-shrink: 0;
}

.option-btn:active {
    transform: scale(0.98);
}

.option-btn.selected {
    background: linear-gradient(135deg, rgba(255, 204, 0, 0.2) 0%, rgba(255, 184, 77, 0.15) 100%);
    border-color: #FFCC00;
    box-shadow: 0 0 12px rgba(255, 204, 0, 0.2);
}

.option-letter {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #FFCC00 0%, #FFB84D 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
    min-width: 28px;
}

.option-text {
    flex: 1;
    text-align: left;
}

.option-check {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 204, 0, 0.3);
    border-radius: 50%;
    display: none;
}

.option-btn.selected .option-check {
    display: block;
    background: #FFCC00;
    border-color: #FFCC00;
    position: relative;
}

.option-btn.selected .option-check::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 12px;
    font-weight: 700;
}

/* Checking Section */
.checking-section {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px 20px;
    text-align: center;
}

.checking-section.active {
    display: flex;
}

.checking-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); }
}

.checking-section p {
    font-size: 14px;
    color: #ddd;
}

/* Result Section */
.result-section {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    text-align: center;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-section.active {
    display: flex;
}

.result-icon {
    font-size: 60px;
    animation: pulse-bounce 0.6s ease-out;
}

@keyframes pulse-bounce {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.result-section h2 {
    font-size: 32px;
    font-weight: 700;
    color: #FFCC00;
    margin: 8px 0;
}

.result-text {
    font-size: 14px;
    color: #ddd;
}

.reward-display {
    background: linear-gradient(135deg, rgba(255, 204, 0, 0.2) 0%, rgba(255, 184, 77, 0.15) 100%);
    border: 2px solid rgba(255, 204, 0, 0.4);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 12px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.reward-amount {
    font-size: 36px;
    font-weight: 700;
    color: #FFCC00;
}

.reward-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-hint {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

/* Button Container */
.button-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(13, 40, 24, 0) 0%, rgba(13, 40, 24, 0.95) 100%);
    padding: 16px;
    z-index: 100;
}

.cta-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FFCC00 0%, #FFB84D 100%);
    color: #000;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 20px rgba(255, 204, 0, 0.25);
    letter-spacing: 0.5px;
    -webkit-appearance: none;
    appearance: none;
}

.cta-btn:active {
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.2);
}

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

.btn-hint {
    font-size: 11px;
    color: #666;
    text-align: center;
    margin-top: 8px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    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;
}

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

/* Responsive */
@media (max-height: 600px) {
    .hero-section {
        padding: 8px 16px 4px;
    }

    .hero-badge {
        font-size: 28px;
        margin-bottom: 2px;
    }

    .hero-section h1 {
        font-size: 16px;
        margin-bottom: 2px;
    }

    .hero-subtitle {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .reward-hint {
        padding: 4px 8px;
        font-size: 10px;
    }

    .question-box {
        padding: 8px;
        margin-bottom: 8px;
    }

    .question-text {
        font-size: 13px;
    }

    .options-container {
        gap: 6px;
    }

    .option-btn {
        padding: 8px 8px;
        font-size: 12px;
        gap: 8px;
    }

    .option-letter {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .hero-section h1 {
        font-size: 18px;
    }

    .hero-badge {
        font-size: 32px;
    }

    .option-btn {
        padding: 10px 9px;
        font-size: 12px;
    }

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

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