/* Main Stylesheet for Nixxim - Consolidating all styles */

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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --bg: #0a0a0f;
    --surface: #1a1a2e;
    --surface-light: #252540;
    --text: #e4e4e7;
    --text-dim: #a1a1aa;
    --border: #27272a;
    --accent: #ec4899;
    --success: #10b981;
    /* Category Colors */
    --cat-de: #10b981;
    --cat-com: #3b82f6;
    --cat-social: #a855f7;
    --cat-wiki: #f59e0b;
    --cat-edu: #ef4444;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: radial-gradient(circle at top right, #1a1a2e 0%, var(--bg) 60%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* --- Navigation --- */
nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0; /* Reduced padding */
    position: sticky;
    top: 0;
    z-index: 100;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping */
    gap: 0.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1rem; /* Smaller gap on mobile */
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

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

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
}

/* Stats Bar */
.stats {
    max-width: 1400px;
    margin: 0 auto 3rem;
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    background: var(--surface);
    border-radius: 1rem;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--text-dim);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Main Content & Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.section {
    margin-bottom: 4rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 3rem;
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.bookmark-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.bookmark-card {
    background: var(--surface);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.3s;
    position: relative;
    /* Animation */
    animation: fadeIn 0.5s ease-out;
}

.bookmark-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.featured-badge.static {
    position: static;
}

.bookmark-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-name {
    font-size: 0.9rem;
    color: var(--text-dim);
    text-decoration: none;
}

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

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

.bookmark-title a:hover {
    color: var(--primary);
}

.bookmark-desc {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

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

.bookmark-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.bookmark-date {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    background: var(--surface-light);
    color: var(--text);
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s;
}

.tag:hover {
    background: var(--primary);
    color: white;
}

/* Category Badges */
.cat-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    background: var(--surface-light);
    color: var(--text-dim);
}

.cat-badge.de {
    border-left: 3px solid var(--cat-de);
    color: var(--cat-de);
}

.cat-badge.com {
    border-left: 3px solid var(--cat-com);
    color: var(--cat-com);
}

.cat-badge.social {
    border-left: 3px solid var(--cat-social);
    color: var(--cat-social);
}

.cat-badge.wiki {
    border-left: 3px solid var(--cat-wiki);
    color: var(--cat-wiki);
}

.cat-badge.edu {
    border-left: 3px solid var(--cat-edu);
    color: var(--cat-edu);
}

/* Favicons */
.favicon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 0.5rem;
    margin-top: -2px;
    border-radius: 2px;
}

/* Hero Search */
.hero-search {
    margin-top: 2.5rem;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 3.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    color: white;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5); /* Higher contrast placeholder */
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 1.2rem;
}

/* Sidebar & 2-Col Layout */
.layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.widget {
    background: var(--surface);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.widget-title {
    font-weight: 700;
    margin-bottom: 1rem;
}

.user-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
    transition: color 0.2s;
}

.user-item:hover {
    color: var(--primary);
}

.category-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

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

.page-link {
    padding: 0.5rem 1rem;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.page-link:hover,
.page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.page-link.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

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

@media (max-width: 480px) {
    .nav-container {
        justify-content: center;
    }
    .nav-links {
        font-size: 0.85rem;
        gap: 0.75rem;
    }
    .btn-primary {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    .hero h1 {
        font-size: 2rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .bookmark-card {
        padding: 1rem;
    }
}
/* SEO Content Section */
.seo-content-section {
    padding: 2.5rem;
    background: linear-gradient(145deg, var(--surface), #1e1e36);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    margin-top: 2rem;
}

.seo-text-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 1.5rem;
}

.seo-text-col p {
    margin-bottom: 1.25rem;
    color: var(--text-dim);
}

.seo-text-col h3 {
    margin: 1.5rem 0 1rem;
    color: var(--text);
    font-size: 1.25rem;
}

.seo-features {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.seo-features li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-dim);
}

.seo-features li::before {
    content: "✅";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.9rem;
}

.shadow-soft {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .seo-text-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-1-5 { margin-bottom: 1.5rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mb-4 { margin-bottom: 4rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-600 { max-width: 600px; }
.max-w-800 { max-width: 800px; }
.d-inline-block { display: inline-block; }

/* --- Footer --- */
.site-footer {
    text-align: center;
    padding: 4rem 1rem;
    margin-top: 5rem;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap; /* Wrap on small screens */
}

@media (max-width: 480px) {
    .footer-links {
        gap: 0.75rem;
    }
    .footer-links a {
        font-size: 0.85rem;
    }
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    padding: 0.5rem; /* Better tap target */
}

.footer-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* --- About Page --- */
.about-hero {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 0;
}

.about-card {
    padding: 2.5rem;
    line-height: 1.8;
}

.about-intro {
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.highlight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 3rem 0;
}

.highlight-card {
    background: var(--surface-light);
    padding: 1.5rem;
    border-radius: 0.75rem;
}

.highlight-card p {
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* --- Error Pages (404/500) --- */
.error-container {
    text-align: center;
    padding: 4rem 1rem;
}

.error-code {
    font-size: 4rem;
    color: var(--cat-edu); /* Using cat-edu for red */
    margin-bottom: 1rem;
}

.error-title {
    margin-bottom: 1.5rem;
}

.error-desc {
    color: var(--text-dim);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.error-grid {
    text-align: left;
    margin-top: 2rem;
}

.user-list {
    list-style: none;
    padding: 0;
}

.user-link {
    text-decoration: none;
    color: var(--primary);
}

.user-since {
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* --- More Utilities --- */
.user-avatar-small { width: 20px; height: 20px; border-radius: 4px; vertical-align: middle; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.ml-1 { margin-left: 0.5rem; }
.fs-sm { font-size: 0.85rem; }
.fs-xs { font-size: 0.75rem; }

/* --- User Profile --- */
.profile-header {
    background: var(--surface);
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 3rem;
    display: flex;
    gap: 2rem;
    align-items: center;
    border: 1px solid var(--border);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.profile-info h1 {
    margin: 0 0 0.5rem;
    color: var(--primary);
    font-size: 2rem;
}

.profile-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 480px) {
    .profile-stats {
        gap: 1.5rem;
        justify-content: center;
        flex-wrap: wrap;
    }
}

.profile-stats .stat-value {
    font-size: 1.5rem;
    display: block;
}

.profile-stats .stat-label {
    font-size: 1rem;
    display: block;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}



.text-dim { color: var(--text-dim); }
.text-secondary { color: var(--text-secondary); }

/* --- Static Pages (About/Privacy) --- */
.static-page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.static-card {
    padding: 2.5rem;
    line-height: 1.8;
}

.about-intro {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

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

.highlight-card {
    background: var(--surface-light);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.highlight-card h4 {
    margin-bottom: 0.5rem;
}

.privacy-notice {
    background: var(--surface-light);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border-left: 4px solid var(--accent);
    margin-top: 2rem;
}

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-1-5 { margin-bottom: 1.5rem; }
.text-white { color: white; }
.line-height-1-8 { line-height: 1.8; }
