:root {
    --bg-deep: #0a0a0c;
    --bg-card: #141417;
    --bg-header: rgba(10, 10, 12, 0.8);
    --accent: #00f2ff;
    --accent-glow: rgba(0, 242, 255, 0.2);
    --text-primary: #f8f9fa;
    --text-secondary: #a0a0ab;
    --border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-main: 0 10px 30px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .logo h1 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Header & Navigation */
#main-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(20px);
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border);
    height: 70px;
    display: flex;
    align-items: center;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    color: var(--accent);
    display: flex;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #fff 0%, #a0a0ab 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-bar {
    flex: 0 1 450px;
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 2px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
}

.search-bar:focus-within {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.search-bar input {
    background: none;
    border: none;
    color: var(--text-primary);
    width: 100%;
    padding: 10px 0;
    font-size: 0.95rem;
    outline: none;
}

.search-bar .search-icon {
    color: var(--text-secondary);
}

.top-nav {
    display: flex;
    gap: 32px;
}

.top-nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.top-nav a:hover, .top-nav a.active {
    color: var(--accent);
}

/* Hero Section */
#hero {
    height: 500px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 70px;
    background: url('../assets/hero_background.png') no-repeat center center/cover;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(10, 10, 12, 0.4) 0%, rgba(10, 10, 12, 0.9) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1;
    margin-bottom: 24px;
    font-weight: 800;
}

.hero-title .highlight {
    color: var(--accent);
    text-shadow: 0 0 30px var(--accent-glow);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: 'Outfit';
    color: #fff;
}

.stat-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-top: -5px;
}

/* Directory Layout */
#directory-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 60px;
}

/* Sidebar */
#sidebar h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

#category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cat-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.cat-btn:hover {
    background: var(--glass-bg);
    color: #fff;
}

.cat-btn.active {
    background: var(--accent-glow);
    border-color: rgba(0, 242, 255, 0.1);
    color: var(--accent);
}

.cat-btn .icon {
    display: flex;
    align-items: center;
    opacity: 0.7;
}

.cat-btn.active .icon {
    opacity: 1;
}

/* Main Content area */
.filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

#results-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.sort-dropdown {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

#sort-select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    outline: none;
}

/* Tools Grid */
#tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

/* Tool Card */
.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tool-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px var(--accent-glow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.tool-icon {
    width: 54px;
    height: 54px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    border: 1px solid var(--glass-border);
}

.tool-category-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--glass-bg);
    padding: 4px 10px;
    border-radius: 100px;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.tool-name {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: #fff;
}

.tool-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.visit-btn {
    text-decoration: none;
    color: #fff;
    background: var(--accent);
    color: var(--bg-deep);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.visit-btn:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 15px var(--accent);
}

.tool-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ff88;
}

/* Skeleton/Loading State */
.skeleton-card {
    height: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 0.8; }
    100% { opacity: 0.5; }
}

/* Footer */
#main-footer {
    padding: 60px 40px;
    border-top: 1px solid var(--border);
    margin-top: 80px;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
}

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

/* Responsive */
@media (max-width: 1024px) {
    #directory-content {
        grid-template-columns: 1fr;
    }
    #sidebar {
        display: none;
    }
    .hero-title {
        font-size: 3rem;
    }
}
