/* Navigation System Styles */
.main-nav {
    background: white;
    color: #1e293b;
    padding: 0;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

.nav-brand {
    padding: 0 20px;
    flex-shrink: 0;
}

.nav-brand h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
}

.nav-links {
    display: flex;
    flex: 1;
    justify-content: center;
    gap: 2px;
}

.nav-link {
    background: none;
    border: none;
    color: #64748b;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    text-decoration: none;
}

.nav-link:hover {
    background: #f1f5f9;
    color: #334155;
}

.nav-link.active {
    background: #3b82f6;
    color: white;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.2);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #1d4ed8;
    border-radius: 1px 1px 0 0;
}

.nav-icon {
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.nav-text {
    white-space: nowrap;
}

.nav-status {
    padding: 0 20px;
    flex-shrink: 0;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #95a5a6;
    transition: all 0.3s ease;
}

.status-dot.connected {
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.status-dot.connecting {
    background: #f59e0b;
    animation: pulse 2s infinite;
}

.status-dot.disconnected {
    background: #ef4444;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Main content area */
#main-content {
    min-height: calc(100vh - 60px);
    background: #f8f9fa;
}

/* Page transitions */
.page-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.page-exit {
    opacity: 1;
    transform: translateY(0);
}

.page-exit-active {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

/* Error page styles */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
    padding: 40px;
}

.error-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.error-page h2 {
    color: #e74c3c;
    margin-bottom: 15px;
}

.error-page p {
    color: #7f8c8d;
    margin-bottom: 30px;
    max-width: 400px;
}

/* Responsive design */
@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        min-height: auto;
        padding: 10px 0;
    }
    
    .nav-brand {
        padding: 10px 20px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        gap: 3px;
        padding: 0 10px;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .nav-text {
        display: none;
    }
    
    .nav-icon {
        font-size: 18px;
    }
    
    .nav-status {
        padding: 10px 20px;
        order: -1;
    }
}

@media (max-width: 480px) {
    .nav-links {
        justify-content: space-around;
        width: 100%;
    }
    
    .nav-link {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }
}

/* Loading states */
.nav-loading {
    position: relative;
}

.nav-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    #main-content {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .error-page {
        color: #e0e0e0;
    }
    
    .error-page p {
        color: #b0b0b0;
    }
}
