:root {
    --primary: #2fac66;
    --primary-dark: #238b50;
    --primary-light: #4ade80;
    --secondary: #0288d1;
    --danger: #ef4444;
    --danger-dark: #b91c1c;

    --bg-page: #f0fdf4;
    --bg-card: #ffffff;
    --bg-input: #f1f5f9;

    --text-main: #1f2937;
    --text-muted: #6b7280;

    --radius: 20px;
    --radius-sm: 12px;
    --radius-round: 50px;

    /* 3D Effects */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-3d-btn: 0 6px 0 var(--primary-dark);
    --shadow-3d-card: 0 6px 0 #e2e8f0;

    --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    position: relative;
    font-size: 18px;
    /* Increased for mobile legibility */
}

/* --- App Container --- */
.app-container {
    width: 100%;
    max-width: 600px;
    background: var(--bg-card);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    padding-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

@media (min-width: 601px) {
    .app-container {
        margin: 2rem auto;
        border-radius: 32px;
        min-height: calc(100vh - 4rem);
        height: auto;
        border: 4px solid rgba(255, 255, 255, 0.8);
    }
}

/* --- Progress Bar --- */
.progress-bar-container {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    width: 0%;
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 10px rgba(47, 172, 102, 0.4);
    border-radius: 0 20px 20px 0;
}

/* --- Typography --- */
h1 {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    color: #111827;
    margin: 1rem 0;
    line-height: 1.2;
    padding: 0 1rem;
}

h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-main);
    line-height: 1.3;
    padding: 0 0.5rem;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    font-weight: 400;
    padding: 0 1rem;
}

/* --- Unified 3D Button Styles --- */
.btn-3d {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: linear-gradient(to bottom, var(--primary-light), var(--primary));
    color: white;
    border: none;
    border-radius: var(--radius-round);
    padding: 1.4rem;
    font-size: 1.25rem;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: transform 0.1s, box-shadow 0.1s;

    /* 3D Visuals */
    box-shadow: 0 6px 0 var(--primary-dark), 0 12px 20px rgba(47, 172, 102, 0.3);
    margin: 1rem 0;
    position: relative;
    top: 0;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
}

.btn-3d:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 var(--primary-dark), 0 16px 24px rgba(47, 172, 102, 0.4);
    filter: brightness(1.05);
}

.btn-3d:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 var(--primary-dark), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-3d.secondary {
    background: white;
    color: var(--text-muted);
    border: 2px solid #e5e7eb;
    box-shadow: 0 4px 0 #e5e7eb;
    font-size: 1rem;
    padding: 1rem;
}

.btn-3d.secondary:active {
    box-shadow: 0 0 0 #e5e7eb;
}

/* Special Button Modifiers */
.pulse-anim {
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 6px 0 var(--primary-dark), 0 0 0 0 rgba(47, 172, 102, 0.7);
    }

    70% {
        box-shadow: 0 6px 0 var(--primary-dark), 0 0 0 20px rgba(47, 172, 102, 0);
    }

    100% {
        box-shadow: 0 6px 0 var(--primary-dark), 0 0 0 0 rgba(47, 172, 102, 0);
    }
}

.lock-icon::before {
    content: '🔒';
    margin-right: 10px;
    font-size: 1.2rem;
}

/* --- Cards / Options --- */
.card-3d {
    background: var(--bg-card);
    border: 2px solid #e2e8f0;
    border-radius: var(--radius);
    padding: 1.4rem;
    font-size: 1.15rem;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-weight: 600;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-3d-card);
    position: relative;
    top: 0;
}

.card-3d:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #cbd5e1;
}

.card-3d.selected {
    border-color: var(--primary);
    background: #f0fdf4;
    color: var(--primary-dark);
    box-shadow: 0 6px 0 var(--primary);
}

.card-3d.selected::after {
    content: '✓';
    float: right;
    font-weight: 900;
    color: var(--primary);
    font-size: 1.4rem;
}

/* Grid Layouts */
.grid-cols-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 2rem;
}

.grid-cols-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 2rem;
}

/* --- Inputs --- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"] {
    width: 100%;
    padding: 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius);
    font-size: 1.1rem;
    background: var(--bg-input);
    color: var(--text-main);
    margin-bottom: 1rem;
    outline: none;
    transition: 0.3s;
}

input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(47, 172, 102, 0.2);
}

/* --- Stats --- */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 2rem 0;
}

.stat-box {
    background: white;
    border: 2px solid #f1f5f9;
    padding: 1.5rem 1rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.stat-box h3 {
    font-size: 2.2rem;
    color: var(--primary);
    margin: 0;
    line-height: 1;
}

.stat-box p {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0.5rem 0;
    line-height: 1.2;
}

.stat-box.highlight {
    border-color: var(--primary);
    background: #f0fdf4;
}

/* --- Images --- */
.img-wrapper {
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 4px solid white;
}

.img-wrapper img {
    width: 100%;
    display: block;
}

.doctor-round-img,
.profile-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem auto;
    display: block;
    border: 4px solid var(--primary);
    padding: 3px;
    background: white;
    box-shadow: var(--shadow-md);
}

/* --- Layout Helpers --- */
.state-view {
    display: none;
    padding: 2rem 1.5rem;
    animation: fadeIn 0.4s ease;
}

.state-view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.center-text {
    text-align: center;
}

/* --- Testimonials --- */
.testimonial {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    border: 1px solid #f1f5f9;
}

/* --- Secure Badge --- */
.secure-badge {
    background: #ecfeff;
    color: #0891b2;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-block;
    border: 1px solid #a5f3fc;
    margin-top: 5px;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
    font-size: 0.9rem;
}