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

:root {
    /* Sophisticated Palette */
    --primary: #0F172A;       /* Slate 900 */
    --accent: #3B82F6;        /* Blue 500 */
    --accent-glow: rgba(59, 130, 246, 0.5);
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    
    --bg-surface: #FFFFFF;
    --bg-main: #F8FAFC;       /* Slate 50 */
    
    --text-main: #1E293B;     /* Slate 800 */
    --text-muted: #64748B;    /* Slate 500 */
    --border: #E2E8F0;
    
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-float: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Patterns */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, #EFF6FF 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 2rem;
    border-radius: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    width: 100%;
    top: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.95);
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 20px 60px;
    position: relative;
    overflow: hidden;
}

.hero-badge {
    background: #DBEAFE;
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    display: inline-block;
    letter-spacing: 0.02em;
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--primary) 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    max-width: 900px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 40px;
}

.btn-group {
    display: flex;
    gap: 16px;
}

.btn {
    padding: 16px 32px;
    border-radius: 100px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.1), 0 2px 4px -1px rgba(15, 23, 42, 0.06);
    border: 1px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.15);
    background: #1E293B;
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    background: #F8FAFC;
}

/* --- Features Grid --- */
.features {
    padding: 80px 5%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature-card {
    background: var(--bg-surface);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-float);
    border-color: var(--accent);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: #EFF6FF;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 24px;
    color: var(--accent);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-muted);
}

/* --- Wizard Form Styling (Predict Page) --- */
.wizard-container {
    max-width: 700px;
    margin: 120px auto 60px;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
    padding-bottom: 20px;
}

.wizard-header {
    background: #F8FAFC;
    padding: 30px 40px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.wizard-header h2 {
    font-size: 1.8rem;
    color: var(--primary);
}

.progress-bar {
    height: 4px;
    background: #E2E8F0;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    width: 25%;
    transition: width 0.4s ease;
}

.step-content {
    display: none;
    padding: 40px;
    animation: fadeIn 0.4s ease;
}

.step-content.active {
    display: block;
}

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

/* Beautiful Inputs */
/* --- Advanced Input Styling with Units --- */
.input-wrapper {
    position: relative;
    margin-bottom: 24px;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-field {
    width: 100%;
    padding: 14px 16px;
    padding-right: 60px; /* Space for unit */
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-main);
    background: #FAFAFA;
    transition: all 0.3s ease;
    font-family: inherit;
}

.input-unit {
    position: absolute;
    right: 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    pointer-events: none;
    background: rgba(250, 250, 250, 0.8); /* Slight matching bg */
    padding-left: 5px;
}

.input-field:focus {
    border-color: var(--accent);
    background: white;
    box-shadow: 0 0 0 4px #DBEAFE;
    outline: none;
}

/* Float Label Effect? Keeping it simple but labeled clearly above */
label {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Info Icon */
.info-tooltip {
    color: var(--accent);
    cursor: help;
    font-size: 0.9rem;
    margin-left: 5px;
    position: relative; 
}

/* Demo Button Styles */
.demo-btn-container {
    text-align: right;
    margin-bottom: 10px;
    padding: 0 40px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px 10px;
    border-radius: 6px;
}

.btn-text:hover {
    background: #EFF6FF;
}

/* Validation Styling */
.input-field:invalid:not(:placeholder-shown) {
    border-color: var(--danger);
    background-color: #FEF2F2;
}

.validation-msg {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 4px;
    display: none;
}

.input-field:invalid:not(:placeholder-shown) + .validation-msg {
    display: block;
}

/* Custom Select */
select.input-field {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
}

/* Wizard Navigation */
.wizard-footer {
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}

.btn-prev {
    background: transparent;
    color: var(--text-muted);
    border: none;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 20px;
}

.btn-prev:hover {
    color: var(--primary);
}

.step-indicator {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Result Modal - Glassmorphism */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.result-box {
    background: white;
    padding: 50px;
    border-radius: 24px;
    text-align: center;
    max-width: 480px;
    width: 90%;
    box-shadow: var(--shadow-float);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    position: relative;
    overflow: hidden;
}

.modal-overlay.active .result-box {
    transform: scale(1);
}

.result-status-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.safe-status { background: #ECFDF5; color: #10B981; }
.danger-status { background: #FEF2F2; color: #EF4444; }

.result-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--primary);
}

.result-desc {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 32px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
    margin-top: 60px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        width: 100%;
        top: 0;
        border-radius: 0;
        padding: 1rem;
    }
    .hero h1 { font-size: 2.5rem; }
    .wizard-header { padding: 20px; }
    .step-content { padding: 25px; }
    .input-field, button, select {
        min-height: 48px; /* Approx 44px min touch target */
    }
}
