/* Base Layout Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

header {
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  padding: 20px 20px 10px 20px;
}

header h1 {
  font-size: 2.5rem;
  color: var(--accent-primary);
  margin-bottom: 5px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Tabs Navigation */
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 0;
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  background-color: var(--bg-primary);
  z-index: 101;
  padding: 10px 0;
  margin-top: -10px;
  box-shadow: 0 2px 4px var(--shadow);
}

.tab-button {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-secondary);
  transition: all 0.3s;
}

.tab-button:hover {
  color: var(--accent-primary);
}

.tab-button.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
  font-weight: 600;
}

/* Tab Panels */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  position: relative;
}

/* Custom scrollbar for tab panels */
.tab-panel::-webkit-scrollbar {
  width: 18px;
}

.tab-panel::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-left: 1px solid var(--border-color);
}

.tab-panel::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border: 3px solid var(--bg-primary);
  border-radius: 3px;
}

.tab-panel::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Scrollbar arrow buttons */
.tab-panel::-webkit-scrollbar-button {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  height: 18px;
  display: block;
}

.tab-panel::-webkit-scrollbar-button:hover {
  background: var(--accent-light);
}

.tab-panel::-webkit-scrollbar-button:active {
  background: var(--accent-primary);
}

/* Up arrow */
.tab-panel::-webkit-scrollbar-button:vertical:decrement {
  border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .tab-panel::-webkit-scrollbar-button:vertical:decrement {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="%23b0b0b0" d="M8 5 L4 9 L5.5 9 L8 6.5 L10.5 9 L12 9 Z"/></svg>');
  background-repeat: no-repeat;
  background-position: center;
}

.tab-panel::-webkit-scrollbar-button:vertical:decrement {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="%23333" d="M8 5 L4 9 L5.5 9 L8 6.5 L10.5 9 L12 9 Z"/></svg>');
  background-repeat: no-repeat;
  background-position: center;
}

/* Down arrow */
.tab-panel::-webkit-scrollbar-button:vertical:increment {
  border-top: 1px solid var(--border-color);
}

[data-theme="dark"] .tab-panel::-webkit-scrollbar-button:vertical:increment {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="%23b0b0b0" d="M8 11 L4 7 L5.5 7 L8 9.5 L10.5 7 L12 7 Z"/></svg>');
  background-repeat: no-repeat;
  background-position: center;
}

.tab-panel::-webkit-scrollbar-button:vertical:increment {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="%23333" d="M8 11 L4 7 L5.5 7 L8 9.5 L10.5 7 L12 7 Z"/></svg>');
  background-repeat: no-repeat;
  background-position: center;
}

.placeholder {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  
  .tab-button {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* Scroll Navigation Arrows - Hidden (using native scrollbar arrows instead) */
.scroll-arrow {
  display: none;
}
