:root {
    --bg: #050506;
    --panel: #0d0d0e;
    --muted: #9aa0a6;
    --text: #f3f4f5;
    --accent: #ffffff;
    --glass: rgba(255, 255, 255, 0.06);
    --radius: 16px;
    --container: 1200px;
    --mono: 'Roboto Mono', monospace;
    --ui: 'Inter', sans-serif;
    --transition: 450ms cubic-bezier(.2, .9, .2, 1);
    --gradient-primary: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 100%);
    --gradient-hover: linear-gradient(135deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.06) 100%);
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-elevated: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-hover: 0 24px 64px rgba(0, 0, 0, 0.8);
    --cyber-blue: #00a2ff;
    --cyber-purple: #5c67ff;
    --cyber-green: #00ffaa;
    --cyber-pink: #ff00aa;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--ui);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 92%;
    max-width: var(--container);
    margin: 0 auto;
}

/* Preloader */
.preloader {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, #000 0%, #070708 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .5s ease, visibility .5s ease;
}

.preloader[aria-hidden="true"] {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-line {
    height: 4px;
    width: 160px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06));
    position: relative;
    overflow: hidden;
}

.loader-line::after {
    content: '';
    position: absolute;
    left: -40%;
    top: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    animation: shimmer 1.6s infinite linear;
}

@keyframes shimmer {
    to { transform: translateX(250%); }
}

.logo-glitch text {
    fill: var(--text);
}

.logo-glitch {
    filter: url(#f1);
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(20px) saturate(180%);
    background: rgba(7, 7, 8, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
}

.brand-text h1 {
    margin: 0;
    font-family: var(--mono);
    font-weight: 700;
    letter-spacing: 1.5px;
    font-size: 16px;
}

.brand-text .sub {
    display: block;
    font-size: 10px;
    color: var(--muted);
    margin-top: 1px;
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
}

.nav-link {
    color: var(--muted);
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
}

.hamburger {
    display: inline-block;
    width: 20px;
    height: 2px;
    background: var(--text);
    position: relative;
    transition: all 0.3s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--text);
    transition: all 0.3s;
}

.hamburger::before {
    top: -6px;
}

.hamburger::after {
    top: 6px;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--panel);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
    transition: right 0.3s ease;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.sidebar-link {
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Buttons */
.btn {
    font-family: var(--ui);
    cursor: pointer;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: transparent;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--gradient-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    background: var(--gradient-hover);
    box-shadow: var(--shadow-elevated);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-ghost {
    background: transparent;
    border: none;
    padding: 6px;
}

.btn-animated {
    position: relative;
    overflow: hidden;
}

.btn-animated::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-120%);
    transition: transform .6s ease;
}

.btn-animated:hover::after {
    transform: translateX(120%);
}

/* Hero Section */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--bg) 0%, #0a0a0b 100%);
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
}

.hero-text h1 {
    font-family: var(--mono);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.1;
}

.hero-text .accent {
    background: linear-gradient(135deg, var(--cyber-blue) 0%, var(--cyber-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-lead {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--muted);
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    background: var(--gradient-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 30px 20px;
    text-align: center;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: var(--gradient-hover);
    box-shadow: var(--shadow-elevated);
}

.stat-number {
    font-family: var(--mono);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--cyber-green) 0%, var(--cyber-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--muted);
    font-size: 0.9rem;
}

/* Sections */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--mono);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Search Section */
.search-section {
    background: var(--panel);
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.search-input {
    flex: 1;
    padding: 16px 24px;
    background: var(--gradient-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--ui);
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
}

.search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background: var(--gradient-hover);
    box-shadow: var(--shadow-elevated);
}

.search-btn {
    white-space: nowrap;
}

.quick-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-primary);
    color: var(--accent);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Search Results */
.search-results {
    margin-top: 40px;
}

.results-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
    color: var(--cyber-blue);
}

/* Cyber Card Styles */
.cyber-card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.cyber-card {
    position: relative;
    width: 100%;
    height: 200px;
    transition: 200ms;
    perspective: 800px;
}

.cyber-card:active {
    transform: scale(0.98);
}

.cyber-card-content {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    border-radius: 16px;
    transition: 700ms;
    background: linear-gradient(45deg, #1a1a1a, #262626);
    border: 2px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    box-shadow:
        0 0 20px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.cyber-card-content::before {
    content: "";
    background: radial-gradient(
        circle at center,
        rgba(0, 255, 170, 0.1) 0%,
        rgba(0, 162, 255, 0.05) 50%,
        transparent 100%
    );
    filter: blur(20px);
    opacity: 0;
    width: 150%;
    height: 150%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

.cyber-card:hover .cyber-card-content::before {
    opacity: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.site-name {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 1.2rem;
    background: linear-gradient(45deg, var(--cyber-blue), var(--cyber-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(0, 255, 170, 0.3));
}

.site-category {
    color: var(--cyber-green);
    font-size: 0.8rem;
    font-weight: 600;
}

.site-url {
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 12px;
    word-break: break-all;
}

.site-description {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 12px;
    flex-grow: 1;
}

.site-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.site-tag {
    background: rgba(92, 103, 255, 0.2);
    color: var(--cyber-blue);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Cyber Elements */
.cyber-lines span {
    position: absolute;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(92, 103, 255, 0.2),
        transparent
    );
}

.cyber-lines span:nth-child(1) {
    top: 20%;
    left: 0;
    width: 100%;
    height: 1px;
    transform: scaleX(0);
    transform-origin: left;
    animation: lineGrow 3s linear infinite;
}

.cyber-lines span:nth-child(2) {
    top: 40%;
    right: 0;
    width: 100%;
    height: 1px;
    transform: scaleX(0);
    transform-origin: right;
    animation: lineGrow 3s linear infinite 1s;
}

.cyber-lines span:nth-child(3) {
    top: 60%;
    left: 0;
    width: 100%;
    height: 1px;
    transform: scaleX(0);
    transform-origin: left;
    animation: lineGrow 3s linear infinite 2s;
}

.corner-elements span {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(92, 103, 255, 0.3);
    transition: all 0.3s ease;
}

.corner-elements span:nth-child(1) {
    top: 8px;
    left: 8px;
    border-right: 0;
    border-bottom: 0;
}

.corner-elements span:nth-child(2) {
    top: 8px;
    right: 8px;
    border-left: 0;
    border-bottom: 0;
}

.corner-elements span:nth-child(3) {
    bottom: 8px;
    left: 8px;
    border-right: 0;
    border-top: 0;
}

.corner-elements span:nth-child(4) {
    bottom: 8px;
    right: 8px;
    border-left: 0;
    border-top: 0;
}

.cyber-card:hover .corner-elements span {
    border-color: rgba(92, 103, 255, 0.8);
    box-shadow: 0 0 10px rgba(92, 103, 255, 0.5);
}

.scan-line {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(92, 103, 255, 0.1),
        transparent
    );
    transform: translateY(-100%);
    animation: scanMove 2s linear infinite;
}

@keyframes lineGrow {
    0% {
        transform: scaleX(0);
        opacity: 0;
    }
    50% {
        transform: scaleX(1);
        opacity: 1;
    }
    100% {
        transform: scaleX(0);
        opacity: 0;
    }
}

@keyframes scanMove {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

/* Categories Section */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.category-card {
    background: var(--gradient-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    background: var(--gradient-hover);
    box-shadow: var(--shadow-elevated);
    border-color: rgba(255, 255, 255, 0.12);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--cyber-blue);
}

.category-card h3 {
    font-family: var(--mono);
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.category-card p {
    color: var(--muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.category-count {
    background: rgba(92, 103, 255, 0.2);
    color: var(--cyber-blue);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: start;
}

@media (max-width: 968px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.about-text h3 {
    font-family: var(--mono);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.about-text p {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 30px;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.feature-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    color: var(--cyber-blue);
}

.feature-item h4 {
    font-family: var(--mono);
    margin-bottom: 4px;
}

.feature-item p {
    color: var(--muted);
    margin: 0;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-item {
    background: var(--gradient-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 30px 20px;
    text-align: center;
    backdrop-filter: blur(20px);
}

.stat-value {
    font-family: var(--mono);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--cyber-green) 0%, var(--cyber-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--muted);
    font-size: 0.9rem;
}

/* Footer */
.site-footer {
    background: var(--panel);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-family: var(--mono);
    margin-bottom: 8px;
}

.footer-brand p {
    color: var(--muted);
}

.footer-nav {
    display: flex;
    gap: 24px;
}

.footer-nav a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-nav a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gap-16 {
    gap: 16px;
}

.w-full {
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-stats {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-nav {
        justify-content: center;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .cyber-card-container {
        grid-template-columns: 1fr;
    }
}