/**
 * XRCE's Workshop - Main Stylesheet
 */

:root {
  /* Color scheme */
  --primary-color: #0a84ff;
  --primary-dark: #0060c0;
  --accent-color: #5856d6;
  --text-color: #e0e0e0;
  --text-muted: #8e8e93;
  --bg-dark: #0b0b0b;
  --bg-card: #1c1c1e;
  --bg-sidebar: rgba(22, 22, 22, 0.9);
  --bg-navbar: rgba(26, 26, 26, 0.85);
  
  /* Spacing */
  --sidebar-width: 260px;
  --navbar-height: 60px;
  --content-padding: 30px;
  
  /* Transitions */
  --transition-speed: 0.3s;
}

/* Base styles */
html {
  scroll-behavior: smooth;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg-dark);
  color: var(--text-color);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

* {
  transition: all var(--transition-speed) ease;
}

/* Layout structure */
.wrapper {
  display: flex;
  min-height: 100vh;
  padding-top: var(--navbar-height);
}

/* Navbar */
.navbar {
  background: var(--bg-navbar) !important;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  height: var(--navbar-height);
}

.navbar-brand {
  color: #fff !important;
  font-weight: 600;
  letter-spacing: 0.5px;
  font-size: 1.2rem;
}

/* Sidebar */
#sidebar {
  width: var(--sidebar-width);
  min-height: calc(100vh - var(--navbar-height));
  background: var(--bg-sidebar);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 4px 0 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 1.5rem 1.5rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header h5 {
  margin: 0;
  font-weight: 600;
  color: var(--text-color);
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}

.category-item {
  margin-bottom: 0.75rem;
}

.category-header {
  display: flex;
  align-items: center;
  padding: 0.5rem 1.5rem;
  cursor: pointer;
  user-select: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-header:hover {
  color: var(--text-color);
}

.category-icon {
  margin-right: 0.75rem;
  width: 1rem;
  text-align: center;
}

.toggle-icon {
  margin-left: auto;
  font-size: 0.75rem;
  transition: transform var(--transition-speed) ease;
}

.category-header[aria-expanded="true"] .toggle-icon {
  transform: rotate(180deg);
}

.category-content {
  padding: 0.25rem 0;
}

.category-link {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem 0.5rem 3.25rem;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.95rem;
  border-left: 3px solid transparent;
  transition: all var(--transition-speed) ease;
}

.category-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  transform: translateX(4px);
}

.category-link.active {
  color: var(--primary-color);
  font-weight: 500;
  background: rgba(10, 132, 255, 0.1);
  border-left-color: var(--primary-color);
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.social-links {
  display: flex;
  margin-bottom: 0.5rem;
}

.social-links a {
  color: var(--text-muted);
  margin-right: 1rem;
  font-size: 1.1rem;
}

.social-links a:hover {
  color: var(--primary-color);
}

/* Content area */
#content {
  flex: 1;
  transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
  animation: fadeIn 0.5s ease-out forwards;
  padding: var(--content-padding);
}

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

/* Responsive */
@media (max-width: 992px) {
  #sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    height: calc(100% - var(--navbar-height));
    z-index: 1050;
    transform: translateX(-100%);
  }
  
  #sidebar.show {
    transform: translateX(0);
  }
  
  #content {
    padding: 1rem;
  }
}

/* Utils */
.card {
  background-color: var(--bg-card);
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  margin-bottom: 1.5rem;
}

.card-header {
  background-color: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-weight: 500;
}

.form-control, .form-select {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-color);
}

.form-control:focus, .form-select:focus {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(10, 132, 255, 0.25);
  color: var(--text-color);
}

.btn {
  border-radius: 0.375rem;
  font-weight: 500;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1.5rem;
  font-weight: 600;
}

hr {
  border-color: rgba(255, 255, 255, 0.1);
  margin: 2rem 0;
} 