/* Cfx.re Forum Style - Dark Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cfx.re Colors */
    --cfx-purple: #9b59b6;
    --cfx-purple-hover: #8e44ad;
    --cfx-green: #27ae60;
    --cfx-green-hover: #229954;
    --cfx-blue: #3498db;
    --cfx-red: #8B0000;
    --cfx-red-blood: #FF0000;
    --cfx-red-ultra: #FF0000;
    
    /* Primary Color (Green) */
    --primary-color: #00c266;
    --primary-color-dark: #009a52;
    
    /* Dark Backgrounds */
    --bg-dark: #1a1a1f;
    --bg-darker: #121217;
    --bg-card: #1e1e24;
    --bg-hover: #25252a;
    --bg-secondary: #16161b;
    
    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    
    /* Borders */
    --border-dark: #2a2a2f;
    --border-light: #35353a;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 15px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.site-notification-bar {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1100;
    box-shadow: var(--shadow-md);
}

.site-notification-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.site-notification-message {
    flex: 1 1 auto;
    font-size: 0.95rem;
    line-height: 1.4;
}

.site-notification-link {
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.site-notification-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    text-decoration: none;
}

.site-notification-close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.site-notification-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

body.has-notification-bar {
    --notification-bar-height: 56px;
}

body.has-notification-bar .header {
    top: var(--notification-bar-height);
}

body.has-notification-bar .cfx-nav-bar {
    top: calc(var(--notification-bar-height) + 60px);
}

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

/* Header */
.header {
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border-dark);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

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

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    letter-spacing: 0.02em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.logo-k {
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.6rem;
    margin-right: 2px;
}

.logo-rest {
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.logo a {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s;
}

.logo a:hover {
    text-decoration: none;
}

.logo a:hover .shark-logo {
    filter: drop-shadow(0 0 12px rgba(0, 191, 255, 0.9));
    transform: scale(1.05);
}

.logo a:hover .logo-text {
    background: linear-gradient(135deg, #00d4ff, #00a0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav a:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
    text-decoration: none;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 0;
}

/* Cfx Forum */
.cfx-forum {
    min-height: calc(100vh - 80px);
}

/* Navigation Bar */
.cfx-nav-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-dark);
    padding: 0.75rem 0;
    position: sticky;
    top: 60px;
    z-index: 999;
}

.cfx-nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.cfx-nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cfx-nav-btn {
    background: var(--cfx-purple);
    color: var(--text-primary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.cfx-nav-btn:hover {
    background: var(--cfx-purple-hover);
}

.cfx-dropdown-arrow {
    font-size: 0.7rem;
}

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

.cfx-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0;
    transition: color 0.2s;
}

.cfx-nav-link:hover {
    color: var(--text-primary);
    text-decoration: none;
}

.cfx-nav-link.active {
    color: var(--text-primary);
    font-weight: 600;
}

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

.cfx-notification-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    position: relative;
    padding: 0.5rem;
    transition: color 0.2s;
}

.cfx-notification-btn:hover {
    color: var(--text-primary);
}

.cfx-notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--cfx-purple);
    color: var(--text-primary);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Topics Grid */
.cfx-topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.cfx-topic-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.cfx-topic-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-light);
}

.cfx-topic-thumb {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
    background: var(--bg-darker);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cfx-topic-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cfx-topic-placeholder {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Stats Overlay */
.cfx-topic-stats {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 0.75rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.cfx-stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 500;
}

.cfx-stat-icon {
    font-size: 0.9rem;
}

.cfx-stat-value {
    font-size: 0.8rem;
}

/* Escrow Badge */
.cfx-escrow-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    backdrop-filter: blur(4px);
}

.cfx-escrow-icon {
    font-size: 0.8rem;
}

/* Status Badge */
.cfx-topic-status {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.cfx-status-leaked,
.cfx-status-not-leaked {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cfx-status-leaked {
    background: var(--cfx-green);
    color: var(--text-primary);
}

.cfx-status-not-leaked {
    background: #C40000;
    color: #ffffff;
    text-shadow: none;
}

/* Topic Content */
.cfx-topic-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cfx-topic-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cfx-topic-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cfx-topic-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.cfx-tag {
    background: var(--bg-hover);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border-dark);
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

/* Tag Colors */
.cfx-tag-esx {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-color: #2980b9;
}

.cfx-tag-qbcore {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border-color: #c0392b;
}

.cfx-tag-peds {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border-color: #e67e22;
}

.cfx-tag-mlo {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    border-color: #8e44ad;
}

.cfx-tag-standalone {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    border-color: #229954;
}

.cfx-tag-server {
    background: linear-gradient(135deg, #16a085, #138d75);
    color: white;
    border-color: #138d75;
}

.cfx-tag-clothing {
    background: linear-gradient(135deg, #e91e63, #c2185b);
    color: white;
    border-color: #c2185b;
}

.cfx-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

/* Navigation Tag Links */
.cfx-tag-nav {
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s;
}

.cfx-tag-nav:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Tags Popup */
.cfx-tags-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10rem;
    backdrop-filter: blur(5px);
}

.cfx-tags-popup-content {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: popupFadeIn 0.2s ease-out;
    margin: 0 auto;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cfx-tags-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-dark);
    background: var(--bg-card);
    position: sticky;
    top: 0;
    z-index: 10;
}

.cfx-tags-popup-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cfx-tags-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.cfx-tags-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.cfx-tags-popup-body {
    padding: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.cfx-tags-popup-body .cfx-tag {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    font-weight: 600;
}

.cfx-tag-clear {
    background: var(--bg-hover) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-dark) !important;
}

.cfx-tag-clear:hover {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

.cfx-tag-forum {
    background: var(--cfx-purple);
    color: var(--text-primary);
    border-color: var(--cfx-purple);
}

.cfx-tag-forum:hover {
    background: var(--cfx-purple-hover);
    border-color: var(--cfx-purple-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.3);
}

/* Empty State */
.cfx-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    margin: 2rem 0;
}

.cfx-empty-state svg {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.cfx-empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.cfx-empty-state p {
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--cfx-purple);
    color: var(--text-primary);
}

.btn-primary:hover {
    background: var(--cfx-purple-hover);
    color: var(--text-primary);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-dark);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
    color: var(--text-primary);
    text-decoration: none;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-dark);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--cfx-purple);
    box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.1);
}

.form-group input[type="password"] {
    color: var(--text-primary) !important;
}

/* Footer */
.footer {
    background: var(--bg-darker);
    color: var(--text-secondary);
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
    border-top: 1px solid var(--border-dark);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border: 1px solid;
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--cfx-green);
    border-color: var(--cfx-green);
}

.alert-error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border-color: #e74c3c;
}

/* Links */
a {
    color: var(--cfx-purple);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--cfx-purple-hover);
    text-decoration: underline;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 5px;
    border: 1px solid var(--border-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-hover);
}

/* Selection */
::selection {
    background: var(--cfx-purple);
    color: var(--text-primary);
}

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

    .nav {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .cfx-nav-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .cfx-nav-left {
        width: 100%;
    }

    .cfx-nav-links {
        flex-wrap: wrap;
    }

    .cfx-topics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cfx-topic-thumb {
        height: 180px;
    }
}
