/* Index Page - HackerNews Inspired Compact Design */

.main-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-lg) var(--spacing-xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Hero Section - More Compact */
.hero-section {
    text-align: center;
    padding: var(--spacing-lg) var(--spacing-md);
    background: var(--pure-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-grey);
    margin-bottom: var(--spacing-md);
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 14px;
    color: var(--text-grey);
    font-weight: 400;
    max-width: 500px;
    margin: 0 auto var(--spacing-md);
    line-height: 1.4;
}

/* Search Container - Compact */
.search-container {
    background: var(--pure-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-grey);
    box-shadow: var(--shadow-sm);
}

.search-input-container {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    align-items: stretch;
}

.search-input {
    flex-grow: 1;
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 15px;
    font-weight: 400;
    border: 2px solid var(--border-grey);
    border-radius: var(--radius-md);
    outline: none;
    background: var(--light-grey);
    transition: all 0.2s ease;
    font-family: var(--font-primary);
}

.search-input:focus {
    border-color: var(--accent-orange);
    background: var(--pure-white);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.search-input::placeholder {
    color: var(--subtle-grey);
    font-weight: 400;
}

.analyse-button {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-gold));
    color: var(--pure-white);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
    letter-spacing: 0.01em;
    min-width: 120px;
}

.analyse-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.analyse-button:active {
    transform: translateY(0);
}

.analyse-button:disabled {
    background: var(--subtle-grey);
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--shadow-sm);
}

/* LLM Selector - More Sophisticated */
.llm-selector {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--light-grey);
    border-radius: var(--radius-md);
    border: 1px solid var(--medium-grey);
}

.analyze-label {
    font-size: 12px;
    color: var(--text-grey);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.llm-button {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border-grey);
    background: var(--pure-white);
    color: var(--text-grey);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.llm-button:hover {
    border-color: var(--accent-orange);
    color: var(--primary-black);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.llm-button.active {
    background: var(--primary-black);
    color: var(--pure-white);
    border-color: var(--primary-black);
    box-shadow: var(--shadow-sm);
}

/* Feed Container - HackerNews Style */
.feed-container {
    background: var(--pure-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-grey);
    overflow: hidden;
}

.feed-header {
    background: var(--light-grey);
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-grey);
}

.feed-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-black);
    margin-bottom: var(--spacing-xs);
}

.feed-subtitle {
    font-size: 12px;
    color: var(--text-grey);
    font-weight: 400;
}

/* Analysis Cards - HackerNews Style Compact */
.analysis-card {
    background: var(--pure-white);
    padding: var(--spacing-sm) var(--spacing-lg);
    cursor: pointer;
    transition: background-color 0.1s ease;
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    border-bottom: 1px solid var(--light-grey);
    position: relative;
    min-height: 56px;
}

.analysis-card:hover {
    background: var(--off-white);
}

.analysis-card:last-child {
    border-bottom: none;
}

.accuracy-badge {
    background: var(--truth-high);
    color: var(--pure-white);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 1px;
}

.accuracy-badge.medium {
    background: var(--truth-medium);
}

.accuracy-badge.low {
    background: var(--truth-low);
}

.accuracy-badge.false {
    background: var(--truth-false);
}

.card-content {
    flex: 1;
    min-width: 0;
}

/* Card Screenshots - Smaller */
.card-screenshot {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-grey);
    flex-shrink: 0;
    margin-top: 1px;
}

.card-screenshot-placeholder {
    width: 40px;
    height: 40px;
    background: var(--medium-grey);
    border: 1px solid var(--border-grey);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--subtle-grey);
    font-size: 8px;
    font-weight: 600;
    text-align: center;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Card Header - Compact */
.card-header {
    margin-bottom: var(--spacing-xs);
}

.card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-black);
    margin-bottom: 1px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-url {
    color: var(--subtle-grey);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-summary {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-grey);
    margin-bottom: var(--spacing-xs);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 400;
}

/* Composition Overview - Compact */
.composition-overview {
    margin-bottom: var(--spacing-xs);
}

.composition-bar-container {
    margin-bottom: var(--spacing-xs);
}

.composition-bar {
    display: flex;
    height: 3px;
    border-radius: 2px;
    overflow: hidden;
    background: var(--light-grey);
    margin-bottom: var(--spacing-xs);
}

.bar-factual {
    background: var(--truth-high);
}

.bar-emotive {
    background: var(--emotive-color);
}

.bar-opinion {
    background: var(--opinion-color);
}

.components-legend {
    display: flex;
    gap: var(--spacing-sm);
    font-size: 10px;
    font-weight: 500;
    flex-wrap: wrap;
}

.legend-factual {
    color: var(--truth-high);
}

.legend-emotive {
    color: var(--emotive-color);
}

.legend-opinion {
    color: var(--opinion-color);
}

/* Card Meta - HackerNews Style */
.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    color: var(--subtle-grey);
    font-weight: 400;
    margin-top: var(--spacing-xs);
}

/* Load More Button */
.load-more-button {
    background: var(--pure-white);
    border: 2px solid var(--accent-orange);
    color: var(--accent-orange);
    padding: var(--spacing-lg) var(--spacing-xl);
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    margin: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    letter-spacing: 0.01em;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
}

.load-more-button:hover {
    background: var(--accent-orange);
    color: var(--pure-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.load-more-button:active {
    transform: translateY(0);
}

.load-more-button:disabled {
    background: var(--light-grey);
    border-color: var(--medium-grey);
    color: var(--subtle-grey);
    cursor: not-allowed;
    transform: none;
}

/* Empty State */
.empty-feed {
    text-align: center;
    padding: var(--spacing-2xl);
    background: var(--pure-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.empty-feed h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-black);
}

.empty-feed p {
    font-size: 14px;
    color: var(--text-grey);
    line-height: 1.5;
}

/* Stats Summary - New Addition */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    background: var(--pure-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-grey);
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-black);
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: 12px;
    color: var(--text-grey);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        padding: var(--spacing-md) var(--spacing-md) var(--spacing-xl);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 13px;
    }
    
    .search-input-container {
        flex-direction: column;
    }
    
    .analyse-button {
        width: 100%;
    }
    
    .analysis-card {
        padding: var(--spacing-sm);
        flex-wrap: wrap;
    }
    
    .accuracy-badge {
        order: -1;
        margin-bottom: var(--spacing-xs);
    }
    
    .card-screenshot, .card-screenshot-placeholder {
        width: 32px;
        height: 32px;
    }
    
    .card-meta {
        flex-direction: column;
        gap: 2px;
        align-items: flex-start;
    }
    
    .components-legend {
        gap: var(--spacing-xs);
    }
    
    .load-more-button {
        margin: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-xl);
        gap: var(--spacing-md);
    }
    
    .hero-section {
        padding: var(--spacing-md);
    }
    
    .hero-title {
        font-size: 1.25rem;
    }
    
    .search-container {
        padding: var(--spacing-md);
    }
    
    .search-input {
        padding: var(--spacing-sm);
        font-size: 14px;
    }
    
    .analyse-button {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 14px;
    }
    
    .llm-selector {
        flex-wrap: wrap;
        gap: var(--spacing-xs);
    }
    
    .analysis-card {
        padding: var(--spacing-xs) var(--spacing-sm);
        min-height: 48px;
    }
    
    .card-title {
        font-size: 13px;
    }
    
    .card-summary {
        font-size: 11px;
    }
    
    .accuracy-badge {
        font-size: 10px;
        padding: 1px 4px;
    }
}