/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a26;
    --accent-primary: #00ff88;
    --accent-secondary: #00ccff;
    --accent-danger: #ff0055;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-muted: #666;
    --border-color: #2a2a3a;
    --shadow-glow: 0 0 20px rgba(0, 255, 136, 0.3);
    --shadow-glow-blue: 0 0 20px rgba(0, 204, 255, 0.3);
}

body {
    font-family: 'Courier New', 'Consolas', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Matrix Background Animation */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.05;
    background: linear-gradient(180deg, transparent 0%, var(--bg-primary) 100%);
}

.matrix-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, var(--accent-primary) 2px, var(--accent-primary) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, var(--accent-primary) 2px, var(--accent-primary) 4px);
    background-size: 50px 50px;
    animation: matrixScroll 20s linear infinite;
}

@keyframes matrixScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(50px); }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    background: rgba(18, 18, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-primary);
    text-shadow: var(--shadow-glow);
}

.logo-icon {
    font-size: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.logo-text {
    letter-spacing: 2px;
}

.accent {
    color: var(--accent-secondary);
    text-shadow: var(--shadow-glow-blue);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--accent-primary);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: rgba(18, 18, 26, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 999;
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 10px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.mobile-menu a:hover {
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
    padding-left: 20px;
}

/* Hero Section */
.hero {
    padding: 80px 20px 60px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 255, 136, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--accent-primary);
    text-shadow: var(--shadow-glow);
    animation: glitchText 3s ease-in-out infinite;
    line-height: 1.2;
}

@keyframes glitchText {
    0%, 90%, 100% { transform: translateX(0); }
    92% { transform: translateX(-2px); }
    94% { transform: translateX(2px); }
    96% { transform: translateX(-1px); }
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    max-width: 600px;
    margin: 40px auto;
}

.stat-item {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-primary);
    text-shadow: var(--shadow-glow);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Search Container */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 40px auto 30px;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-primary);
    font-size: 1.5rem;
    pointer-events: none;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.filter-btn {
    padding: 10px 25px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.filter-btn.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

/* Intro Section */
.intro-section {
    padding: 60px 20px;
    background: var(--bg-primary);
}

.intro-section article {
    max-width: 900px;
    margin: 0 auto;
}

.intro-section p {
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.intro-section strong {
    color: var(--accent-primary);
}

/* Category Sections */
.category-section {
    padding: 60px 20px;
    background: var(--bg-primary);
}

.category-section h2 {
    font-size: 2rem;
    color: var(--accent-secondary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-shadow: var(--shadow-glow-blue);
}

.section-icon {
    font-size: 2.5rem;
}

.section-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
    max-width: 900px;
}

.section-description strong {
    color: var(--accent-primary);
}

/* Resources Grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.resource-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.1), transparent);
    transition: left 0.5s ease;
}

.resource-card:hover::before {
    left: 100%;
}

.resource-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-5px);
}

.resource-card.hidden {
    display: none;
}

.resource-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 10px;
}

.resource-name {
    font-size: 1.3rem;
    color: var(--accent-primary);
    margin: 0;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-online {
    background: rgba(0, 255, 136, 0.2);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}

.status-offline {
    background: rgba(255, 0, 85, 0.2);
    color: var(--accent-danger);
    border: 1px solid var(--accent-danger);
}

.resource-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.resource-links {
    margin-bottom: 15px;
}

.link-item {
    margin-bottom: 15px;
}

.link-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.onion-link {
    display: inline-block;
    color: var(--accent-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 5px 10px;
    background: rgba(0, 204, 255, 0.1);
    border-radius: 5px;
    border: 1px solid rgba(0, 204, 255, 0.3);
    transition: all 0.3s ease;
    word-break: break-all;
}

.onion-link:hover {
    background: rgba(0, 204, 255, 0.2);
    border-color: var(--accent-secondary);
    box-shadow: var(--shadow-glow-blue);
}

.mirror-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.onion-link.mirror {
    font-size: 0.85rem;
}

.resource-footer {
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.last-updated {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Security Notice */
.security-notice {
    padding: 60px 20px;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.security-notice h2 {
    font-size: 2rem;
    color: var(--accent-danger);
    margin-bottom: 20px;
    text-align: center;
}

.notice-content {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 30px;
    border-radius: 10px;
    border: 2px solid var(--accent-danger);
}

.notice-content p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.notice-content strong {
    color: var(--accent-danger);
}

.notice-content ul {
    list-style: none;
    padding-left: 0;
}

.notice-content li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
}

.notice-content li::before {
    content: '▸';
    position: absolute;
    left: 10px;
    color: var(--accent-danger);
    font-size: 1.2rem;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 40px 20px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: var(--accent-primary);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-primary);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.disclaimer {
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu {
        display: flex;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
        max-width: 300px;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .category-section h2 {
        font-size: 1.5rem;
        flex-direction: column;
        text-align: center;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-btn {
        width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .hero {
        padding: 60px 15px 40px;
    }
    
    .category-section {
        padding: 40px 15px;
    }
    
    .resource-card {
        padding: 20px;
    }
    
    .resource-name {
        font-size: 1.1rem;
    }
    
    .notice-content {
        padding: 20px;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resource-card {
    animation: fadeIn 0.5s ease-out;
}

