:root {
  /* Color variables */
  --bg-primary: #171923;
  --bg-secondary: #1a202c;
  --bg-tertiary: #222736;
  --accent-primary: #6366f1;
  --accent-secondary: #4fd1c5;
  --accent-tertiary: #f6ad55;
  --text-primary: #f8f9fa;
  --text-secondary: #cbd5e0;
  --text-tertiary: #a0aec0;
  --danger: #fc8181;
  --success: #68d391;
  --warning: #f6ad55;
}

body, html {
  height: 100%;
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
}

.app-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  background: radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(99, 226, 183, 0.15) 0%, transparent 40%);
  overflow: hidden;
}

.bg-pattern {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opa[...]
}

@keyframes bgfade {
  0% { opacity: 0.2; }
  50% { opacity: 0.3; }
  100% { opacity: 0.25; }
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: 1rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  animation: fadein 0.8s cubic-bezier(.22, 1, .36, 1);
}

@keyframes fadein {
  from { opacity: 0; transform: translateY(2rem); }
  to   { opacity: 1; transform: none; }
}

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

.logo {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 2px 5px rgba(99, 102, 241, 0.3));
}

.logo img {
  height: 3rem;
  width: auto;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(.22, 1, .36, 1);
}

.logo img:hover {
  transform: rotate(-8deg) scale(1.1);
  box-shadow: 0 6px 20px rgba(79, 209, 197, 0.4);
}

.subtext {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* Filter container */
.filter-container {
  margin-bottom: 1.5rem;
  background: var(--bg-tertiary);
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.filter-form {
  animation: fadein 0.8s cubic-bezier(.22, 1, .36, 1);
}

.form-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.search-row {
  justify-content: space-between;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 120px;
  flex: 1;
  max-width: 200px;
}

label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.styled-select {
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #384151;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a0aec0' stroke-width='2' stroke-linecap='round' [...]
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

.styled-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.styled-select option {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 0.75rem;
}

input[type="text"] {
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  border-radius: 0.5rem;
  border: 1px solid #384151;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 100%;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.search-container {
  position: relative;
  flex: 1;
  max-width: 500px;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

#showModsBtn {
  padding: 0.6rem 1.25rem;
  background: linear-gradient(135deg, var(--accent-primary), #818cf8);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.5rem;
  white-space: nowrap;
}

#showModsBtn:hover {
  background: linear-gradient(135deg, #818cf8, var(--accent-primary));
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

#showModsBtn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* View Toggle */
.view-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.view-toggle span {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-right: 0.25rem;
}

.view-btn {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid #384151;
  border-radius: 0.375rem;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s;
}

.view-btn:hover {
  color: var(--accent-secondary);
  background: var(--bg-tertiary);
}

.view-btn.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

/* Categories */
.categories-wrapper {
  overflow-x: auto;
  padding: 0.5rem 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.categories-wrapper::-webkit-scrollbar {
  display: none;
}

.category-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.category-tag {
  padding: 0.4rem 0.8rem;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid #384151;
  border-radius: 2rem;
  font-size: 0.875rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.category-tag:hover {
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
}

.category-tag.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

/* Mod List */
.mod-list {
  margin-bottom: 1.5rem;
  max-height: 600px;
  overflow-y: auto;
  border-radius: 0.75rem;
  background: var(--bg-tertiary);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary) var(--bg-tertiary);
}

.mod-list::-webkit-scrollbar {
  width: 8px;
}

.mod-list::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
}

.mod-list::-webkit-scrollbar-thumb {
  background-color: #4a5568;
  border-radius: 20px;
}

.mod-list::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent-primary);
}

/* Grid View */
.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

/* List View */
.list-view .mod-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid #2d3748;
}

.list-view .mod-item:last-child {
  border-bottom: none;
}

/* Small Grid View */
.small-grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.small-grid-view .mod-thumb {
  display: none;
}

/* Small List View */
.small-list-view .mod-item {
  padding: 0.75rem;
  border-bottom: 1px solid #2d3748;
}

.small-list-view .mod-thumb {
  display: none;
}

/* Common Mod Item Styles */
.mod-item {
  background: var(--bg-secondary);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
  animation: modfadein 0.5s cubic-bezier(.22, 1, .36, 1);
  animation-fill-mode: backwards;
  position: relative;
}

.grid-view .mod-item {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.mod-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

@keyframes modfadein {
  from { opacity: 0; transform: translateY(1rem); }
  to   { opacity: 1; transform: translateY(0); }
}

.mod-checkbox {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--accent-secondary);
  z-index: 2;
  border-radius: 0.25rem;
  cursor: pointer;
}

.grid-view .mod-thumb-container {
  height: 120px;
  overflow: hidden;
  position: relative;
}

.grid-view .mod-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.list-view .mod-thumb {
  width: 64px;
  height: 64px;
  border-radius: 0.5rem;
  object-fit: cover;
}

.grid-view .mod-item:hover .mod-thumb {
  transform: scale(1.05);
}

.grid-view .mod-info {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.list-view .mod-info {
  flex: 1;
}

.mod-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--accent-secondary);
}

.grid-view .mod-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mod-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.small-grid-view .mod-desc,
.small-list-view .mod-desc {
  -webkit-line-clamp: 1;
}

.mod-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
}

.mod-slug {
  color: var(--accent-primary);
  font-weight: 500;
}

.mod-downloads {
  color: var(--accent-tertiary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.mod-category {
  background: rgba(79, 209, 197, 0.15);
  color: var(--accent-secondary);
  border-radius: 2rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Load More Button */
.mod-pagination {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

.load-more-btn {
  padding: 0.75rem 2rem;
  background: transparent;
  color: var(--accent-primary);
  border: 2px solid var(--accent-primary);
  border-radius: 2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.load-more-btn:hover {
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.load-more-btn.loading {
  position: relative;
  color: transparent;
}

.load-more-btn.loading::after {
  content: "";
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  top: 50%;
  left: 50%;
  margin-left: -0.625rem;
  margin-top: -0.625rem;
  border: 2px solid transparent;
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to {transform: rotate(360deg);}
}

/* Action Bar */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0 2rem;
  flex-wrap: wrap;
}

.selected-count {
  font-size: 0.95rem;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}

.selected-count span {
  font-weight: 600;
  color: var(--accent-secondary);
}

#downloadBtn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(79, 209, 197, 0.3);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#downloadBtn:hover:not(:disabled) {
  box-shadow: 0 6px 18px rgba(79, 209, 197, 0.4);
  transform: translateY(-2px);
}

#downloadBtn:disabled {
  background: #2d3748;
  color: var(--text-tertiary);
  cursor: not-allowed;
  box-shadow: none;
}

#status {
  padding: 0.5rem 1rem;
  min-height: 1.5rem;
  font-size: 0.95rem;
  color: var(--success);
  font-weight: 500;
  border-radius: 0.5rem;
  animation: fadein 0.5s;
  background: rgba(104, 211, 145, 0.1);
}

/* Footer */
footer {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-tertiary);
  margin-top: 2rem;
}

footer a {
  color: var(--accent-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

/* NEW STYLES FOR MOD UPDATER */
.mod-updater-section {
  margin: 3rem 0;
  border-top: 1px solid #2d3748;
  padding-top: 2rem;
  animation: fadein 0.8s cubic-bezier(.22, 1, .36, 1);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--accent-secondary);
  text-align: center;
}

.section-desc {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.updater-container {
  background: var(--bg-tertiary);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.file-input-wrapper {
  position: relative;
  margin-bottom: 0.5rem;
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.file-input-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #384151;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
  white-space: nowrap;
}

.file-input-label:hover {
  background: var(--bg-primary);
  border-color: var(--accent-primary);
}

.file-count {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.analyze-btn {
  padding: 0.6rem 1.25rem;
  background: linear-gradient(135deg, var(--accent-tertiary), #f59e0b);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(246, 173, 85, 0.3);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.5rem;
  white-space: nowrap;
}

.analyze-btn:hover {
  background: linear-gradient(135deg, #f59e0b, var(--accent-tertiary));
  box-shadow: 0 4px 18px rgba(246, 173, 85, 0.4);
  transform: translateY(-1px);
}

.analyze-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(246, 173, 85, 0.3);
}

.analyze-status {
  margin: 1.5rem 0;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  background: rgba(160, 174, 192, 0.1);
  color: var(--text-secondary);
  animation: fadein 0.3s ease;
}

.analyze-status.loading {
  background: rgba(246, 173, 85, 0.1);
  color: var(--accent-tertiary);
  position: relative;
  padding-left: 2.5rem;
}

.analyze-status.loading::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(246, 173, 85, 0.3);
  border-top-color: var(--accent-tertiary);
  border-radius: 50%;
  animation: spinner 0.8s linear infinite;
}

.analyze-status.success {
  background: rgba(104, 211, 145, 0.1);
  color: var(--success);
}

.analyze-status.error {
  background: rgba(252, 129, 129, 0.1);
  color: var(--danger);
}

.analyze-status.warning {
  background: rgba
