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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    color: #1d1d1f;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header - Simplified */
header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 2.5rem;
    color: #1d1d1f;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

header p {
    font-size: 1rem;
    color: #86868b;
    font-weight: 400;
}

/* Newspaper Pane - Main Container */
.newspaper-pane {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin: 0 auto;
    max-width: 800px;
}

/* Content sections */
.content-section {
    min-height: 400px;
}

.hidden {
    display: none !important;
}

/* Landing */
#landing {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    padding: 60px 40px;
    gap: 40px;
}

/* About Pulse */
.about-pulse {
    max-width: 600px;
    width: 100%;
}

.about-section {
    margin-bottom: 32px;
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.about-section p {
    font-size: 0.95rem;
    color: #6e6e73;
    line-height: 1.6;
}

.steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.steps-list li {
    font-size: 0.95rem;
    color: #6e6e73;
    margin-bottom: 8px;
    padding-left: 24px;
    position: relative;
}

.steps-list li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #007AFF;
    font-weight: 600;
}

.steps-list strong {
    color: #1d1d1f;
    font-weight: 600;
}

.sources-list {
    font-size: 0.85rem;
    color: #86868b;
    line-height: 1.8;
}

.tech-info {
    padding-top: 16px;
    border-top: 1px solid #E5E5E7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.tech-info p {
    font-size: 0.9rem;
    margin: 0;
    color: #6e6e73;
}

.tech-info a {
    color: #007AFF;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.tech-info a:hover {
    color: #0056CC;
    text-decoration: underline;
}

.free-badge {
    color: #34C759;
    font-weight: 600;
}

/* Buttons */
.pulse-button {
    background: #007AFF;
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.pulse-button:hover {
    background: #0056CC;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
}

.pulse-button.secondary {
    background: #8E8E93;
    font-size: 1rem;
    padding: 12px 24px;
    margin-top: 32px;
}

.pulse-button.secondary:hover {
    background: #6D6D70;
}

/* Processing */
#processing {
    text-align: center;
    padding: 80px 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 24px;
    border: 3px solid #F2F2F7;
    border-top: 3px solid #007AFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.status-message {
    font-size: 1.1rem;
    color: #86868b;
    margin-bottom: 24px;
    font-weight: 500;
}

.progress-bar {
    width: 300px;
    height: 6px;
    background-color: #F2F2F7;
    border-radius: 3px;
    margin: 0 auto;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007AFF, #5856D6);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

/* Results Layout */
#results {
    padding: 0;
}

.timestamp {
    text-align: center;
    color: #86868b;
    margin-bottom: 32px;
    font-size: 0.9rem;
    padding: 20px;
    border-bottom: 1px solid #F2F2F7;
}


/* Section Containers */
.section-container {
    padding: 40px;
    border-bottom: 1px solid #E5E5E7;
    background: white;
}

.section-container:last-child {
    border-bottom: none;
}

/* Top Stories Section */
.top-stories h2 {
    border-left: 3px solid #007AFF;
    padding-left: 12px;
}

/* World Stories Section */
.world-stories h2 {
    border-left: 3px solid #34C759;
    padding-left: 12px;
}

/* Market Stories Section */
.market-stories h2 {
    border-left: 3px solid #FF9500;
    padding-left: 12px;
}

/* Section Headers */
section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Story Cards */
.story {
    background: white;
    padding: 24px;
    margin-bottom: 16px;
    border-radius: 8px;
    border: 1px solid #E5E5E7;
    transition: all 0.2s ease;
}

.story:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #C7C7CC;
}

.story:last-child {
    margin-bottom: 0;
}

.story h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1d1d1f;
    line-height: 1.3;
}

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

.importance-score {
    display: inline-block;
    padding: 4px 12px;
    background-color: rgba(0, 122, 255, 0.1);
    color: #007AFF;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(0, 122, 255, 0.2);
}

.sources {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.source-tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #1d1d1f;
    text-decoration: none;
    transition: all 0.2s ease;
}

.source-tag:hover {
    background-color: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

.story-reasoning {
    color: #86868b;
    font-size: 0.9rem;
    margin-top: 8px;
    line-height: 1.5;
}

.story-link {
    display: inline-block;
    margin-top: 12px;
    color: #007AFF;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

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

/* World Stories Regions */
.region {
    margin-bottom: 32px;
}

.region:last-child {
    margin-bottom: 0;
}

.region h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1d1d1f;
    padding-left: 12px;
    border-left: 3px solid #34C759;
}

.region .story {
    margin-left: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    header h1 {
        font-size: 2rem;
    }

    .newspaper-pane {
        border-radius: 12px;
        margin: 0 8px;
    }

    #landing {
        padding: 40px 24px;
        gap: 32px;
    }

    .about-pulse {
        max-width: 100%;
    }

    .about-section {
        margin-bottom: 24px;
    }

    .about-section h3 {
        font-size: 1rem;
    }

    .about-section p {
        font-size: 0.9rem;
    }

    .sources-list {
        font-size: 0.8rem;
    }

    .tech-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .section-container {
        padding: 24px;
    }
    
    .main-headline {
        padding: 24px;
    }
    
    .main-story h3 {
        font-size: 1.8rem;
    }
    
    .pulse-button {
        padding: 14px 28px;
        font-size: 1rem;
    }
    
    .progress-bar {
        width: 250px;
    }
    
    section h2 {
        font-size: 1.3rem;
    }
    
    .story h3 {
        font-size: 1.1rem;
    }
    
    .story-meta {
        gap: 8px;
    }
}