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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.detail-container {
    max-width: 1000px;
}

/* Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    color: #1a1a2e;
    font-size: 1.8rem;
}

.btn-link {
    color: #4a90d9;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid #4a90d9;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-link:hover {
    background-color: #4a90d9;
    color: white;
}

.back-link {
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: #4a90d9;
}

/* Filter Section */
.filter-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-section label {
    font-weight: 600;
    color: #444;
}

.filter-section select {
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    min-width: 150px;
    cursor: pointer;
}

.filter-section select:focus {
    outline: none;
    border-color: #4a90d9;
}

/* Results List */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.result-card {
    background: white;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.category-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.category-market {
    background-color: #e3f2fd;
    color: #1565c0;
}

.category-company {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.category-industry {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.analysis-date {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
}

.card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-info {
    display: flex;
    gap: 16px;
    color: #666;
    font-size: 0.9rem;
}

.card-timestamp {
    color: #999;
    font-size: 0.85rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.empty-state p {
    color: #666;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    background-color: #4a90d9;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #3a7bc8;
}

/* Detail Page */
.detail-header {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 24px;
}

.detail-title {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.detail-title h1 {
    font-size: 1.5rem;
    color: #1a1a2e;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #666;
    font-size: 0.9rem;
}

.meta-item strong {
    color: #444;
}

/* Result Content */
.result-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.result-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #333;
}

/* Markdown-like styling for result text */
.result-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px 16px;
    }

    .page-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .card-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .detail-meta {
        flex-direction: column;
        gap: 8px;
    }

    .result-content {
        padding: 20px;
    }
}
