:root {
    --bg-color: #0f1115;
    
    /* Light Theme for Cards */
    --card-bg: rgba(255, 255, 255, 0.92);
    --card-text: #1f2937;
    --card-text-light: #4b5563;
    
    /* Global text for things on dark background */
    --text-primary: #ffffff;
    --text-secondary: #e2e6eb;
    
    --accent-color: #3b82f6; /* Bright Blue */
    --accent-glow: rgba(59, 130, 246, 0.5);
    --line-color: rgba(255, 255, 255, 0.6);
    --card-radius: 16px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background-image: url('istockphoto-1277004651-612x612.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.header {
    text-align: center;
    padding: 6rem 1rem 3rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), rgba(0,0,0,0));
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #fff;
}

.header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.timeline-container {
    position: relative;
    max-width: 1800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* The vertical line */
.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: var(--accent-color);
    transform: translateX(-50%);
    z-index: 0;
    box-shadow: 0 0 15px var(--accent-glow);
    border-radius: 4px;
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    width: 100%;
    display: flex;
    justify-content: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Container for content to alternate sides */
.timeline-item-content-wrapper {
    position: relative;
    width: 50%;
    padding: 0 30px;
    display: flex;
    flex-direction: column;
}

.timeline-item:nth-child(odd) {
    justify-content: flex-start;
}

.timeline-item:nth-child(even) {
    justify-content: flex-end;
}

.timeline-item:nth-child(odd) .timeline-item-content-wrapper {
    align-items: flex-end;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-item-content-wrapper {
    align-items: flex-start;
    text-align: left;
}

/* The Dot */
.timeline-dot {
    position: absolute;
    top: 28px;
    left: 50%; 
    width: 20px;
    height: 20px;
    background: white;
    border: 4px solid var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    box-shadow: 0 0 20px var(--accent-glow);
    transition: transform 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    transform: translate(-50%, -50%) scale(1.4);
    background: var(--accent-color);
    border-color: white;
}

/* The Content Card - 3D Block Style */
.timeline-card {
    background: var(--card-bg);
    color: var(--card-text);
    padding: 2rem;
    border-radius: var(--card-radius);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-bottom: 8px solid #cbd5e1; /* Thick bottom border for depth */
    border-right: 4px solid #cbd5e1;  /* Subtle right thickness */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 
        0 10px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    max-width: 850px;
    width: 100%;
    position: relative;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.timeline-card:hover {
    transform: translateY(-4px) translateX(-2px); /* Move up and left */
    box-shadow: 
        6px 12px 25px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-bottom-color: #94a3b8; /* Darken depth on hover */
    border-right-color: #94a3b8;
    z-index: 10;
}

.timeline-date {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 30px;
    margin-bottom: 1rem;
}

.timeline-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--card-text);
    line-height: 1.2;
}

.timeline-desc {
    font-size: 1rem;
    color: var(--card-text-light);
    line-height: 1.6;
}

.challenge-wrapper {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.challenge-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--card-text);
    font-weight: 700;
}

.challenge-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-top: 4px solid #d1d5db; /* Inner shadow effect via border */
    border-radius: 8px;
    color: var(--card-text);
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.challenge-input:focus {
    outline: none;
    border-color: var(--accent-color);
    border-top-color: #93c5fd;
    background: #fff;
    box-shadow: inset 0 2px 4px rgba(59, 130, 246, 0.1);
}

.challenge-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 44px; /* Slightly taller for 3D buttons */
}

.challenge-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    border-bottom: 4px solid #1e40af; /* Darker shade of accent */
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.1s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
}

.challenge-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.challenge-btn:active {
    transform: translateY(3px);
    border-bottom-width: 1px;
    margin-bottom: 3px; /* visual compensation to keep layout stable-ish or let it dip */
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.reveal-btn {
    background: transparent;
    color: var(--card-text);
    border: 2px solid #cbd5e1;
    border-bottom: 4px solid #cbd5e1;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.1s ease;
    margin-left: 0.5rem;
}

.reveal-btn:hover {
    background: rgba(0,0,0,0.05);
    border-color: #94a3b8;
    transform: translateY(-1px);
}

.reveal-btn:active {
    transform: translateY(3px);
    border-bottom-width: 1px;
    margin-bottom: 3px;
}

.challenge-result {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s;
}

.challenge-result.success {
    color: #10b981; /* Green */
    opacity: 1;
}

.challenge-result.error {
    color: #ef4444; /* Red */
    opacity: 1;
}

.revealed-answers {
    margin-top: 1rem;
    padding: 1rem;
    background: #f1f5f9;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    display: none;
    animation: fadeIn 0.3s ease;
}

.revealed-answers.visible {
    display: block;
}

.revealed-answers h4 {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--card-text-light);
}

.revealed-answers ul {
    list-style: none;
    padding: 0;
}

.revealed-answers li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--card-text);
    font-style: italic;
}

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

.footer {
    text-align: center;
    padding: 6rem 0 4rem;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline-line {
        left: 20px; /* Move line to the left */
        transform: none;
    }

    .timeline-item {
        justify-content: flex-start !important; /* Force all items to align left */
    }

    .timeline-item-content-wrapper {
        width: 100%;
        padding-left: 50px; /* Space for the line */
        padding-right: 0;
        align-items: flex-start !important;
        text-align: left !important;
    }

    /* Adjust dot position for mobile */
    .timeline-dot {
        left: 20px; /* Match line position */
        transform: translate(-50%, -50%);
    }

    .timeline-item:hover .timeline-dot {
        transform: translate(-50%, -50%) scale(1.3);
    }
    
    .timeline-card {
        max-width: 100%;
    }
}

