/* datasets/style.css */

:root {
  /* Main Web Theme Colors */
  --bg-main: #000000;       /* ප්‍රධාන පසුබිම (තනි කළු) */
  --bg-sidebar: #0a0f1a;    /* Sidebar එකට පොඩ්ඩක් වෙනස් කළු පාටක් */
  --bg-card: #111827;       /* කාඩ් සහ කොටස් සඳහා පසුබිම */
  
  --accent: #27d494;        /* Main වෙබ් එකේ කොළ පාට (Green Accent) */
  --accent-hover: #1fb981;  /* Hover කරද්දි එන පාට */
  
  --border: #1f2937;        /* බෝඩර් පාට */
  --text-primary: #ffffff;  /* ප්‍රධාන අකුරු පාට */
  --text-secondary: #94a3b8;/* අතුරු අකුරු පාට */
  
  --font-main: 'Inter', sans-serif;
  --font-code: 'JetBrains Mono', monospace;
  --sidebar-width: 340px;
}

/* Scrollbar එකටත් අලුත් පාට */
::-webkit-scrollbar-thumb { background: #374151; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-main); }


body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-main);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-header {
  padding: 25px 20px 15px;
  border-bottom: 1px solid rgba(55, 65, 81, 0.5);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

/* 1. Back Button Hover */
.back-btn:hover {
  color: var(--accent); /* නිල් පාට වෙනුවට කොළ පාට */
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-icon {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
}

.brand-title h1 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0;
}

.brand-title p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 2px 0 0 0;
}

.search-bar {
  margin: 15px 20px;
  background-color: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

.search-bar input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  outline: none;
  width: 100%;
  font-family: var(--font-main);
}

.dataset-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

.dataset-item {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(55, 65, 81, 0.3);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-left: 3px solid transparent;
}

.dataset-item:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* 2. Dataset List එකේ Active Item එක */
.dataset-item.active {
  background-color: rgba(39, 212, 148, 0.1); /* ලා කොළ පාට පසුබිමක් */
  border-left-color: var(--accent); /* වම් පැත්තේ ඉර තද කොළ පාටින් */
}

.ds-repo-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
  word-break: break-all;
}

.ds-meta-mini {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  gap: 10px;
}

/* Main Content Styles */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
}

.content-wrapper {
  padding: 40px 50px;
  max-width: 1100px;
  margin: 0 auto;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* HF Style Metadata Bar */
.hf-header {
  margin-bottom: 25px;
}

.hf-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0 0 15px 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.hf-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.badge {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid;
}

/* 4. Metadata Badges (භාෂාව පෙන්නන නිල් පාට එක විතරක් වෙනස් කරන්න) */
.badge-lang {
  color: var(--accent);
  background: rgba(39, 212, 148, 0.1);
  border-color: rgba(39, 212, 148, 0.2);
}
.badge-license { color: #10b981; background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.2); }
.badge-size { color: #f59e0b; background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.2); }
.badge-task { color: #8b5cf6; background: rgba(139, 92, 246, 0.1); border-color: rgba(139, 92, 246, 0.2); }
.badge-tag { color: var(--text-secondary); background: var(--bg-card); border-color: var(--border); font-size: 0.8rem;}

/* Random Image Banner */
.dataset-banner {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 30px;
  opacity: 0.8;
}

/* Sections: Schema, Splits, etc. */
.ds-section {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
}

.ds-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

/* Table for Features/Schema */
.schema-table {
  width: 100%;
  border-collapse: collapse;
}

.schema-table th, .schema-table td {
  text-align: left;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
}

.schema-table th {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
}

.schema-table td {
  font-family: var(--font-code);
  font-size: 0.9rem;
}

.dtype-string { color: var(--accent); }
.dtype-int { color: #3b82f6; }
.dtype-float { color: #f59e0b; }
.dtype-bool { color: #ef4444; }

/* Splits Cards */
.splits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.split-card {
  background-color: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.split-name {
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-code);
}

.split-rows {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.hf-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--accent);
  color: #000000;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.hf-link-btn:hover {
  background-color: var(--accent-hover);
  color: #000000;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(39, 212, 148, 0.3); /* කොළ පාට ෂැඩෝ එකක් */
}
.hf-link-btn img { width: 20px; } /* HF logo size */

/* Responsive */
@media (max-width: 900px) {
  .app-layout { flex-direction: column; }
  .sidebar { width: 100%; position: relative; height: 300px; border-right: none; border-bottom: 1px solid var(--border); }
  .main-content { margin-left: 0; }
  .content-wrapper { padding: 20px; }
  .dataset-banner { height: 180px; }
}

/* ලෝගෝ එකේ සයිස් එක */
.brand-logo {
  width: 45px;
  height: 45px;
  border-radius: 8px;
  object-fit: cover;
}

/* sh4lu-z Datasets මාතෘකාවේ 'Datasets' කෑල්ලට නිල් පාටක් */
.brand-title h1 span {
  color: var(--accent-blue);
}

/* Footer එක */
.footer {
  text-align: center;
  padding: 20px;
  opacity: 0.5;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  background-color: var(--bg-main);
  margin-top: auto; /* Footer එක දිගටම යටින් තියාගන්න */

}

/* Back Icon Button Styling */
.back-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: #161b22; /* පේජ් එකට වඩා පොඩ්ඩක් තද පාටක් */
    color: #4ade80; /* ඔයාගේ Mint Green පාට */
    border-radius: 50%; /* රවුම් බටන් එකක් */
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid #30363d;
    margin-bottom: 30px; /* පල්ලෙහයින් තියෙන Content එකට ඉඩ තියන්න */
}

/* Mouse එක උඩට ගියාම වෙනස් වෙන විදිහ */
.back-icon-btn:hover {
    background-color: #4ade80;
    color: #05070a; /* Background එකේ කළු පාට */
    transform: translateX(-5px); /* වමට පොඩ්ඩක් මූව් වෙනවා */
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.3);
}
