/* Doctrine - Stylesheet */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #1a202c;
    background: #f7fafc;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.tagline {
    opacity: 0.95;
    font-size: 1.1rem;
}

.privacy-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 4px solid #667eea;
}

.stat-label {
    color: #718096;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
}

.search-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.search-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.search-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    color: #718096;
    font-size: 1rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.search-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
}

.search-mode {
    display: none;
}

.search-mode.active {
    display: block;
}

.search-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #667eea;
}

.search-tips {
    margin-top: 1rem;
    padding: 1rem;
    background: #edf2f7;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #4a5568;
}

.results {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.result-item {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item:hover {
    background: #f7fafc;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
}

.decision-number {
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
}

.decision-date {
    color: #718096;
    font-size: 0.9rem;
}

.case-name {
    color: #2d3748;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.snippet {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.6;
}

.snippet mark {
    background: #fef3c7;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
}

.actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102,126,234,0.3);
}

.btn-ai {
    background: #48bb78;
    color: white;
}

.btn-ai:hover {
    background: #38a169;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(72,187,120,0.3);
}

.loading {
    text-align: center;
    padding: 3rem;
    color: #718096;
}

.spinner {
    border: 3px solid #e2e8f0;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.no-results {
    text-align: center;
    padding: 3rem;
    color: #718096;
}

.synthesis-result {
    background: #f0fff4;
    border-left: 4px solid #48bb78;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.synthesis-result h3 {
    color: #22543d;
    margin-bottom: 1rem;
}

.ai-badge {
    display: inline-block;
    background: #48bb78;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header {
        padding: 1.5rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .search-tabs {
        flex-direction: column;
        gap: 0;
    }
    
    .search-tab {
        border-bottom: 1px solid #e2e8f0;
        border-left: 3px solid transparent;
    }
    
    .search-tab.active {
        border-bottom-color: #e2e8f0;
        border-left-color: #667eea;
    }
}
