:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-bg: #0f172a;
    --light-bg: #1e293b;
    --card-bg: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #475569;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--light-bg) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* Header Styles */
.navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.version {
    background: var(--card-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.built-with {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.built-with:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 3rem;
}

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

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

.badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-python {
    background: #3776ab;
    color: white;
}

.badge-reverse {
    background: var(--warning-color);
    color: white;
}

.badge-protocol {
    background: var(--success-color);
    color: white;
}

/* File Explorer */
.file-explorer {
    margin-bottom: 3rem;
}

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

.explorer-header h3 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-toggle {
    display: flex;
    background: var(--card-bg);
    border-radius: 8px;
    padding: 0.25rem;
}

.toggle-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
}

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

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.file-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.file-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.file-card:hover::before {
    transform: translateX(0);
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.file-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.file-info h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.file-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.file-size {
    font-size: 0.75rem;
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.view-btn {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

/* Code Viewer */
.code-viewer {
    display: none;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 3rem;
    overflow: hidden;
}

.code-viewer.active {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
}

.viewer-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.viewer-title h3 {
    font-size: 1.25rem;
}

.close-viewer {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.close-viewer:hover {
    background: var(--danger-color);
    color: white;
}

.viewer-content {
    max-height: 500px;
    overflow-y: auto;
}

.viewer-content pre {
    padding: 1.5rem;
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.viewer-actions {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--light-bg);
    border-top: 1px solid var(--border-color);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Info Section */
.info-section {
    margin-bottom: 3rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.info-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.info-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.info-card ul {
    list-style: none;
}

.info-card li {
    margin-bottom: 0.5rem;
}

.info-card a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.info-card a:hover {
    color: var(--secondary-color);
}

/* Footer */
footer {
    background: var(--dark-bg);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-content p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }

    .container {
        padding: 1rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .explorer-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .file-grid {
        grid-template-columns: 1fr;
    }

    .viewer-actions {
        flex-direction: column;
    }
}

/* Syntax Highlighting */
.code-highlight {
    background: #1e293b;
    color: #e2e8f0;
}

.keyword {
    color: #c792ea;
}

.string {
    color: #c3e88d;
}

.comment {
    color: #546e7a;
    font-style: italic;
}

.number {
    color: #f78c6c;
}

.function {
    color: #82aaff;
}

.operator {
    color: #89ddff;
}

.variable {
    color: #f07178;
}

.class-name {
    color: #ffcb6b;
}