/* Global Styles for BlazorFastMarquee Demo */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #ffffff;
  color: #1f2937;
}

/* Page Layout */
.page {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  width: 260px;
  background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
  color: white;
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.1);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

  .sidebar::-webkit-scrollbar {
    display: none;
  }

.sidebar-brand {
  padding: 0 1.25rem 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

  .sidebar-brand .brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
  }

  .sidebar-brand h1 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
  }

.nav-section {
  margin-bottom: 1.25rem;
}

  .nav-section h3 {
    margin: 0 0 0.5rem 0;
    padding: 0 1.25rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
    font-weight: 600;
  }

  .nav-section a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.9rem;
  }

    .nav-section a:hover {
      background: rgba(255, 255, 255, 0.05);
      color: white;
    }

    .nav-section a.active {
      background: linear-gradient(90deg, rgba(102, 126, 234, 0.2) 0%, transparent 100%);
      color: white;
      border-left: 3px solid #667eea;
    }

    .nav-section a .icon {
      font-size: 1.1rem;
    }

.sidebar-footer {
  margin-top: auto;
  padding: 1.25rem 1.25rem 0 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

  .sidebar-footer a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: transform 0.2s, box-shadow 0.2s;
  }

    .sidebar-footer a:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 1.75rem 2rem;
    width: calc(100% - 260px);
    max-width: 100%;
    overflow-x: hidden;
}

.main-content h1 {
    font-size: 1.875rem;
    margin: 0 0 0.375rem 0;
    font-weight: 700;
    color: #1f2937;
}

.page-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin: 0 0 1.75rem 0;
    line-height: 1.5;
}

/* Demo Sections */
.demo-section {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: #f9fafb;
    border-radius: 0.75rem;
}

.demo-section h2 {
    font-size: 1.375rem;
    margin: 0 0 0.375rem 0;
    font-weight: 700;
    color: #1f2937;
}

.demo-section > p {
    color: #6b7280;
    margin: 0 0 1rem 0;
    line-height: 1.5;
    font-size: 0.9375rem;
}

.demo-container {
    background: white;
    border-radius: 0.625rem;
    padding: 1.25rem;
    margin: 1rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Code Blocks */
.code-block {
    background: #1f2937;
    color: #e5e7eb;
    border-radius: 0.625rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.code-block pre {
    margin: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
}

  .code-block code {
    font-family: inherit;
  }

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }
    
    .main-content {
        margin-left: 220px;
        padding: 1.5rem;
        width: calc(100% - 220px);
    }
}

@media (max-width: 768px) {
    .page {
        flex-direction: column;
    }
    
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        overflow-y: visible;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1.25rem;
        width: 100%;
    }
    
    .main-content h1 {
        font-size: 1.5rem;
    }
    
    .page-subtitle {
        font-size: 0.9375rem;
    }
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

  ::-webkit-scrollbar-thumb:hover {
    background: #555;
  }

/* Loading States */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: #6b7280;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.demo-section {
  animation: fadeIn 0.5s ease-out;
}

/* Accessibility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus Styles */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: none;
    }
}
