* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --secondary: #64748b;
    --light: #f8fafc;
    --dark: #1e293b;
    --accent: #06b6d4;
    --border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --bg: #f8fafc;
    --text: #1e293b;
    --card-bg: #ffffff;
    --header-bg: linear-gradient(rgba(30, 64, 175, 0.7), rgba(30, 58, 138, 0.7)), 
           url('../images/network.jpg');
}

[data-theme="dark"] {
    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --primary-dark: #1d4ed8;
    --secondary: #94a3b8;
    --light: #0f172a;
    --dark: #f1f5f9;
    --accent: #06b6d4;
    --border: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
    --bg: #0f172a;
    --text: #f1f5f9;
    --card-bg: #1e293b;
    --header-bg: linear-gradient(rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.8)), 
                url('../images/network.jpg');
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Top Navigation */
.top-nav {
    background-color: var(--card-bg);
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Theme Switcher */
.theme-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-label {
    font-size: 0.875rem;
    color: var(--secondary);
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Header Section */
.header {
    background: var(--header-bg);
    background-size: cover;
    background-position: center;
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.header-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

.btn-primary {
    background-color: white;
    color: var(--primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Search Bar */
.search-container {
    margin-bottom: 2rem;
    position: relative;
}

.search-bar {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    background-color: var(--card-bg);
    color: var(--text);
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px var(--shadow);
}

.search-bar:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px var(--shadow);
    z-index: 10;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-result-item {
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: var(--light);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-command {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary);
}

.search-result-description {
    font-size: 0.875rem;
    color: var(--secondary);
    margin-top: 0.25rem;
}

/* Filter Navigation */
.filter-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text);
}

.filter-btn:hover {
    background-color: var(--primary-light);
    color: white;
}

.filter-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Command Sections */
.command-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background-color: var(--primary);
    border-radius: 2px;
}

.command-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.command-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 2px 8px var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
}

.command-card:hover {
    box-shadow: 0 4px 12px var(--shadow);
}

.command-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background-color: var(--card-bg);
}

.command-name {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--text);
    font-size: 1.1rem;
}

.command-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn {
    background-color: var(--light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    color: var(--secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background-color: var(--primary);
    color: white;
}

.copy-btn.copied {
    background-color: var(--primary);
    color: white;
}

.command-toggle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--text);
    flex-shrink: 0;
}

.command-card.active .command-toggle {
    transform: rotate(180deg);
    background-color: var(--primary);
    color: white;
}

.command-content {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: var(--light);
}

.command-card.active .command-content {
    padding: 1rem 1.5rem 1.5rem;
    max-height: 500px;
}

.command-description {
    color: var(--secondary);
    line-height: 1.6;
}

.divider {
    height: 1px;
    background-color: var(--border);
    margin: 2rem 0;
}

/* Chat Bot */
.chat-bot {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    border: 3px solid var(--card-bg);
}

.chat-bot:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.5);
}

.chat-bot-logo {
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    color: var(--primary);
    box-shadow: 0 2px 10px var(--shadow);
}

.chat-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 350px;
    height: 450px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 15px 50px var(--shadow);
    z-index: 1001;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
}

.chat-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 16px;
}

.bot-logo-small {
    width: 30px;
    height: 30px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: var(--primary);
}

.close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-chat:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    animation: fadeInUp 0.3s ease;
}

.bot-message {
    background: var(--light);
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.user-message {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.command-highlight {
    background-color: var(--primary-light);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.chat-input {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 25px;
    outline: none;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: var(--bg);
    color: var(--text);
}

.chat-input input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.send-button {
    background: var(--primary);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.send-button:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Footer */
.footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 3rem 2rem 2rem;
    transition: background-color 0.3s ease;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.footer-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.footer-section p {
    color: var(--secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--secondary);
    font-size: 0.875rem;
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 8px 25px var(--shadow);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 35px rgba(59, 130, 246, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 8px 25px var(--shadow);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-left {
        width: 100%;
        justify-content: space-between;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .header {
        padding: 3rem 1rem;
    }
    
    .page-title {
        font-size: 2.25rem;
    }
    
    .page-subtitle {
        font-size: 1.125rem;
    }
    
    .header-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .main-content {
        padding: 1.5rem 1rem;
    }
    
    .filter-nav {
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .chat-bot {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
    }

    .chat-window {
        bottom: 90px;
        right: 20px;
        width: 300px;
        height: 400px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .chat-window {
        width: 90vw;
        right: 5vw;
    }
    
    .theme-switcher {
        flex-direction: column;
        gap: 0.25rem;
    }
}