/* Base styles */
* {
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

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

/* Header styles */
header {
  background: var(--bg-secondary);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.logo-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.autogridlogo {
  width: 50px;
  height: 50px;
}

.title {
  font-size: 24px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-name {
  font-size: 14px;
  opacity: 0.8;
}

/* Content layout */
.content-wrapper {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 280px 1fr;
  overflow: hidden;
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  background: var(--bg-tertiary);
  border: none;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-primary);
}

/* Mobile dropdown and warning styles */
.header-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.mobile-dropdown {
  display: none;
}

.screen-warning {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 200, 0.95);
  color: #333;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 1000;
  text-align: center;
  max-width: 90%;
}

.close-warning {
  position: absolute;
  right: 10px;
  top: 10px;
  cursor: pointer;
  color: #666;
}

@media screen and (max-width: 768px) {
  .screen-warning {
    display: block;
  }

  header {
    flex-direction: row;
    gap: 10px;
    padding: 10px;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
  }

  .sidebar {
    position: fixed;
    left: -280px;
    top: 70px;
    height: calc(100vh - 70px);
    width: 280px;
    transition: left 0.3s ease;
    z-index: 99;
  }

  .content-wrapper {
    margin-top: 70px;
  }

  @media (min-width: 769px) {
    .sidebar {
      left: 0 !important;
    }
    .mobile-menu-btn {
      display: none !important;
    }
  }

  .header-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  #themeSelector {
    min-width: 120px;
    width: auto;
  }

  .mobile-menu-btn {
    display: block;
    position: fixed;
    top: 120px;
    left: 10px;
    z-index: 100;
  }

  .content-wrapper {
    top: 120px;
  }

  .content-wrapper {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: -280px;
    top: 70px;
    bottom: 0;
    width: 280px;
    transition: left 0.3s ease;
    z-index: 99;
    background: var(--bg-secondary);
  }

  .sidebar.active {
    left: 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
  }

  .doc-content {
    margin-left: 0;
    padding: 15px;
  }

  .doc-section {
    padding: 15px;
  }

  .doc-section h2 {
    font-size: 1.3em;
  }

  .doc-section p {
    font-size: 0.95em;
    line-height: 1.5;
  }

  .title {
    font-size: 18px;
  }

  .mobile-dropdown {
    display: none;
  }

  @media screen and (max-width: 768px) {
    .header-buttons .nav-button {
      display: none;
    }

    .mobile-dropdown {
      display: block;
      position: relative;
    }
  }

  .mobile-dropdown select {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-right: 10px;
    font-size: 14px;
    cursor: pointer;
}

.mobile-dropdown select:hover {
    background: var(--bg-secondary);
}

  .screen-warning {
    display: block;
  }
}

/* Tablet adjustments */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .doc-section {
    padding: 20px;
  }

  .doc-section h2 {
    font-size: 1.4em;
  }

  .doc-section p {
    font-size: 1em;
  }
}

.sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-section {
  padding: 20px;
}

.sidebar-section h3 {
  color: var(--text-primary);
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
}

.sidebar-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-section ul li {
  margin: 4px 0;
}

.sidebar-section ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  display: block;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.sidebar-section ul li a:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.doc-content {
  flex: 1;
  padding: 20px 40px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.breadcrumb {
  color: var(--text-secondary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.doc-section {
  background: var(--bg-secondary);
  padding: 25px;
  margin-bottom: 30px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.doc-section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.doc-section p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Navigation buttons */
.nav-button {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.nav-button:hover {
  background: var(--accent-color);
  color: var(--text-primary);
}

a {
  color: var(--text-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline !important;
}