:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --primary-accent: #8b5cf6;
    --secondary-accent: #06b6d4;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-family: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    padding: 2rem;
}

/* Background Animations */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: move 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--primary-accent);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: var(--secondary-accent);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 300px;
    height: 300px;
    background: #ec4899;
    animation-delay: -10s;
}

@keyframes move {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -30px) scale(1.1); }
}

.main-container {
    width: 100%;
    max-width: 600px;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

header p {
    color: #94a3b8;
    font-size: 1.1rem;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.9rem;
    color: #cbd5e1;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1rem;
    color: white;
    font-family: var(--font-family);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

input:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3);
    background: rgba(0, 0, 0, 0.4);
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

/* Timeline */
.timeline-wrapper {
    position: relative;
    padding-left: 2rem;
}

.line {
    position: absolute;
    left: 0px; /* Aligned with dots */
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-accent), var(--secondary-accent));
    border-radius: 1px;
    opacity: 0.5;
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateX(-10px);
    animation: fadeIn 0.5s forwards ease-out;
}

@keyframes fadeIn {
    to { opacity: 1; transform: translateX(0); }
}

.timeline-dot {
    position: absolute;
    left: -2.4rem; /* Adjust based on padding */
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid var(--primary-accent);
    box-shadow: 0 0 10px var(--primary-accent);
    z-index: 2;
}

.timeline-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    background: rgba(255, 255, 255, 0.08);
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--secondary-accent);
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: flex;
    justify-content: space-between;
}

.timeline-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.timeline-desc {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.timeline-day-count {
    font-size: 0.75rem;
    color: #64748b;
}
/* Append to style.css */
input.error {
    border-color: #ef4444; /* Red */
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
}

/* Manual Override Section */
.divider {
    height: 1px;
    background: var(--glass-border);
    margin: 1.5rem 0;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
    accent-color: var(--primary-accent);
}

.checkbox-group label {
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.disclaimer {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    line-height: 1.4;
    font-style: italic;
    border-left: 2px solid var(--secondary-accent);
    padding-left: 1rem;
}

.manual-inputs {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: opacity 0.3s ease;
}

.manual-inputs.disabled {
    display: none;
}

/* Manual Timeline Highlight */
.manual-alert {
    color: #ef4444;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.05em;
}

/* Keep the dot distinct but maybe align with the red theme if "manual" implies specific attention? 
   User asked for red text. I will make the dot red too for consistency. */
.timeline-dot.manual-dot {
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.highlight-days {
    color: var(--secondary-accent);
    font-weight: bold;
}

/* Completion Preview */
.completion-preview {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 12px;
    text-align: center;
    color: var(--secondary-accent);
    font-weight: 600;
    transition: all 0.3s ease;
    opacity: 0; 
    transform: translateY(-10px);
}

.completion-preview.visible {
    opacity: 1;
    transform: translateY(0);
}

.completion-preview span {
    display: block;
    color: #cbd5e1;
    font-size: 0.85em;
    font-weight: normal;
    margin-bottom: 0.25rem;
}

/* Export Button */
.export-btn {
    display: block;
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.export-btn:active {
    transform: translateY(0);
}

/* Print Styles for PDF Export */
@media print {
    :root {
        --bg-color: #ffffff;
        --text-color: #000000;
        --glass-bg: transparent;
        --glass-border: #ccc;
    }

    body {
        background: white;
        color: black;
        display: block;
        min-height: auto;
        height: auto;
        overflow: visible;
        padding: 0;
    }

    .container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .background-blobs {
        display: none !important;
    }

    h1 {
        background: none !important;
        -webkit-text-fill-color: black !important;
        color: black !important;
    }

    .glass-card, .input-section {
        background: none !important;
        box-shadow: none !important;
        border: none !important;
        backdrop-filter: none !important;
    }

    h1, label, .checkbox-group label {
        color: black !important;
    }

    input, .completion-preview, .timeline-content {
        border-color: #000;
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .timeline-date span {
        color: #666;
    }

    .timeline-title {
        color: #000 !important;
    }

    .line {
        background: #000 !important;
        opacity: 0.3 !important;
    }
    
    .timeline-dot {
        box-shadow: none !important;
        border: 2px solid #000 !important;
        background: #fff !important;
    }
    
    .timeline-dot.manual-dot {
        border-color: #ef4444 !important;
        background: #ef4444 !important;
    }

    .highlight-days {
        color: #d946ef !important; 
    }

    .manual-alert {
        color: #ef4444 !important; 
    }

    /* Hide interactive elements that don't make sense in PDF */
    .export-btn {
        display: none !important;
    }

    /* Ensure checkbox and label are visible */
    .checkbox-group, input[type="checkbox"] {
        display: flex !important;
    }

    /* Try to force background colors print */
    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Ensure all text inputs show their values */
    input {
        border: none;
        padding: 0;
        font-weight: bold;
    }
    
    .timeline-wrapper {
        break-before: page; /* Force new page */
        margin-top: 2rem; /* Give it a little breathing room on the new page */
        padding-top: 0;
    }

    .card {
        break-inside: avoid; /* Try to keep inputs together */
    }
}

