/* Geek Style Reset & Base - Vibrant Design */
:root {
  --bg-dark: #f5f7fa;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --text-primary: #2c3e50;
  --text-secondary: #7f8c8d;
  --accent-color: #3498db; /* Vibrant Blue */
  --accent-secondary: #e74c3c; /* Vibrant Red */
  --accent-glow: rgba(52, 152, 219, 0.2);
  --border-color: #e1e8ed;
  --card-hover-border: #3498db;
  --card-shadow: rgba(0, 0, 0, 0.08);
  --card-hover-shadow: rgba(52, 152, 219, 0.15);
  --font-mono: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-mono);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

/* Layout */
.geek-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.geek-sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
  overflow: hidden; /* Changed from overflow-y: auto */
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
  padding: 30px 20px;
  border-bottom: 2px solid var(--border-color);
  text-align: center;
  flex-shrink: 0; /* Prevent header from shrinking */
  background-color: var(--bg-sidebar);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sidebar-nav-wrapper {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-color) var(--bg-sidebar);
}

.sidebar-nav-wrapper::-webkit-scrollbar {
  width: 6px;
}
.sidebar-nav-wrapper::-webkit-scrollbar-thumb {
  background-color: #bdc3c7;
  border-radius: 3px;
}
.sidebar-nav-wrapper::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent-color);
}

.sidebar-header h1 {
  font-size: 1.5rem;
  color: var(--accent-color);
  font-weight: 700;
  margin-bottom: 15px;
  letter-spacing: -0.5px;
}

.sidebar-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.return-blog {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--accent-color) 0%, #2980b9 100%);
  color: white;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.return-blog:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
  background: linear-gradient(135deg, #2980b9 0%, var(--accent-color) 100%);
}

.nav-menu {
  padding: 20px 0;
  list-style: none;
  margin: 0;
}

.nav-item {
  padding: 0 20px;
  margin-bottom: 5px;
}

.nav-link {
  display: block;
  padding: 12px 15px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-radius: 8px;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
  font-weight: 500;
}

.nav-link:hover {
  color: var(--accent-color);
  background-color: rgba(52, 152, 219, 0.08);
  transform: translateX(3px);
}

.nav-link.active {
  color: var(--accent-color);
  background: linear-gradient(90deg, rgba(52, 152, 219, 0.1) 0%, rgba(52, 152, 219, 0.05) 100%);
  border-left-color: var(--accent-color);
  font-weight: 600;
}

/* Main Content */
.geek-content {
  flex: 1;
  overflow-y: auto;
  padding: 40px 60px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  background: linear-gradient(180deg, #f8f9fa 0%, var(--bg-dark) 100%);
}

.geek-content::-webkit-scrollbar {
  width: 8px;
}
.geek-content::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
.geek-content::-webkit-scrollbar-thumb {
  background-color: #bdc3c7;
  border-radius: 4px;
}
.geek-content::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent-color);
}

.category-section {
  margin-bottom: 60px;
  scroll-margin-top: 40px; /* Offset for scroll snap */
}

.category-title {
  font-size: 1.8rem;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 3px solid var(--accent-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  font-weight: 700;
}

.category-title::before {
  content: "▶";
  margin-right: 12px;
  color: var(--accent-color);
  font-size: 1.2rem;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.item-card {
  background-color: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--card-shadow);
}

.item-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.05) 0%, rgba(52, 152, 219, 0.02) 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.item-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--card-hover-border);
  box-shadow: 0 8px 24px var(--card-hover-shadow), 0 0 0 1px rgba(52, 152, 219, 0.1);
}

.item-card:hover::before {
  opacity: 1;
}

.item-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  margin-right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid var(--border-color);
  transition: all 0.3s;
}

.item-card:hover .item-icon {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(52, 152, 219, 0.05) 100%);
  border-color: var(--accent-color);
  transform: scale(1.1);
}

.item-icon img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  transition: all 0.3s;
}

.item-card:hover .item-icon img {
  transform: scale(1.1);
}

.item-info {
  flex: 1;
  min-width: 0;
}

.item-name {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
  transition: color 0.3s;
}

.item-card:hover .item-name {
  color: var(--accent-color);
}

/* Responsive */
@media (max-width: 768px) {
  .geek-container {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  
  .geek-sidebar {
    width: 100%;
    height: auto;
    max-height: 50vh;
    border-right: none;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
  .sidebar-header {
    padding: 20px 15px;
  }
  
  .sidebar-nav-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
  }
  
  .nav-menu {
    display: flex;
    overflow-x: auto;
    padding: 10px;
    white-space: nowrap;
    flex-direction: row;
  }
  
  .nav-item {
    padding: 0 5px;
    flex-shrink: 0;
  }
  
  .nav-link {
    white-space: nowrap;
  }
  
  .geek-content {
    padding: 20px;
    overflow: visible;
  }
  
  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
  }
}

