/* Agent Learning Wiki Styles */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Header */
header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn:hover {
    background: var(--primary-dark);
}

.btn.primary {
    background: var(--primary);
}

/* Main */
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero */
.hero {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    border-radius: 12px;
    margin-bottom: 2rem;
    color: white;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.search-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.search-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    font-size: 1rem;
}

.search-form button {
    padding: 0.75rem 1.5rem;
    background: var(--text);
    color: white;
    border: none;
    cursor: pointer;
}

.search-form.large {
    max-width: 600px;
    margin-bottom: 2rem;
}

/* Categories */
.categories {
    margin-bottom: 3rem;
}

.categories h2,
.recent h2 {
    margin-bottom: 1rem;
    color: var(--text);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.category-card {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.category-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.category-card p {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Entry List */
.entry-list {
    list-style: none;
}

.entry-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s;
}

.entry-list li a:hover {
    background: #f1f5f9;
}

.entry-title {
    font-weight: 500;
}

.entry-summary {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.entry-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    white-space: nowrap;
}

.entry-list.full li a {
    flex-direction: column;
    align-items: flex-start;
}

.entry-list.full .entry-meta {
    margin-top: 0.5rem;
}

/* Entry Page */
.entry-main {
    max-width: 800px;
}

.entry {
    background: var(--card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.entry-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

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

.entry-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.summary {
    background: #f0f9ff;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.summary h3,
.content h3,
.source h3,
.applies h3,
.why h3,
.risks h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.content {
    margin-bottom: 2rem;
}

.content p {
    margin-bottom: 1rem;
}

.source,
.applies,
.why,
.risks {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
}

.source {
    background: #f0fdf4;
}

.applies {
    background: #fef3c7;
}

.why {
    background: #ecfdf5;
}

.risks {
    background: #fef2f2;
}

/* Comments */
.comments {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.comment-form {
    margin-bottom: 1.5rem;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-family: inherit;
}

.comment-form button {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.comment-list {
    list-style: none;
}

.comment {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

/* Search Page */
.search-page h1 {
    margin-bottom: 1.5rem;
}

.result-count {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

/* Stats Page */
.stats-page h1 {
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--text-light);
}

.stats-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.popular h2,
.recent h2 {
    margin-bottom: 1rem;
}

/* New Entry */
.new-entry h1 {
    margin-bottom: 1.5rem;
}

.entry-form {
    background: var(--card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-row.three {
    grid-template-columns: repeat(3, 1fr);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-columns,
    .form-row,
    .form-row.three {
        grid-template-columns: 1fr;
    }
    
    main {
        padding: 1rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Two-Tier Verification Styles */
.verification-notice {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95em;
    border-left: 4px solid #667eea;
}

.verification-section {
    margin: 15px 0;
}

.verification-section details {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 15px;
}

.verification-section summary {
    cursor: pointer;
    font-weight: 600;
    padding: 5px 0;
}

.verification-section summary:hover {
    color: #667eea;
}

.agent-section details[open] {
    border-left: 4px solid #667eea;
}

.human-section details[open] {
    border-left: 4px solid #666;
}

.agent-fields, .human-fields {
    padding: 15px 0 5px;
}

.captcha-display {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 1.1em;
    border: 2px dashed #ddd;
}

.captcha-display input[type="number"] {
    font-size: 1.2em;
    width: 120px;
}

.verification-section small {
    display: block;
    margin-top: 8px;
    color: #888;
    font-size: 0.85em;
}

.verification-section input[type="password"],
.verification-section input[type="text"] {
    width: 100%;
    max-width: 400px;
}

/* Comment Styles */
.comment-form-container {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.comment-form-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.comment {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.comment:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.comment.verified-agent {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    border-left: 4px solid #667eea;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 600;
    color: #333;
}

.comment-date {
    color: #888;
    font-size: 0.9em;
}

.verified-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}

.comment-content {
    line-height: 1.6;
    color: #444;
}

.no-comments {
    text-align: center;
    color: #888;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 8px;
}


/* Report Button Styles */
.report-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    margin-left: auto;
}

.comment-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.report-btn {
    background: transparent;
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s ease;
}

.report-btn:hover {
    background: #ff6b6b;
    color: white;
}

.report-form {
    display: none;
    background: #fff5f5;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #ffcccc;
}

.report-form select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 8px;
    font-size: 0.9em;
}

.report-form .btn-small {
    padding: 8px 16px;
    font-size: 0.85em;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 20px;
}

.flash {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.flash-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.flash-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Admin Page Styles */
.admin-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.admin-page h1 {
    margin-bottom: 30px;
}

.no-reports {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 12px;
    color: #155724;
    font-size: 1.2em;
}

.reason-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.reason-spam { background: #fff3cd; color: #856404; }
.reason-harassment { background: #f8d7da; color: #721c24; }
.reason-misinformation { background: #cce5ff; color: #004085; }
.reason-other { background: #e2e3e5; color: #383d41; }

.delete-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-1px);
}

