:root {
  /* Ghibli-inspired color palette */
  --ghibli-blue: #58b2dc;
  --ghibli-light-blue: #a5d4de;
  --ghibli-bg: #f3f9fb;
  --ghibli-cream: #f7f1e5;
  --ghibli-green: #88a75e;
  --ghibli-brown: #c69c6d;
  --ghibli-light-brown: #e6ccb2;
  --ghibli-dark: #34626c;
  --ghibli-pink: #e98a98;
  --ghibli-yellow: #ffd700;
  
  /* UI Colors */
  --success: #6cb66f;
  --error: #e85c5c;
  --warning: #f5c46b;
  --info: var(--ghibli-blue);
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.14);
  
  /* Animations */
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
}

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

body {
  font-family: 'Noto Sans', sans-serif;
  background-color: var(--ghibli-bg);
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ===== Clouds Animation ===== */
.clouds {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.cloud {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0.6;
  box-shadow: var(--shadow-sm);
}

.cloud::before,
.cloud::after {
  content: '';
  position: absolute;
  background: white;
  border-radius: 50%;
}

.cloud1 {
  width: 200px;
  height: 60px;
  top: 15%;
  left: -200px;
  animation: float-cloud 120s linear infinite;
}

.cloud1::before {
  width: 90px;
  height: 90px;
  top: -50px;
  left: 25px;
}

.cloud1::after {
  width: 120px;
  height: 120px;
  top: -70px;
  right: 25px;
}

.cloud2 {
  width: 300px;
  height: 100px;
  top: 45%;
  left: -300px;
  animation: float-cloud 180s linear infinite;
  animation-delay: 10s;
}

.cloud2::before {
  width: 130px;
  height: 130px;
  top: -70px;
  left: 40px;
}

.cloud2::after {
  width: 180px;
  height: 180px;
  top: -90px;
  right: 40px;
}

.cloud3 {
  width: 150px;
  height: 40px;
  top: 25%;
  left: -150px;
  animation: float-cloud 100s linear infinite;
  animation-delay: 20s;
}

.cloud3::before {
  width: 60px;
  height: 60px;
  top: -30px;
  left: 20px;
}

.cloud3::after {
  width: 80px;
  height: 80px;
  top: -40px;
  right: 20px;
}

.cloud4 {
  width: 220px;
  height: 70px;
  top: 65%;
  left: -220px;
  animation: float-cloud 150s linear infinite;
  animation-delay: 30s;
}

.cloud4::before {
  width: 100px;
  height: 100px;
  top: -60px;
  left: 30px;
}

.cloud4::after {
  width: 140px;
  height: 140px;
  top: -80px;
  right: 30px;
}

@keyframes float-cloud {
  0% {
    transform: translateX(-100px);
  }
  100% {
    transform: translateX(calc(100vw + 300px));
  }
}

/* ===== Totoro Animation ===== */
.totoro-container {
  position: absolute;
  top: -100px;
  right: 30px;
  width: 120px;
  height: 150px;
  z-index: 5;
  transform: scale(0.7);
  transition: transform 0.5s ease-out;
}

.totoro-container:hover {
  transform: scale(0.8) translateY(10px);
}

.totoro {
  position: relative;
  width: 100%;
  height: 100%;
}

.totoro-face {
  position: absolute;
  width: 100px;
  height: 80px;
  background-color: #93928c;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  top: 20px;
  left: 10px;
  z-index: 2;
}

.eyes {
  position: absolute;
  width: 100%;
  display: flex;
  justify-content: center;
  top: 25px;
  gap: 25px;
}

.eye {
  width: 15px;
  height: 15px;
  background-color: #000;
  border-radius: 50%;
  animation: blink 4s infinite;
}

@keyframes blink {
  0%, 96%, 98% {
    transform: scaleY(1);
  }
  97% {
    transform: scaleY(0.1);
  }
}

.nose {
  position: absolute;
  width: 15px;
  height: 10px;
  background-color: #000;
  border-radius: 50%;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
}

.whiskers {
  position: absolute;
  width: 100%;
  top: 45px;
}

.whisker {
  position: absolute;
  height: 2px;
  background-color: #000;
  transform-origin: center left;
}

.whisker:nth-child(1) {
  width: 25px;
  left: 20px;
  top: 0;
  transform: rotate(-10deg);
}

.whisker:nth-child(2) {
  width: 20px;
  left: 20px;
  top: 8px;
  transform: rotate(10deg);
}

.whisker:nth-child(3) {
  width: 25px;
  left: 20px;
  top: 16px;
  transform: rotate(30deg);
}

.whisker:nth-child(4) {
  width: 25px;
  right: 20px;
  top: 0;
  transform: rotate(10deg);
}

.whisker:nth-child(5) {
  width: 20px;
  right: 20px;
  top: 8px;
  transform: rotate(-10deg);
}

.whisker:nth-child(6) {
  width: 25px;
  right: 20px;
  top: 16px;
  transform: rotate(-30deg);
}

.totoro-body {
  position: absolute;
  width: 120px;
  height: 100px;
  background-color: #93928c;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  top: 70px;
  left: 0;
  z-index: 1;
}

.totoro-belly {
  position: absolute;
  width: 80px;
  height: 60px;
  background-color: #ccc;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  top: 90px;
  left: 20px;
  z-index: 2;
  background: repeating-linear-gradient(
    to bottom,
    #ccc,
    #ccc 5px,
    #bbb 5px,
    #bbb 10px
  );
}

.totoro-leaf {
  position: absolute;
  width: 40px;
  height: 40px;
  background-color: var(--ghibli-green);
  border-radius: 0 50% 0 50%;
  top: 0;
  left: 40px;
  z-index: 3;
  transform: rotate(45deg);
  animation: leaf-sway 3s ease-in-out infinite;
}

@keyframes leaf-sway {
  0%, 100% {
    transform: rotate(45deg);
  }
  50% {
    transform: rotate(55deg);
  }
}

/* ===== Soot Sprites ===== */
.soot-sprite-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  z-index: -1;
  pointer-events: none;
}

.soot-sprite {
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: #000;
  border-radius: 50%;
  bottom: 0;
  animation: float-up 10s ease-in-out infinite;
  opacity: 0.6;
}

.soot-sprite::before,
.soot-sprite::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 5px;
  background-color: #444;
  border-radius: 50%;
  top: 5px;
}

.soot-sprite::before {
  left: 5px;
}

.soot-sprite::after {
  right: 5px;
}

@keyframes float-up {
  0% {
    transform: translateY(0) scale(0.8);
    opacity: 0.6;
  }
  70% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-100px) scale(0.3);
    opacity: 0;
  }
}

/* ===== Main Container ===== */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
}

header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

h1 {
  color: var(--ghibli-dark);
  font-family: 'Noto Serif', serif;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.subtitle {
  display: block;
  font-size: 1rem;
  color: var(--ghibli-pink);
  font-weight: normal;
  letter-spacing: 1px;
}

/* ===== Card Design ===== */
.card {
  background-color: #fff;
  border-radius: 15px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition-normal);
  transform-origin: center;
  animation: appear 0.5s ease-out;
}

@keyframes appear {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

/* ===== Tabs ===== */
.tab-container {
  display: flex;
  background-color: var(--ghibli-light-blue);
  padding: 0.5rem;
  border-radius: 15px 15px 0 0;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.75rem 1.5rem;
  color: var(--ghibli-dark);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition-normal);
  flex: 1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  outline: none;
}

.tab-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.tab-btn.active {
  background-color: white;
  color: var(--ghibli-blue);
  box-shadow: var(--shadow-sm);
}

.tab-content {
  padding: 2rem;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fade-in 0.3s ease-in-out;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===== Form Elements ===== */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--ghibli-dark);
  font-weight: 500;
}

/* ===== Instructions Card ===== */
.instructions-card {
  background-color: var(--ghibli-cream);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--ghibli-blue);
  box-shadow: var(--shadow-sm);
}

.instructions-card p {
  margin-bottom: 1rem;
  color: var(--ghibli-dark);
}

.instructions-card ol {
  padding-left: 1.5rem;
}

.instructions-card li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

/* ===== Index Links ===== */
.index-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 1.5rem 0;
}

.category h3 {
  margin-bottom: 1rem;
  color: var(--ghibli-dark);
  font-size: 1.1rem;
  border-bottom: 2px solid var(--ghibli-light-blue);
  padding-bottom: 0.5rem;
}

.link-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.download-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background-color: white;
  border-radius: 8px;
  color: var(--ghibli-dark);
  text-decoration: none;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--ghibli-light-blue);
  gap: 0.75rem;
  font-weight: 500;
}

.download-link:hover {
  background-color: var(--ghibli-blue);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.download-link i {
  color: var(--ghibli-blue);
  font-size: 1.1rem;
  transition: var(--transition-normal);
}

.download-link:hover i {
  color: white;
}

.bse-note {
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  padding: 1rem;
  border: 1px dashed var(--ghibli-light-brown);
}

.bse-note p {
  margin-bottom: 1rem;
  font-style: italic;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.bse-note p i {
  color: var(--warning);
  font-size: 1.2rem;
  margin-top: 2px;
}

/* ===== Upload Container ===== */
.upload-container {
  display: flex;
  gap: 2rem;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border: 2px solid var(--ghibli-light-blue);
}

.file-upload-btn {
  flex-shrink: 0;
}

.file-upload-btn label {
  cursor: pointer;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}

.file-upload-info {
  flex-grow: 1;
}

.file-upload-info p {
  margin: 0 0 0.5rem 0;
  color: var(--ghibli-dark);
}

.file-format-info {
  color: #777;
  font-size: 0.9rem;
  font-style: italic;
}

/* ===== Uploaded Files ===== */
.uploaded-files {
  margin: 2rem 0;
}

.uploaded-files h3 {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.uploaded-files #file-count {
  margin-left: 0.5rem;
  font-size: 0.9rem;
  font-weight: normal;
  color: var(--ghibli-blue);
}

.file-list {
  max-height: 300px;
  overflow-y: auto;
  background-color: white;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #eee;
}

.file-item:last-child {
  border-bottom: none;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.file-icon {
  color: var(--ghibli-blue);
  font-size: 1.2rem;
}

.file-name {
  font-weight: 500;
  color: var(--ghibli-dark);
}

.file-index {
  background-color: var(--ghibli-light-blue);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-left: 0.5rem;
  color: var(--ghibli-dark);
}

.file-size {
  color: #777;
  font-size: 0.85rem;
}

.file-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  font-size: 1.1rem;
  transition: var(--transition-normal);
}

.file-remove:hover {
  color: var(--error);
}

/* ===== Summary Box ===== */
.summary-box {
  background-color: var(--ghibli-cream);
  border-radius: 10px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid var(--success);
  box-shadow: var(--shadow-sm);
  display: none;
}

.summary-box h3 {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ghibli-dark);
}

.summary-box h3 i {
  color: var(--success);
}

.summary-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.summary-content p {
  margin: 0;
  color: var(--ghibli-dark);
}

.summary-content span {
  font-weight: 700;
  color: var(--ghibli-blue);
  margin-left: 0.5rem;
}

.checkbox .checkmark:after {
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ===== Buttons ===== */
.actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.btn-primary {
  background-color: var(--ghibli-blue);
  color: white;
}

.btn-primary:hover {
  background-color: #4a9dc1;
}

.btn-secondary {
  background-color: var(--ghibli-cream);
  color: var(--ghibli-dark);
}

.btn-secondary:hover {
  background-color: #eae0d0;
}

.btn-danger {
  background-color: var(--error);
  color: white;
}

.btn-danger:hover {
  background-color: #d14f4f;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ===== Progress Bars ===== */
.progress-container {
  margin-bottom: 2rem;
}

.progress {
  width: 100%;
  height: 20px;
  background-color: var(--ghibli-light-blue);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar {
  height: 100%;
  background-color: var(--ghibli-blue);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 10px;
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 40px 40px;
  animation: progress-animation 2s linear infinite;
}

@keyframes progress-animation {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 40px 0;
  }
}

.progress-text {
  text-align: center;
  color: var(--ghibli-dark);
  font-weight: 500;
}

/* ===== Task Progress ===== */
.task-progress {
  background-color: var(--ghibli-cream);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.task-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.task-row:last-child {
  border-bottom: none;
}

.task-name {
  font-weight: 500;
}

.status-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
}

.status-icon.pending {
  background-color: var(--ghibli-light-brown);
}

.status-icon.success {
  background-color: var(--success);
}

.status-icon.error {
  background-color: var(--error);
}

.status-icon.working {
  background-color: var(--ghibli-blue);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

/* ===== Logs Section ===== */
.logs-container {
  height: 300px;
  overflow-y: auto;
  background-color: #1e1e1e;
  border-radius: 8px;
  padding: 1rem;
  font-family: monospace;
  margin-bottom: 1rem;
}

.log-entries {
  color: #e0e0e0;
  line-height: 1.5;
}

.log-entry {
  padding: 0.25rem 0;
  border-bottom: 1px solid #333;
}

.log-entry:last-child {
  border-bottom: none;
}

.log-time {
  color: #888;
  margin-right: 0.5rem;
}

.log-info {
  color: var(--info);
}

.log-success {
  color: var(--success);
}

.log-error {
  color: var(--error);
}

.log-warning {
  color: var(--warning);
}

/* ===== Results Section ===== */
.results-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background-color: white;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--ghibli-light-blue);
  transition: var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  font-size: 1.5rem;
  color: var(--ghibli-blue);
  margin-bottom: 0.5rem;
}

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

.stat-label {
  color: #777;
}

.table-container {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  max-height: 400px;
  overflow-y: auto;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
}

.results-table th {
  background-color: var(--ghibli-light-blue);
  color: var(--ghibli-dark);
  text-align: left;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 1;
}

.results-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #eee;
}

.results-table tbody tr:hover {
  background-color: #f9f9f9;
}

.results-table tbody tr:last-child td {
  border-bottom: none;
}

/* ===== Footer ===== */
footer {
  margin-top: 3rem;
  text-align: center;
  color: var(--ghibli-dark);
  padding: 1rem;
}

.heart {
  color: var(--ghibli-pink);
  display: inline-block;
  animation: beat 1.5s infinite;
}

@keyframes beat {
  0%, 100% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.2);
  }
  30% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.1);
  }
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  h1 {
    font-size: 1.8rem;
  }
  
  .tab-container {
    flex-wrap: wrap;
  }
  
  .tab-btn {
    flex: 1 0 calc(50% - 0.5rem);
    margin-bottom: 0.5rem;
  }
  
  .index-selection {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .results-stats {
    grid-template-columns: 1fr 1fr;
  }
  
  .table-container {
    overflow-x: auto;
  }
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--ghibli-light-blue);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ghibli-blue);
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.category h3 {
  color: var(--ghibli-dark);
  font-size: 1.1rem;
  margin: 0;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  line-height: 1.2;
}
 /* ===== Index Summary Styles (Add to end of style.css) ===== */
 /* Replace the previous index-summary styles with these improved ones */

.index-summary {
  background: linear-gradient(135deg, var(--ghibli-cream) 0%, #f9f6f0 100%);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--ghibli-blue);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.index-summary::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(88, 178, 220, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(30px, -30px);
}

.index-summary h3 {
  color: var(--ghibli-dark);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Noto Serif', serif;
  font-size: 1.2rem;
  position: relative;
  z-index: 1;
}

.index-summary h3 i {
  color: var(--ghibli-blue);
  font-size: 1.1rem;
}

.indices-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.index-tag {
  background: white;
  border: 1px solid var(--ghibli-light-blue);
  border-radius: 25px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--ghibli-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  font-weight: 500;
}

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

.index-tag:hover {
  background: linear-gradient(135deg, var(--ghibli-light-blue), #b8dde6);
  border-color: var(--ghibli-blue);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 20px rgba(88, 178, 220, 0.25);
  color: var(--ghibli-dark);
}

.index-tag:hover::before {
  left: 100%;
}

.index-tag:hover .count {
  background-color: var(--ghibli-dark);
  transform: scale(1.1);
}

.index-tag .count {
  background: linear-gradient(135deg, var(--ghibli-blue), #4a9dc1);
  color: white;
  border-radius: 12px;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(88, 178, 220, 0.3);
  transition: all var(--transition-normal);
}

.no-data {
  color: #888;
  font-style: italic;
  margin: 0;
  padding: 1rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  border: 2px dashed var(--ghibli-light-blue);
}

/* Animation for when tags appear */
.index-tag {
  animation: slideInTag 0.4s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes slideInTag {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger the animation for multiple tags */
.index-tag:nth-child(1) { animation-delay: 0.05s; }
.index-tag:nth-child(2) { animation-delay: 0.1s; }
.index-tag:nth-child(3) { animation-delay: 0.15s; }
.index-tag:nth-child(4) { animation-delay: 0.2s; }
.index-tag:nth-child(5) { animation-delay: 0.25s; }
.index-tag:nth-child(6) { animation-delay: 0.3s; }
.index-tag:nth-child(7) { animation-delay: 0.35s; }
.index-tag:nth-child(8) { animation-delay: 0.4s; }
.index-tag:nth-child(9) { animation-delay: 0.45s; }
.index-tag:nth-child(10) { animation-delay: 0.5s; }

/* For tags beyond 10, use a base delay */
.index-tag:nth-child(n+11) { animation-delay: 0.55s; }

/* Responsive design */
@media (max-width: 768px) {
  .index-summary {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .index-summary h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
  
  .indices-list {
    gap: 0.5rem;
  }
  
  .index-tag {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
  
  .index-tag .count {
    padding: 0.15rem 0.4rem;
    font-size: 0.7rem;
  }
}

/* Additional polish for better integration */
.index-summary {
  border: 1px solid rgba(88, 178, 220, 0.2);
}

.index-tag:active {
  transform: translateY(-1px) scale(0.98);
  transition: transform 0.1s ease;
}

/* Special styling for different types of indices */
.index-tag[data-type="major"] .count {
  background: linear-gradient(135deg, var(--ghibli-yellow), #e6c200);
}

.index-tag[data-type="sectoral"] .count {
  background: linear-gradient(135deg, var(--ghibli-green), #759954);
}

.index-tag[data-type="fo"] .count {
  background: linear-gradient(135deg, var(--ghibli-pink), #d17a87);
}

.index-tag[data-type="bse"] .count {
  background: linear-gradient(135deg, var(--ghibli-brown), #b5895f);
}


/* Add these new styles to your existing CSS */
.index-tag.not-included {
  background: #f5f5f5;
  border-color: #ddd;
  color: #999;
  opacity: 0.7;
}

.index-tag.not-included:hover {
  background: #eeeeee;
  border-color: #ccc;
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.index-tag.not-included .count {
  background: #bbb;
  color: white;
}
.index-tag.included {
  /* Keep existing styles - just for clarity */
}

#file-upload {
  display: none;
}