:root {
  --bg-color: #0b0f19;
  --panel-bg: rgba(20, 25, 40, 0.6);
  --panel-border: rgba(255, 255, 255, 0.08);
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --input-bg: rgba(0, 0, 0, 0.2);
  
  --font-family: 'Outfit', sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Background Shapes */
.bg-shape {
  position: fixed;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.6;
}

.shape-1 {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, #6366f1 0%, transparent 70%);
}

.shape-2 {
  bottom: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, #ec4899 0%, transparent 70%);
}

.app-layout {
  display: flex;
  height: 100vh;
  padding: 1.5rem;
  gap: 1.5rem;
}

/* Glassmorphism panel */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Sidebar */
.sidebar {
  width: 340px;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  gap: 2rem;
  flex-shrink: 0;
  overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.sidebar-header .logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.logo svg {
  width: 28px;
  height: 28px;
  color: var(--primary-color);
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 300;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-group input {
  background: var(--input-bg);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-family: var(--font-family);
  font-size: 1rem;
  outline: none;
  transition: all 0.2s ease;
}

.input-group input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.input-group input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
  margin-top: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-primary:active {
  transform: translateY(0);
}

.stats-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: auto;
}

.stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: all 0.2s;
}

.stat-box:hover {
  background: rgba(255, 255, 255, 0.05);
}

.stat-box:last-child {
  grid-column: span 2;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Scroll Area */
.scroll-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

.scroll-container {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: auto;
  position: relative;
  scroll-behavior: smooth;
  will-change: transform;
}

/* Custom Scrollbar for container */
.scroll-container::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.scroll-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  margin: 10px 0;
}

.scroll-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

.scroll-container::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.35);
}

#spacer {
  width: 1px;
}

/* Virtual Grid Items */
.item {
  position: absolute;
  border-radius: 16px;
  padding: 1px; /* border thickness */
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Desktop hover effect only */
@media (hover: hover) {
  .item:hover {
    transform: translateY(-6px) scale(1.02);
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  }
}

.item-inner {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  width: 100%;
  height: 100%;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

/* Item colorful decor line */
.item-decor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
}

.item-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.item-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
  .app-layout {
    flex-direction: column;
    padding: 1rem;
  }
  .sidebar {
    width: 100%;
    max-height: 50vh;
    padding: 1.5rem;
  }
  .stats-container {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .stat-box:last-child {
    grid-column: span 1;
  }
}
