/* BabyQ Mobile-First CSS */
/* Clean, simple, bulletproof mobile styles */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    overflow-x: hidden;
}

/* Container */
.container {
    padding: 0 20px;
    max-width: 100%;
}

/* Header - Simple and Bulletproof */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    height: 60px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

/* Logo */
.logo {
    font-size: 24px;
    font-weight: bold;
    color: #8b5cf6;
    text-decoration: none;
}

/* Menu Button */
.menu-btn {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Menu active state */
.menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
}

.mobile-nav.active {
    transform: translateY(0);
}

.nav-container {
    padding: 20px;
}

.mobile-nav a {
    display: block;
    padding: 15px 0;
    color: #333;
    text-decoration: none;
    font-size: 18px;
    border-bottom: 1px solid #eee;
}

.nav-cta {
    background: #8b5cf6;
    color: #fff !important;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 10px;
    border: none !important;
}

.nav-auth {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.nav-auth a {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    border: none;
}

/* Main Content */
main {
    margin-top: 60px;
}

/* Sections */
section {
    padding: 40px 0;
}

/* Typography */
h1 {
    font-size: 28px;
    line-height: 1.3;
    margin-bottom: 20px;
    color: #333;
}

h2 {
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 16px;
    color: #333;
}

h3 {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 12px;
    color: #333;
}

p {
    margin-bottom: 16px;
    color: #666;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 14px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #8b5cf6;
    color: #fff;
}

.btn-secondary {
    background: #fff;
    color: #8b5cf6;
    border: 2px solid #8b5cf6;
}

.btn-large {
    width: 100%;
    padding: 16px 24px;
    font-size: 18px;
}

button.btn-primary,
button.btn-secondary {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

/* Hero Section */
.hero {
    background: #f8f6ff;
    text-align: center;
    padding: 60px 0;
}

.hero h1 {
    color: #8b5cf6;
    margin-bottom: 16px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 24px;
}

/* About Section */
.about {
    background: #fff;
}

.about h2 {
    text-align: center;
    color: #8b5cf6;
    margin-bottom: 30px;
}

/* Benefit Cards */
.benefit-card {
    background: #f8f6ff;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 16px;
    text-align: center;
}

.benefit-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.benefit-card h3 {
    color: #8b5cf6;
    margin-bottom: 8px;
}

/* CTA Section */
.cta {
    background: #8b5cf6;
    color: #fff;
    text-align: center;
}

.cta h2 {
    color: #fff;
}

.cta p {
    color: #fff;
    opacity: 0.9;
    margin-bottom: 24px;
}

/* Footer */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 30px 0;
}

footer p {
    color: #fff;
    margin-bottom: 8px;
}

footer small {
    opacity: 0.8;
}

/* Auth Pages */
.auth-section {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    padding: 40px 0;
}

.auth-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 32px;
    text-align: center;
}

.auth-form {
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 16px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.3s ease;
    -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #8b5cf6;
}

.form-group input[type="date"] {
    min-height: 54px;
}

.form-group select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
    padding-right: 48px;
}

.form-hint {
    display: block;
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

/* Password wrapper and toggle */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #666;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #8b5cf6;
}

.password-toggle svg {
    display: block;
    width: 24px;
    height: 24px;
}

.password-wrapper input {
    padding-right: 56px;
}

.form-error {
    background: #fee;
    color: #c00;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.info-message {
    background: #e7f3ff;
    color: #1a5fb4;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
}

.auth-footer p {
    color: #666;
}

.auth-footer a {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 600;
}

/* User navigation state */
.user-name {
    display: inline-block;
    padding: 12px;
    color: #8b5cf6;
    font-weight: 600;
}

/* Dashboard */
.dashboard {
    padding: 40px 0;
}

.dashboard h1 {
    text-align: center;
    color: #8b5cf6;
    margin-bottom: 32px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: #f8f6ff;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #8b5cf6;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.dashboard-actions {
    margin-bottom: 40px;
}

.assessment-history h2 {
    color: #333;
    margin-bottom: 20px;
}

.no-assessments {
    text-align: center;
    color: #666;
    padding: 40px 20px;
    background: #f8f6ff;
    border-radius: 12px;
}

.assessment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.assessment-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
}

.assessment-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}

.assessment-score {
    font-size: 36px;
    font-weight: bold;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f6ff;
}

.score-excellent {
    background: #e7f5e7;
    color: #0d7a0d;
}

.score-good {
    background: #e7f3ff;
    color: #1a5fb4;
}

.score-fair {
    background: #fff4e6;
    color: #e67e22;
}

.score-needs-improvement {
    background: #ffe6e6;
    color: #c00;
}

.assessment-info {
    flex: 1;
}

.assessment-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

.assessment-category {
    font-weight: 600;
    color: #333;
}

.assessment-details {
    margin-bottom: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.category-scores {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}

.category-scores li {
    font-size: 14px;
    color: #666;
    padding: 4px 0;
}

.view-details {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
}

.pregnancy-info {
    margin-top: 40px;
}

.pregnancy-info h2 {
    color: #333;
    margin-bottom: 20px;
}

.info-card {
    background: #f8f6ff;
    padding: 24px;
    border-radius: 12px;
}

.info-card p {
    margin-bottom: 12px;
    color: #333;
}

.info-card strong {
    color: #8b5cf6;
}

/* Utility Classes */
.hidden {
    display: none;
}