/* Enhanced Dataset Detail Page Styles - Clean & Organized */

/* ===== CSS VARIABLES ===== */
:root {
  /* Color Palette */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #10b981;
  --secondary-dark: #059669;
  --accent: #f59e0b;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #10b981;
  
  /* Background Colors */
  --bg-primary: #0f0f23;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #16213e;
  --bg-card: #1e1e3f;
  
  /* Text Colors */
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #64ffda;
  
  /* Glass Effects */
  --glass-bg: rgba(30, 30, 63, 0.8);
  --glass-border: rgba(100, 255, 218, 0.2);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(100, 255, 218, 0.3);
  
  /* Borders */
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;
}

/* ===== BASE STYLES ===== */
body {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== HERO SECTION ===== */
.dataset-hero {
    background: 
        radial-gradient(ellipse at 30% 70%, rgba(0, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, rgba(255, 0, 255, 0.15) 0%, transparent 50%),
        var(--bg-primary);
  padding: 20px 2rem 15px;
    position: relative;
    overflow: hidden;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--glass-border);
  z-index: 1; /* Ensure hero is below breadcrumbs */
}

.dataset-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="%2300ffff" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.4;
    z-index: 0; /* Ensure pseudo-element is below breadcrumbs */
    animation: gridPulse 4s ease-in-out infinite;
    pointer-events: none; /* Ensure pseudo-element doesn't block clicks */
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.4; }
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs-section {
    margin-bottom: 0.5rem;
  padding: 0.25rem 0;
  position: relative;
  z-index: 100; /* Ensure breadcrumbs are above other elements */
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 101; /* Ensure breadcrumb content is above everything */
}

.breadcrumb-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
    color: var(--primary);
    text-decoration: none;
  font-weight: 600;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
    transition: all 0.3s ease;
  background: transparent;
  border: 1px solid transparent;
  position: relative;
  z-index: 102; /* Ensure links are clickable */
  cursor: pointer;
  pointer-events: auto; /* Ensure links are clickable */
  min-height: 32px; /* Ensure minimum clickable area */
  min-width: 32px; /* Ensure minimum clickable area */
}

.breadcrumb-link:hover {
    color: var(--primary-light);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
  text-decoration: none;
  transform: translateY(-1px);
}

.breadcrumb-current {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary-light);
  font-weight: 700;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  background: rgba(0, 255, 255, 0.08);
  border: 1px solid var(--primary-light);
}

.breadcrumb-separator {
  color: var(--primary-light);
  font-weight: 700;
  opacity: 0.6;
  user-select: none;
  margin: 0 0.2rem;
}

.breadcrumb-link i,
.breadcrumb-current i {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ===== DATASET HEADER ===== */
.dataset-header {
  background: rgba(20,30,50,0.6);
  backdrop-filter: blur(15px);
  border-radius: 16px;
  box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.15);
  padding: 1.5rem 2rem 1.5rem 2rem;
  margin-bottom: 1.5rem;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.dataset-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.1), transparent);
    transition: left 0.8s ease;
}

.dataset-header:hover::before {
    left: 100%;
}

.dataset-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
    margin-bottom: 1rem;
    color: var(--text-primary);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dataset-description {
  font-size: 1.1rem;
    color: var(--text-secondary);
  margin-bottom: 0;
    line-height: 1.6;
  max-width: 800px;
  font-weight: 400;
  opacity: 0.9;
}

/* ===== META BADGES ===== */
.dataset-meta {
    display: flex;
    flex-wrap: wrap;
  gap: 0.8rem 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
    text-transform: uppercase;
  letter-spacing: 0.8px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
    transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.meta-badge.difficulty-badge {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  font-weight: 800;
}

.meta-badge.difficulty-easy {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(76, 175, 80, 0.1) 100%);
  border-color: rgba(76, 175, 80, 0.4);
  color: #4CAF50;
}

.meta-badge.difficulty-medium {
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.2) 0%, rgba(255, 152, 0, 0.1) 100%);
  border-color: rgba(255, 152, 0, 0.4);
  color: #FF9800;
}

.meta-badge.difficulty-hard {
  background: linear-gradient(135deg, rgba(244, 67, 54, 0.2) 0%, rgba(244, 67, 54, 0.1) 100%);
  border-color: rgba(244, 67, 54, 0.4);
  color: #F44336;
}

.meta-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 255, 255, 0.25);
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.12);
}

.meta-badge i {
  margin-right: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.9;
}

/* ===== DATASET STATISTICS ===== */
.dataset-stats {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
}

.dataset-stats .stats-grid {
    display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.2rem;
  max-width: 800px;
}

.dataset-stats .stat-item {
  text-align: center;
  padding: 1.2rem 1rem;
  background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
  border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.dataset-stats .stat-item:hover {
  background: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 255, 255, 0.15);
  border-color: var(--primary);
}

.dataset-stats .stat-icon {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 0.6rem;
  opacity: 0.9;
}

.dataset-stats .stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.dataset-stats .stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
    text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  opacity: 0.8;
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
  margin-bottom: 3rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.05), transparent);
  transition: left 0.8s ease;
}

.content-section:hover::before {
  left: 100%;
}

.content-title {
  font-size: 1.75rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-weight: 700;
    display: flex;
    align-items: center;
  gap: 0.75rem;
}

.content-title i {
    color: var(--primary);
  font-size: 1.5rem;
}

/* ===== FILTER TABS ===== */
.filter-tabs {
  margin-bottom: 2rem;
}

.difficulty-tabs, .concept-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.concept-tabs {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
}

.tab-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
}

.tab-btn:hover {
  background: rgba(31, 212, 123, 0.2);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(31, 212, 123, 0.3);
}

.tab-btn.active {
  background: linear-gradient(135deg, #1fd47b 0%, #5a6ffb 100%);
  border-color: transparent;
  color: white;
  box-shadow: 0 6px 20px rgba(31, 212, 123, 0.4);
}

.tab-btn i {
  font-size: 0.8rem;
}

/* ===== QUESTION CARDS ===== */
.question-card {
  background: rgba(20, 30, 50, 0.3);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
  position: relative;
    overflow: hidden;
}

.question-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 60px rgba(31, 212, 123, 0.3);
  border-color: var(--primary);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.question-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(31, 212, 123, 0.1), transparent);
  transition: left 0.6s;
}

.question-card:hover::before {
  left: 100%;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 0.75rem;
  padding-right: 3rem; /* Make space for question number */
}

.question-text {
  flex: 1;
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.5;
  padding-right: 1rem; /* Add padding to prevent text overlap */
}

.question-number {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--primary);
  color: var(--bg-primary);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 10; /* Ensure it's above other elements */
}

/* ===== BADGES ===== */
.popularity-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.4rem 0.8rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  backdrop-filter: blur(10px);
  animation: badgeGlow 2s infinite alternate;
  z-index: 5; /* Ensure badges are above content but below question number */
  max-width: calc(100% - 4rem); /* Prevent overlap with question number */
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

@keyframes badgeGlow {
  0% { box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4); }
  100% { box-shadow: 0 6px 25px rgba(255, 107, 53, 0.6); }
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  margin-top: 2rem; /* Add space to avoid overlap with badges */
  padding-left: 0.5rem; /* Add some padding for better alignment */
}

.question-badge {
  padding: 0.2rem 0.6rem;
  border-radius: var(--border-radius);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
}

.question-stats {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  padding-left: 0.5rem; /* Align with meta badges */
}

.question-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 0.5rem; /* Align with other content */
  margin-top: 0.25rem; /* Add some spacing */
}

.question-hints {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ===== BUTTONS ===== */
.btn-cyber-primary {
  background: linear-gradient(90deg, #64feda 60%, #3B82F6 100%);
  color: #181c24;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  padding: 0.5em 1.2em;
  box-shadow: 0 0 12px #64feda44;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-cyber-primary:hover {
  background: linear-gradient(90deg, #3B82F6 60%, #64feda 100%);
  color: #fff;
  text-decoration: none;
}

.btn-outline-cyber {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 8px;
  font-weight: 600;
  padding: 0.5em 1.2em;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-outline-cyber:hover {
  background: var(--primary);
  color: white;
  text-decoration: none;
}

/* ===== SIDEBAR ===== */
    .sidebar {
  position: sticky;
  top: 2rem;
    }
    
    .sidebar-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
        margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.sidebar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.05), transparent);
  transition: left 0.8s ease;
}

.sidebar-card:hover::before {
  left: 100%;
}

.sidebar-title {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 700;
    display: flex;
    align-items: center;
  gap: 0.5rem;
}

.sidebar-title i {
    color: var(--primary);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-item {
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
    color: var(--primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== PROGRESS BARS ===== */
.progress-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
}

.progress-item {
  margin-bottom: 1rem;
}

.progress-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ===== TABLES ===== */
.cyber-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    margin-bottom: 1rem;
    position: relative;
}

.cyber-table {
    min-width: 600px;
    width: 100%;
    border-radius: 10px;
    border-collapse: separate;
    border-spacing: 0;
  background: var(--glass-bg);
}

.cyber-table th {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.98rem;
    border-bottom: 2.5px solid var(--primary-light);
    border-right: 1px solid var(--glass-border);
    background: rgba(100,254,218,0.10);
    color: var(--primary);
    font-weight: 700;
    padding: 0.6em 0.7em;
}

.cyber-table th:last-child {
    border-right: none;
}

.cyber-table td {
    border-right: 1px solid var(--glass-border);
    white-space: normal;
    word-break: break-word;
    font-size: 0.97rem;
    padding: 0.5em 0.7em;
  color: var(--text-primary);
  background: transparent;
}

.cyber-table td:last-child {
    border-right: none;
}

.cyber-table tr {
    border-bottom: 1px solid var(--glass-border);
}

.cyber-table tr:nth-child(even) td {
    background: rgba(100,254,218,0.04);
}

.cyber-table tr:hover td {
    background: rgba(100,254,218,0.10);
    color: var(--primary-light);
}

/* Sample Data Table */
.sample-table {
  width: 100%;
  font-size: 10px;
  border-collapse: collapse;
  background: var(--glass-bg);
}

.sample-table th {
  background: rgba(100, 255, 218, 0.1);
  padding: 4px 6px;
  text-align: left;
  font-weight: 600;
  color: var(--text-accent);
  border-bottom: 1px solid var(--glass-border);
  font-family: 'JetBrains Mono', monospace;
  border-right: 1px solid #3a3a4a;
}

.sample-table th:last-child {
  border-right: none;
}

.sample-table td {
  padding: 4px 6px;
  border-bottom: 1px solid rgba(100, 255, 218, 0.1);
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  border-right: 1px solid #3a3a4a;
}

.sample-table td:last-child {
  border-right: none;
}

.sample-table tbody tr:nth-child(even) {
  background-color: rgba(255,255,255,0.02);
}

/* ===== OVERVIEW SECTION ===== */
.overview-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.overview-card {
    background: rgba(20, 30, 50, 0.3);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.overview-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 255, 255, 0.1);
}

.overview-subtitle {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.overview-text {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.overview-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.overview-features li {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.overview-features li:last-child {
    border-bottom: none;
}

.overview-features li i {
    color: var(--primary);
    margin-right: 0.75rem;
    width: 16px;
}

/* ===== SCHEMA SECTION ===== */
.schema-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.schema-card, .sample-data-card {
    background: rgba(20, 30, 50, 0.3);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.schema-card:hover, .sample-data-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 255, 255, 0.1);
}

.schema-subtitle, .sample-data-subtitle {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

/* ===== RELATED DATASETS ===== */
.related-dataset-card {
    background: rgba(20, 30, 50, 0.3);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.related-dataset-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 255, 255, 0.1);
  border-color: var(--primary);
}

.dataset-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.dataset-card-title {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 0;
    font-weight: 600;
  flex: 1;
}

.dataset-card-badge {
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  margin-left: 0.5rem;
}

.dataset-card-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
}

.dataset-card-meta {
    display: flex;
    gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.dataset-card-meta span {
    display: flex;
    align-items: center;
  gap: 0.3rem;
}

/* ===== EMPTY STATES ===== */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-secondary);
}

.empty-state i {
  font-size: 3rem;
    color: var(--primary);
  margin-bottom: 1rem;
}

.empty-state h4 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 991px) {
  .dataset-hero {
    padding: 15px 1rem 10px;
  }
  
  .dataset-header {
    padding: 1.2rem 1.5rem 1.2rem 1.5rem;
    margin: 0 1rem 0.8rem 1rem;
  }
  
  .dataset-title {
    font-size: clamp(1.8rem, 4vw, 2.4rem) !important;
  }
  
  .dataset-meta {
    flex-direction: column !important;
    gap: 0.6rem !important;
    align-items: flex-start !important;
  }
  
  .meta-badge {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  
    .content-section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
  .sidebar {
    position: static;
    margin-top: 2rem;
  }
  
  .question-action {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .question-stats {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .dataset-stats .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .cyber-table {
    min-width: 480px;
    font-size: 0.95rem;
  }
  
  .question-meta {
    margin-top: 2.8rem; /* Slightly less space on tablet */
  }
  
  .question-header {
    padding-right: 2.8rem; /* Slightly less padding on tablet */
  }
}

@media (max-width: 768px) {
  .dataset-hero {
    padding: 12px 1rem 8px;
  }
  
  .dataset-header {
    padding: 1rem 1rem 1rem 1rem;
    margin: 0 0.5rem 0.5rem 0.5rem;
    border-radius: 12px;
  }
  
  .dataset-title {
    font-size: clamp(1.6rem, 5vw, 2rem) !important;
    margin-bottom: 0.8rem;
  }
  
  .dataset-description {
    font-size: 1rem;
    line-height: 1.5;
  }
  
  .content-section {
        padding: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .question-card {
    padding: 1rem;
  }
  
  .sidebar-card {
    padding: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .question-card {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
  }
  
  .question-meta {
        flex-direction: column;
    gap: 0.2rem;
    margin-top: 2.5rem; /* More space on mobile for badges */
  }
  
  .question-header {
    padding-right: 2.5rem; /* Less padding on mobile */
    margin-bottom: 0.5rem;
  }
  
  .question-text {
    padding-right: 0.5rem; /* Less padding on mobile */
    font-size: 1rem;
  }
  
  .question-number {
    width: 1.8rem;
    height: 1.8rem;
    font-size: 0.8rem;
  }
  
  .popularity-badge, .last-solved-badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    max-width: calc(100% - 3rem);
  }
  
  .last-solved-badge {
    top: 3rem;
  }
  
  .difficulty-tabs, .concept-tabs {
    gap: 0.3rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
  }
  
  .tab-btn {
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
    min-width: auto;
  }
  
  .sample-table {
    font-size: 0.8rem;
    overflow-x: auto;
  }
  
  .sample-table th, .sample-table td {
    padding: 0.5rem 0.3rem;
    white-space: nowrap;
  }
  
  .btn-cyber-primary, .btn-outline-cyber {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    min-height: 44px;
  }
  
  .breadcrumbs {
    font-size: 0.8rem;
    flex-wrap: wrap;
  }
  
  .breadcrumb-link,
  .breadcrumb-current {
    padding: 0.25rem 0.4rem;
  }
  
  .breadcrumb-separator {
    font-size: 0.7rem;
  }
  
  .dataset-stats .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }
  
  .dataset-stats .stat-item {
    padding: 1rem 0.8rem;
  }
  
  .dataset-stats .stat-value {
    font-size: 1.2rem;
  }
  
  .dataset-stats .stat-label {
    font-size: 0.7rem;
  }
  
  .cyber-table {
    min-width: 340px;
    font-size: 0.90rem;
  }
  
  .popularity-badge, .last-solved-badge {
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
  }
  
  .last-solved-badge {
    top: 3rem;
  }
}

/* ===== ACCESSIBILITY ===== */
.question-card:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.tab-btn:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--text-accent);
  border-radius: 4px;
  opacity: 0.6;
}

::-webkit-scrollbar-thumb:hover {
  opacity: 1;
}