@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #3B82F6;
    --primary-gradient: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    --success-gradient: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --bg-main: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --radius-xl: 1.5rem;
    --shadow-subtle: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.05) 0px, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid #e2e8f0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    height: 24px;
}

.logo .google-text {
    font-weight: 600;
    font-size: 1.1rem;
    color: #4b5563;
}

.wallet-pill {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 0.4rem 0.75rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
}

.wallet-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* Container */
main {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.survey-box {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.progress-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #3b82f6;
    width: 0%;
    transition: width 0.4s ease;
}

.card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-subtle);
    border: 1px solid #f1f5f9;
}

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.description {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Worth Badge */
.worth-badge {
    display: inline-flex;
    align-items: center;
    background: #ecfdf5;
    color: #065f46;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Options */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.option:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    transform: translateX(2px);
}

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

.check-icon {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 0.9rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-success {
    background: var(--success-gradient);
    color: white;
}

.btn:active {
    opacity: 0.9;
}

/* Step visibility */
.step {
    display: none;
}

.step.active {
    display: block;
}

/* Reward Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal {
    background: white;
    padding: 2.5rem;
    border-radius: 2rem;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    max-width: 300px;
    width: 90%;
    animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

.money-bag {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.modal-amount {
    font-size: 2.25rem;
    font-weight: 800;
    color: #10b981;
}

/* Completion Card */
.balance-card {
    background: #3b82f6;
    color: white;
    padding: 2.5rem 1.5rem;
    border-radius: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.balance-card h3 {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.balance-card .amount {
    font-size: 3.5rem;
    font-weight: 800;
}

/* Confetti Container */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 80; /* Below modal (100) but above content */
}
