/*
Theme Name: Nexus Prime
Theme URI: https://example.com/nexus-prime
Author: Cursor Assistant
Author URI: https://example.com
Description: Tech & lifestyle magazine theme with dynamic API modules.
Version: 1.0.0
Text Domain: nexus-prime
*/

body {
    background-color: #020617;
    color: #f1f5f9;
    font-family: 'Inter', sans-serif;
    background-image: radial-gradient(circle at 50% 0%, rgba(6, 182, 212, 0.15), transparent 40%);
}

h1, h2, h3, h4, .font-display {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.02em;
}

.bg-noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

header.fixed {
    background:
        radial-gradient(120% 160% at 0% 0%, rgba(6, 182, 212, 0.16) 0%, rgba(2, 6, 23, 0) 55%),
        radial-gradient(120% 160% at 100% 0%, rgba(99, 102, 241, 0.18) 0%, rgba(2, 6, 23, 0) 55%),
        linear-gradient(135deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.96) 40%, rgba(1, 4, 16, 0.98) 100%);
    box-shadow: 0 12px 50px rgba(2, 6, 23, 0.7);
}

header.fixed::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image: linear-gradient(90deg, rgba(34, 211, 238, 0.08), rgba(2, 6, 23, 0) 35%, rgba(99, 102, 241, 0.08));
    opacity: 0.6;
}

.glass-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(34, 211, 238, 0.3);
    background: rgba(15, 23, 42, 0.8);
    transform: translateY(-2px);
}

.img-wrapper {
    overflow: hidden;
    position: relative;
}

.img-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #020617 0%, transparent 60%);
    z-index: 10;
}

.hover-zoom img {
    transition: transform 0.7s cubic-bezier(0.2, 1, 0.3, 1);
}

.group:hover .hover-zoom img {
    transform: scale(1.08);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #020617; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #06b6d4; }

.crypto-up { color: #22c55e; }
.crypto-down { color: #ef4444; }

.category-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.category-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 1rem;
}

.category-pill {
    height: 4px;
    width: 40px;
    background: #06b6d4;
    border-radius: 2px;
    margin-right: 1rem;
}

.custom-logo-link {
    display: inline-flex;
    align-items: center;
}

.custom-logo {
    max-height: 48px;
    width: auto;
    height: auto;
}

.site-branding-footer .custom-logo {
    max-height: 56px;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.article-content p { margin-bottom: 1.5rem; line-height: 1.8; font-size: 1.05rem; color: #cbd5e1; }
.article-content h2 { font-family: 'Space Grotesk', sans-serif; color: white; font-size: 1.75rem; font-weight: 700; margin-top: 2.5rem; margin-bottom: 1rem; }
.article-content blockquote { border-left: 4px solid #06b6d4; padding-left: 1.5rem; font-style: italic; color: #94a3b8; margin: 2rem 0; font-size: 1.1rem; }
.article-content ul { list-style-type: disc; padding-left: 1.5rem; margin-bottom: 1.5rem; color: #cbd5e1; }
.article-content li { margin-bottom: 0.5rem; }
.article-content a,
.article-content p a,
.article-content li a,
.article-content blockquote a {
    color: #06b6d4 !important;
    text-decoration: underline;
    text-decoration-color: rgba(6, 182, 212, 0.5);
    text-underline-offset: 3px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.article-content a:visited,
.article-content p a:visited,
.article-content li a:visited,
.article-content blockquote a:visited {
    color: #0ea5e9 !important;
}

.article-content a:hover,
.article-content p a:hover,
.article-content li a:hover,
.article-content blockquote a:hover {
    color: #22d3ee !important;
    text-decoration-color: rgba(34, 211, 238, 0.8);
}

.pagination {
    display: flex;
    justify-content: center;
    width: 100%;
}

.pagination .nav-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.pagination .page-numbers {
    min-width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    background: transparent;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pagination .page-numbers:hover {
    border-color: #06b6d4;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.pagination .page-numbers.current {
    background: #06b6d4;
    color: #020617;
    border-color: transparent;
}

.pagination .page-numbers.dots {
    border: none;
    background: transparent;
    color: #94a3b8;
    min-width: auto;
}

.pagination .page-numbers svg {
    width: 1.1rem;
    height: 1.1rem;
}

.quantum-box {
    position: relative;
    background: #0f172a;
    z-index: 0;
    overflow: hidden;
}

.quantum-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background:
        radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.35), transparent 55%),
        radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.35), transparent 55%),
        linear-gradient(135deg, rgba(6, 182, 212, 0.55), rgba(2, 6, 23, 0.2), rgba(99, 102, 241, 0.55));
    z-index: -1;
    border-radius: 1rem;
}

.quantum-box::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 12px;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 12px 12px;
    opacity: 0.3;
    pointer-events: none;
}

.mobile-menu {
    display: none;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.mobile-menu.is-open {
    display: block;
}

.search-panel {
    display: none;
}

.search-panel.is-open {
    display: block;
}

.footer-search-button {
    background: linear-gradient(135deg, #081e3a, #0c2b57);
    box-shadow: none;
}

.footer-search-button:hover {
    background: linear-gradient(135deg, #0c2b57, #14407f);
    transform: translateY(-1px);
}

@media (max-width: 900px) {
    .main-nav-desktop {
        display: none;
    }

    header > .container {
        height: 4.5rem;
    }

    .mobile-menu a {
        display: block;
        width: 100%;
    }

    .mobile-menu .menu-item a {
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
    }
}

@media (max-width: 768px) {
    main {
        padding-top: 6.75rem;
        padding-bottom: 4.5rem;
    }

    .glass-card {
        border-radius: 1.25rem;
    }

    .category-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .category-header h3 {
        font-size: 1.35rem;
    }

    .category-header a {
        margin-left: 0;
    }
}

@media (max-width: 576px) {
    main {
        padding-top: 6.25rem;
        padding-bottom: 3.5rem;
    }

    .category-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .category-header h3 {
        font-size: 1.2rem;
    }

    .category-header a {
        margin-left: 0;
    }

    h1, h2, h3, h4 {
        overflow-wrap: anywhere;
    }

    .glass-card {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
