/* 6GC Forum Archive - Castrol TOM'S Theme */
:root {
    /* Castrol TOM'S Racing Colors */
    --castrol-green: #00A651;
    --castrol-red: #E31837;
    --racing-white: #FFFFFF;
    --carbon-black: #1A1A1A;
    --silver: #C0C0C0;
    --racing-yellow: #FFD700;

    /* Derived Colors */
    --primary-color: var(--castrol-green);
    --accent-color: var(--castrol-red);
    --text-color: var(--carbon-black);
    --light-bg: #F8F9FA;
    --border-color: #E0E0E0;
    --shadow-color: rgba(26, 26, 26, 0.1);
}

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

body {
    font-family: 'Segoe UI', 'Arial', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--racing-white);
    background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--carbon-black);
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0,166,81,0.2);
    display: flex;
    flex-direction: column;
}

/* Racing Header with Theme Integration */
.main-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
    position: relative;
    padding: 1rem 2rem 1.5rem 2rem;
    border-bottom: 4px solid var(--castrol-green);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Header Top Row - New Layout */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0;
}

.header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.header-logo {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.header-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.header-logo a:hover {
    transform: scale(1.05);
}

.header-logo a:hover .site-logo {
    filter: drop-shadow(0 4px 8px rgba(0,166,81,0.4));
}

.site-logo {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transition: all 0.3s ease;
}

.subtitle {
    color: #999;
    font-size: 0.85rem;
    margin: 0;
    text-align: left;
}

/* Main Navigation */
.main-navigation {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: #ccc;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-link:hover {
    color: var(--racing-white);
    background: rgba(0, 166, 81, 0.1);
    border-color: rgba(0, 166, 81, 0.3);
    text-decoration: none;
}

.nav-link.active {
    color: var(--racing-white);
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid var(--racing-yellow);
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

/* Responsive Header */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .header-left {
        align-items: center;
    }

    .header-right {
        align-items: center;
        gap: 0.8rem;
    }

    .main-navigation {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .header-search {
        max-width: 300px;
    }
}

/* Racing-inspired Navigation */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 1rem 0;
    background: var(--carbon-black);
    border-radius: 30px;
    padding: 4px;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.nav-link {
    color: var(--racing-white);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 26px;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
    background: transparent;
}

.nav-link:hover {
    background: var(--castrol-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,166,81,0.3);
}

.nav-link.active {
    background: rgba(255, 215, 0, 0.1);
    color: var(--racing-white);
    border: 2px solid var(--racing-yellow);
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.4);
}

/* Header Search Bar */
.header-search {
    max-width: 400px;
    margin: 0;
}

.header-search form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: #1a1a1a;
    padding: 4px;
    border-radius: 25px;
    border: 1px solid #404040;
}

.search-input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    outline: none;
    background: transparent;
    color: var(--racing-white);
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    background: var(--castrol-green);
    color: var(--racing-white);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.search-btn:hover {
    background: #008A44;
    transform: scale(1.05);
}

.clear-search {
    color: var(--castrol-red);
    text-decoration: none;
    padding: 0.3rem 0.6rem;
    margin-left: 0.5rem;
    border-radius: 50%;
    background: #2a2a2a;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.2s;
    border: 1px solid #404040;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.clear-search:hover {
    background: var(--castrol-red);
    color: var(--racing-white);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    background: var(--carbon-black);
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    margin: 1rem 0;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb-nav a {
    color: var(--castrol-green);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-nav a:hover {
    text-decoration: underline;
}

.breadcrumb-nav span {
    color: #666;
}

/* Dark Topic Cards with Racing Stripe Accent */
.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 {
    box-shadow: 0 8px 25px rgba(0,166,81,0.15);
    border-left-color: var(--castrol-red);
    transform: translateY(-2px);
    background: #333;
}

.topic-title a {
    color: var(--racing-white);
    text-decoration: none;
    font-size: 1.25rem;
    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: #ccc;
    margin: 0.75rem 0;
}

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

/* Dark Posts Styling */
.post {
    background: #2a2a2a;
    border: 1px solid #404040;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    background: linear-gradient(90deg, #1a1a1a 0%, rgba(0,166,81,0.15) 100%);
    border-bottom: 2px solid var(--castrol-green);
}

.post-author strong {
    color: var(--castrol-green);
    font-size: 1.1rem;
}

.post-author small {
    color: #999;
}

.post-number {
    background: var(--castrol-red);
    color: var(--racing-white);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
}

.post-content {
    padding: 1.5rem;
    line-height: 1.7;
    color: #ddd;
}

/* Racing-inspired Buttons */
.tool-button, .back-button {
    background: linear-gradient(135deg, var(--castrol-green), #008A44);
    color: var(--racing-white);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 25px;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0,166,81,0.2);
}

.tool-button:hover, .back-button:hover {
    background: linear-gradient(135deg, var(--castrol-red), #C41530);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(227,24,55,0.3);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.page-link {
    color: var(--castrol-green);
    background: var(--racing-white);
    border: 2px solid var(--castrol-green);
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.page-link:hover {
    background: var(--castrol-green);
    color: var(--racing-white);
}

.page-current {
    background: var(--castrol-red);
    color: var(--racing-white);
    border: 2px solid var(--castrol-red);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 700;
}

/* Footer with Racing Theme */
.main-footer {
    background: var(--carbon-black);
    color: var(--racing-white);
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h4 {
    color: var(--castrol-green);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-section a {
    color: var(--racing-white);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--castrol-green);
}

.footer-bottom {
    background: #0A0A0A;
    padding: 1rem 2rem;
    text-align: center;
    border-top: 2px solid var(--castrol-green);
    font-size: 0.9rem;
    color: #999;
}

/* Forum Icon Styling */
.forum-icon {
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.forum-cell a .forum-icon {
    cursor: pointer;
}

.forum-cell a:hover .forum-icon {
    background: rgba(0, 166, 81, 0.1);
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-header {
        padding: 1rem;
    }

    .header-content h1 {
        font-size: 1.8rem;
        flex-direction: column;
        text-align: center;
    }

    .site-logo {
        margin-bottom: 0.5rem;
        margin-right: 0;
    }

    .main-nav {
        flex-direction: column;
        gap: 0.5rem;
        border-radius: 15px;
    }

    .nav-link {
        text-align: center;
        border-radius: 12px;
    }

    .main-content {
        padding: 1rem;
    }

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

    .post-header {
        flex-direction: column;
        gap: 1rem;
    }
}