:root {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --primary-color: #16a34a;
    --primary-hover: #15803d;
    --secondary-color: #16a34a;
    --accent-color: #16a34a;
    --gradient-light: #22c55e;
    --border-color: #e2e8f0;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.app-container {
    width: 100%;
    max-width: 480px;
    /* Mobile first, optimized for phone layout */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 90vh;
    position: relative;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background-color: var(--border-color);
    border-radius: var(--radius-full);
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gradient-light), var(--primary-color));
    width: 0%;
    transition: width 0.5s ease-out;
    border-radius: var(--radius-full);
}

/* Content Area */
.content-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

/* Common Screen Styles */
.screen {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
}

/* Decorative top line for cards */
.screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gradient-light), var(--primary-color));
}

.title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.title.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--gradient-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Buttons and Options */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--gradient-light));
    color: white;
    border: none;
    padding: 1.125rem 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px 0 rgba(22, 163, 74, 0.39);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(22, 163, 74, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-btn {
    width: 100%;
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.option-btn:hover {
    border-color: var(--secondary-color);
    background-color: #f0f9ff;
    transform: translateX(4px);
}

.option-btn:active {
    transform: translateX(2px) scale(0.98);
}

.option-btn.selected {
    border-color: var(--primary-color);
    background-color: #fff7ed;
    color: var(--primary-color);
}

/* Step Indicator */
.step-indicator {
    font-size: 0.875rem;
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: block;
}

/* Loading/Transition Screens */
.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.transition-text {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2rem;
    animation: pulseText 2s infinite;
}

/* WhatsApp Mockup */
.whatsapp-mockup {
    background-color: #e5ddd5;
    padding: 1rem;
    border-radius: var(--radius-md);
    position: relative;
    margin-top: 2rem;
    box-shadow: var(--shadow-sm);
    text-align: left;
}

.whatsapp-mockup::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 20px;
    border-width: 0 10px 10px 10px;
    border-style: solid;
    border-color: transparent transparent #dcf8c6 transparent;
}

.whatsapp-bubble {
    background-color: #dcf8c6;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    color: #303030;
    line-height: 1.4;
    box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
}

.whatsapp-time {
    display: block;
    text-align: right;
    font-size: 0.7rem;
    color: #999;
    margin-top: 4px;
}

/* Article Mockup */
.article-mockup {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: left;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.article-mockup::after {
    content: 'SCIENCE DAILY';
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 0.6rem;
    color: var(--text-secondary);
    font-weight: 700;
    letter-spacing: 1px;
}

.article-title {
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.article-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-style: italic;
    border-left: 3px solid var(--secondary-color);
    padding-left: 1rem;
}

/* Final Loading Messages */
.loading-message-container {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    position: relative;
}

.loading-msg {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 500;
    text-align: center;
    opacity: 0;
    position: absolute;
    transition: opacity 0.3s ease;
    width: 100%;
}

.loading-msg.active {
    opacity: 1;
}

.loading-msg.success {
    color: var(--accent-color);
    font-weight: 700;
}

/* Footer */
.footer {
    text-align: center;
    padding: 1.5rem 0;
    color: var(--text-secondary);
    font-size: 0.75rem;
    opacity: 0.7;
}

.footer .disclaimer {
    margin-top: 0.5rem;
    font-size: 0.65rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulseText {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Utility to animate out */
.fade-out {
    animation: fadeOut 0.4s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Processing final screen */
.processing-screen {
    text-align: left;
    padding: 2.5rem 1.5rem;
}

.processing-screen .title {
    color: var(--text-primary);
}

.processing-summary {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.processing-summary strong {
    color: var(--primary-color);
}

.processing-bars {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.proc-bar-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.proc-bar-labels {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 0.85rem;
    font-weight: 600;
}

.proc-bar-title {
    color: var(--text-primary);
    max-width: 85%;
    line-height: 1.3;
}

.proc-bar-percent {
    color: var(--text-secondary);
}

.proc-bar-bg {
    width: 100%;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.proc-bar-fill {
    height: 100%;
    width: 0%;
    background-color: var(--primary-color);
    border-radius: var(--radius-full);
    transition: width 0.1s linear;
}

.testimonial-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.test-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.test-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.test-info {
    display: flex;
    flex-direction: column;
}

.test-stars {
    color: #facc15;
    font-size: 0.85rem;
    letter-spacing: 2px;
    margin-bottom: 0.2rem;
}

.test-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
}

.test-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.test-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.5;
}