/* 6GC Forum Archive - Page-Specific Styles */

/* Dashboard/Data Explorer Styles */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.tool-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.2s;
}

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

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

.tool-card .description {
    color: #666;
    margin-bottom: 1rem;
}

.tool-button {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.tool-button:hover {
    background: #234a87;
    color: white;
}

.results-area {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    margin-top: 1rem;
    min-height: 200px;
    overflow-x: auto;
}

.loading {
    text-align: center;
    color: #666;
}

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

.stat-box {
    background: var(--accent-color);
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Browse Page Styles */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.category-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s;
}

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

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

.category-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.category-stats span {
    background: var(--accent-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.subcategory-list {
    list-style: none;
    margin: 1rem 0;
}

.subcategory-list li {
    margin: 0.5rem 0;
}

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

.subcategory-list a:hover {
    text-decoration: underline;
}

.topic-list {
    margin: 2rem 0;
}

.topic-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.topic-row:hover {
    background: var(--accent-color);
}

.topic-info {
    flex: 1;
}

.topic-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

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

.topic-title a:hover {
    text-decoration: underline;
}

.topic-meta {
    font-size: 0.9rem;
    color: #666;
}

.topic-stats {
    text-align: right;
    font-size: 0.9rem;
    color: #666;
}

/* Analysis/Content Quality Indicators */
.analysis-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
}

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

.stat-large {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-small {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

.progress-bar {
    background: #f0f0f0;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-fill {
    background: var(--primary-color);
    height: 100%;
    transition: width 0.3s;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: var(--accent-color);
    font-weight: 600;
}

.quality-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.quality-good {
    background: #28a745;
}

.quality-warning {
    background: #ffc107;
}

.quality-poor {
    background: #dc3545;
}

/* Topic Page Styles */
.topic-header {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.topic-header h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.topic-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
    flex-wrap: wrap;
}

.topic-meta span {
    background: var(--accent-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.posts-container {
    margin: 2rem 0;
}

.post {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.post-header {
    background: var(--accent-color);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.post-author {
    font-weight: 600;
    color: var(--primary-color);
}

.post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.post-content {
    padding: 1.5rem;
    line-height: 1.6;
}

.post-signature {
    padding: 0 1.5rem 1rem;
    color: #666;
    font-size: 0.9rem;
}

.topic-footer {
    text-align: center;
    margin: 2rem 0;
}

.back-button {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
}

.back-button:hover {
    background: #234a87;
    color: white;
}

/* phpBB-Style Forum Layout */
.forum-container {
    margin: 0;
}

.forum-category {
    background: #2a2a2a;
    border: 1px solid #404040;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.category-header {
    background: linear-gradient(90deg, var(--castrol-green), #008A44);
    color: var(--racing-white);
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--castrol-red);
}

.forum-table {
    width: 100%;
    border-collapse: collapse;
}

.forum-row {
    border-bottom: 1px solid #404040;
    transition: background-color 0.2s;
    background: #2a2a2a;
}

.forum-row:hover {
    background: #353535;
}

.forum-row:last-child {
    border-bottom: none;
}

.forum-cell {
    padding: 1rem 1.5rem;
    vertical-align: top;
    color: #e0e0e0;
}

.forum-icon {
    width: 60px;
    text-align: center;
    font-size: 2rem;
    background: linear-gradient(45deg, var(--castrol-green), #008A44);
    border-radius: 8px;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    color: var(--racing-white);
    font-weight: 700;
}

.forum-info {
    flex: 1;
}

.forum-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.forum-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 600;
}

.forum-title a:hover {
    color: var(--castrol-green);
}

.forum-description {
    color: #b0b0b0;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.forum-stats {
    display: flex;
    gap: 2rem;
    text-align: center;
    min-width: 120px;
}

.stat-box {
    text-align: center;
    min-width: 60px;
}

.stat-number {
    font-weight: 700;
    color: #ffffff;
    font-size: 1.1rem;
}

.stat-label {
    font-size: 0.8rem;
    color: #a0a0a0;
    margin-top: 0.25rem;
    font-weight: 500;
}

.forum-latest {
    min-width: 200px;
    text-align: right;
    color: #999;
    font-size: 0.85rem;
}

.latest-topic {
    color: var(--racing-white);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.latest-topic a {
    color: var(--racing-white);
    text-decoration: none;
}

.latest-topic a:hover {
    color: var(--castrol-green);
}

.latest-author {
    color: #999;
}

/* Recent Topics Section */
.recent-topics-section {
    background: #2a2a2a;
    border: 1px solid #404040;
    border-radius: 8px;
    margin-top: 2rem;
}

.recent-topics-header {
    background: linear-gradient(90deg, var(--castrol-red), #C41530);
    color: var(--racing-white);
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.recent-topic-item {
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #404040;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
    background: #2a2a2a;
}

.recent-topic-item:hover {
    background: #353535;
}

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

.recent-topic-info {
    flex: 1;
}

.recent-topic-title {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.recent-topic-title:hover {
    color: var(--castrol-green);
}

.recent-topic-meta {
    color: #b0b0b0;
    font-size: 0.85rem;
}

/* Enhanced Search Interface */
.search-results-header {
    background: #2a2a2a;
    border: 1px solid #404040;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.search-results-header h2 {
    color: var(--racing-white);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.search-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.results-count {
    color: #e0e0e0;
}

.search-method {
    background: var(--castrol-green);
    color: var(--racing-white);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.8rem;
}

.search-timing {
    color: #999;
    font-style: italic;
}

.search-tips {
    width: 100%;
    margin-top: 1rem;
    background: #1a1a1a;
    border-radius: 6px;
    padding: 1rem;
}

.search-tips h4 {
    color: var(--castrol-green);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.search-tips ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-tips li {
    color: #b0b0b0;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.search-tips li:before {
    content: "▸";
    color: var(--castrol-green);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.search-tips strong {
    color: var(--racing-white);
    background: #333;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
}

/* Enhanced Topic Cards */
.topic-card {
    background: #2a2a2a;
    border: 1px solid #404040;
    border-left: 4px solid var(--castrol-green);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
    position: relative;
}

.topic-card:hover {
    background: #333;
    border-left-color: var(--castrol-red);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,166,81,0.15);
}

.topic-title {
    margin-bottom: 1rem;
}

.topic-title h3 {
    margin: 0;
}

.topic-title a {
    color: var(--racing-white);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
}

.topic-title a:hover {
    color: var(--castrol-green);
}

.topic-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #b0b0b0;
    margin-bottom: 1rem;
}

.topic-meta span {
    background: #1a1a1a;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    border: 1px solid #404040;
}

.topic-preview {
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.5;
    background: #1a1a1a;
    padding: 1rem;
    border-radius: 6px;
    border-left: 3px solid var(--castrol-green);
}

/* No Results Styling */
.no-results {
    text-align: center;
    padding: 3rem;
    background: #2a2a2a;
    border: 1px solid #404040;
    border-radius: 8px;
    color: #b0b0b0;
}

.no-results h3 {
    color: var(--castrol-red);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.no-results a {
    color: var(--castrol-green);
    text-decoration: none;
}

.no-results a:hover {
    text-decoration: underline;
}

/* Responsive adjustments for page-specific styles */
@media (max-width: 768px) {
    .dashboard-grid,
    .category-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .topic-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .topic-stats {
        text-align: left;
    }

    .category-stats {
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-group input,
    .form-group select {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .topic-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.25rem;
    }

    .search-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .search-tips {
        margin-top: 1rem;
    }

    .topic-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}