/* The Lab - Daily AI Experiment Feed */

/* Lab Header */
.lab-header {
    padding: 140px 0 60px;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-white) 100%);
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.lab-badge {
    font-size: 4rem;
    display: block;
    margin-bottom: 16px;
}

.lab-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.lab-tagline {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

.lab-tagline .highlight {
    color: var(--primary);
    font-weight: 600;
}

.lab-meta {
    margin-top: 32px;
}

.lab-activity {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--success);
    color: white;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
}

.pulse {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Lab Search */
.lab-search {
    padding: 32px 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 70px;
    z-index: 10;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 600px;
    margin: 0 auto 20px;
}

.search-icon {
    position: absolute;
    left: 16px;
    font-size: 1.1rem;
    color: var(--text-muted);
    pointer-events: none;
}

#lab-search-input {
    width: 100%;
    padding: 14px 48px 14px 48px;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

#lab-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

#lab-search-input::placeholder {
    color: var(--text-muted);
}

.search-clear {
    position: absolute;
    right: 12px;
    width: 28px;
    height: 28px;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--border);
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.search-clear:hover {
    background: var(--text-muted);
    color: white;
}

.search-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: var(--bg-white);
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

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

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.search-results {
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--text-light);
    min-height: 20px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-content {
    max-width: 400px;
    margin: 0 auto;
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}

.no-results h3 {
    margin-bottom: 8px;
}

.no-results p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* Lab Feed */
.lab-feed {
    padding: 60px 0;
    background: var(--bg);
}

.lab-feed .container {
    max-width: 800px;
}

/* Lab Entry */
.lab-entry {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.lab-entry:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.entry-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 28px 28px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.entry-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    background: var(--primary);
    color: white;
    padding: 12px;
    border-radius: var(--radius);
    text-align: center;
}

.date-day {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.date-month {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 2px 0;
}

.date-year {
    font-size: 0.75rem;
    opacity: 0.8;
}

.entry-title-wrap {
    flex: 1;
    min-width: 0;
}

.entry-title {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
}

.entry-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--border);
    padding: 4px 10px;
    border-radius: 100px;
}

.entry-body {
    padding: 24px 28px 28px;
}

.entry-summary {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.6;
}

.entry-summary p:last-child {
    margin-bottom: 0;
}

.entry-details {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.entry-details h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary);
}

.entry-details h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.entry-details p {
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.6;
}

.entry-details p:last-child {
    margin-bottom: 0;
}

.tools-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
}

.tools-list li {
    background: var(--bg-white);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--text);
}

.entry-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.entry-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-building {
    background: #f0f9ff;
    color: #0369a1;
}

.status-badge.status-testing {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.status-idea {
    background: #f3f4f6;
    color: #4b5563;
}

.status-note {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.entry-link {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
}

.entry-link:hover {
    text-decoration: underline;
}

/* Lab Archive */
.lab-archive {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

.archive-icon {
    font-size: 1.25rem;
    margin-right: 8px;
}

/* Subscribe Section */
.lab-subscribe {
    padding: 80px 0;
    background: var(--bg-white);
    text-align: center;
}

.subscribe-content {
    max-width: 500px;
    margin: 0 auto;
}

.subscribe-content h2 {
    margin-bottom: 12px;
}

.subscribe-content p {
    color: var(--text-light);
    margin-bottom: 28px;
}

.subscribe-options {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.subscribe-or {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 640px) {
    .lab-header {
        padding: 120px 0 40px;
    }
    
    .lab-header h1 {
        font-size: 2.5rem;
    }
    
    .lab-tagline {
        font-size: 1.1rem;
    }
    
    .entry-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 24px;
    }
    
    .entry-date {
        flex-direction: row;
        min-width: auto;
        padding: 8px 16px;
        gap: 6px;
    }
    
    .date-day {
        font-size: 1.25rem;
    }
    
    .entry-title {
        font-size: 1.2rem;
    }
    
    .entry-body {
        padding: 20px 24px 24px;
    }
    
    .entry-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .subscribe-options {
        flex-direction: column;
    }
    
    .subscribe-or {
        display: none;
    }
}

/* Nav Active State */
.nav-links a.active {
    color: var(--primary);
    font-weight: 500;
}

/* Lab Post Page Styles */
.lab-post-header {
    padding: 120px 20px 40px;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-white) 100%);
    border-bottom: 1px solid var(--border);
}

.lab-breadcrumbs {
    margin-bottom: 24px;
}

.lab-breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.lab-breadcrumbs a:hover {
    text-decoration: underline;
}

.lab-post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.lab-post-meta .entry-date {
    position: static;
    flex-direction: row;
    min-width: auto;
    padding: 8px 16px;
    gap: 6px;
}

.lab-post-meta .entry-category {
    background: var(--bg);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lab-post-meta .entry-badge {
    background: var(--secondary);
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.lab-post-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    line-height: 1.2;
}

.lab-post-summary {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
    max-width: 700px;
}

.lab-post-decoration {
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    margin-top: 40px;
}

.lab-post-content {
    padding: 60px 20px;
    background: var(--bg-white);
}

.lab-post-content .container {
    max-width: 800px;
}

.lab-post-content .post-body {
    padding: 0 20px;
}

.lab-post-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin: 40px 0 16px;
}

.lab-post-content h3:first-child {
    margin-top: 0;
}

.lab-post-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 28px 0 12px;
}

.lab-post-content p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 16px;
}

.lab-post-content ul {
    margin: 16px 0;
    padding-left: 24px;
}

.lab-post-content li {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 8px;
}

.lab-post-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.lab-post-content ol li {
    margin-bottom: 12px;
}

.lab-post-content pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 20px 0;
}

.lab-post-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--primary);
}

.lab-post-content blockquote {
    background: var(--bg);
    border-left: 4px solid var(--secondary);
    padding: 20px 24px;
    margin: 24px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-light);
}

.lab-post-content blockquote br {
    display: block;
    margin: 8px 0;
}

.lab-post-content .tools-list {
    background: var(--bg);
    padding: 20px 20px 20px 44px;
    border-radius: 8px;
    list-style: disc;
}

.tutorial-section {
    background: var(--bg);
    padding: 28px;
    border-radius: 12px;
    margin: 24px 0;
}

.tutorial-section h4 {
    margin-top: 0;
    color: var(--primary);
}

.tutorial-section > p {
    margin-top: 12px;
}

.workflow-nodes {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 16px;
}

.workflow-nodes h5 {
    font-size: 1rem;
    font-weight: 600;
    margin: 20px 0 8px;
    color: var(--text);
}

.workflow-nodes h5:first-child {
    margin-top: 0;
}

.workflow-nodes ul {
    margin: 8px 0;
    padding-left: 20px;
}

.workflow-nodes li {
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.insight-box {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    padding: 28px;
    border-radius: 12px;
    margin: 28px 0;
}

.insight-box h4 {
    color: white;
    margin-top: 0;
    font-size: 1.2rem;
}

.insight-box p {
    color: rgba(255,255,255,0.95);
    margin-bottom: 0;
}

.status-box {
    margin: 24px 0;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}
