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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: #050d0a;
  color: #e8f5f3;
  min-height: 100vh;
}

/* Background Decorations */
.bg-decoration {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.bg-blur-1 {
  position: absolute;
  top: -10rem;
  right: -10rem;
  width: 20rem;
  height: 20rem;
  background-color: rgba(45, 212, 191, 0.15);
  border-radius: 50%;
  filter: blur(80px);
}

.bg-blur-2 {
  position: absolute;
  bottom: -10rem;
  left: -10rem;
  width: 20rem;
  height: 20rem;
  background-color: rgba(45, 212, 191, 0.1);
  border-radius: 50%;
  filter: blur(80px);
}

.bg-blur-warning {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translateX(-50%);
  width: 24rem;
  height: 24rem;
  background-color: rgba(239, 68, 68, 0.1);
  border-radius: 50%;
  filter: blur(80px);
}

/* Container */
.container {
  position: relative;
  z-index: 1;
  max-width: 28rem;
  margin: 0 auto;
  padding: 0.75rem;
}

@media (min-width: 640px) {
  .container {
    padding: 1.5rem;
  }
}

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

@media (min-width: 640px) {
  .header {
    margin-bottom: 1.5rem;
  }
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .logo-container {
    gap: 0.75rem;
  }
}

.logo-icon {
  width: 1.75rem;
  height: 1.75rem;
  background: linear-gradient(135deg, #2dd4bf, rgba(45, 212, 191, 0.7));
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(45, 212, 191, 0.3);
}

@media (min-width: 640px) {
  .logo-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.625rem;
  }
}

.logo-icon svg {
  width: 0.875rem;
  height: 0.875rem;
  color: #042f2e;
}

@media (min-width: 640px) {
  .logo-icon svg {
    width: 1.125rem;
    height: 1.125rem;
  }
}

.logo-text {
  font-size: 1.125rem;
  font-weight: 700;
}

@media (min-width: 640px) {
  .logo-text {
    font-size: 1.375rem;
  }
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 640px) {
  .header-buttons {
    gap: 0.5rem;
  }
}

.icon-btn {
  background-color: #14292a;
  border: 1px solid #1e3a3a;
  border-radius: 0.625rem;
  padding: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5eead4;
}

@media (min-width: 640px) {
  .icon-btn {
    padding: 0.5rem;
    border-radius: 0.75rem;
  }
}

.icon-btn:hover {
  background-color: #1e3a3a;
}

.icon-btn svg {
  width: 0.875rem;
  height: 0.875rem;
}

@media (min-width: 640px) {
  .icon-btn svg {
    width: 1rem;
    height: 1rem;
  }
}

.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: #e8f5f3;
}

.menu-btn:hover {
  opacity: 0.8;
}

.menu-btn svg {
  width: 1rem;
  height: 1rem;
}

@media (min-width: 640px) {
  .menu-btn svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

/* Search Bar */
.search-bar {
  margin-bottom: 1rem;
  border-radius: 0.75rem;
  border: 1px solid #1e3a3a;
  background-color: rgba(12, 26, 22, 0.8);
  backdrop-filter: blur(4px);
  padding: 0.625rem 0.875rem;
}

@media (min-width: 640px) {
  .search-bar {
    margin-bottom: 1.5rem;
    border-radius: 1rem;
    padding: 0.875rem 1rem;
  }
}

.search-inner {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

@media (min-width: 640px) {
  .search-inner {
    gap: 0.75rem;
  }
}

.search-icon {
  color: #2dd4bf;
  flex-shrink: 0;
}

.search-icon svg {
  width: 1.125rem;
  height: 1.125rem;
}

@media (min-width: 640px) {
  .search-icon svg {
    width: 1.375rem;
    height: 1.375rem;
  }
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e8f5f3;
  font-size: 0.8125rem;
  min-width: 0;
}

@media (min-width: 640px) {
  .search-input {
    font-size: 0.9375rem;
  }
}

.search-input::placeholder {
  color: #5eead4;
}

/* App List */
.app-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

@media (min-width: 640px) {
  .app-list {
    gap: 0.875rem;
  }
}

/* App Card */
.app-card {
  border-radius: 0.75rem;
  border: 1px solid #1e3a3a;
  background-color: rgba(12, 26, 22, 0.8);
  backdrop-filter: blur(4px);
  padding: 0.75rem;
  transition: all 0.3s;
}

@media (min-width: 640px) {
  .app-card {
    border-radius: 1rem;
    padding: 1rem;
  }
}

.app-card:hover {
  border-color: rgba(45, 212, 191, 0.3);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.app-content {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

@media (min-width: 640px) {
  .app-content {
    gap: 0.875rem;
  }
}

.app-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.625rem;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

@media (min-width: 640px) {
  .app-icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.75rem;
  }
}

.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.app-name {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 640px) {
  .app-name {
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
  }
}

.app-meta {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.625rem;
  flex-wrap: wrap;
}

@media (min-width: 640px) {
  .app-meta {
    gap: 0.375rem;
    font-size: 0.6875rem;
  }
}

.version-number {
  color: #2dd4bf;
  font-weight: 500;
}

.separator {
  color: #1e3a3a;
  margin: 0 0.125rem;
}

.app-size {
  color: #5eead4;
  font-weight: 500;
}

/* Star Rating */
.app-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.25rem;
  padding: 0.125rem 0.375rem;
  background-color: rgba(20, 41, 42, 0.8);
  border-radius: 0.375rem;
  width: fit-content;
}

@media (min-width: 640px) {
  .app-rating {
    gap: 0.375rem;
    margin-top: 0.375rem;
    padding: 0.1875rem 0.5rem;
  }
}

.stars {
  display: flex;
  align-items: center;
  gap: 0.0625rem;
}

.star {
  width: 0.625rem;
  height: 0.625rem;
}

@media (min-width: 640px) {
  .star {
    width: 0.75rem;
    height: 0.75rem;
  }
}

.star.filled {
  fill: #facc15;
  color: #facc15;
}

.star.half {
  fill: #facc15;
  color: #facc15;
  opacity: 0.6;
}

.star.empty {
  fill: #374151;
  color: #374151;
}

.rating-number {
  font-size: 0.625rem;
  font-weight: 600;
  color: #e8f5f3;
}

@media (min-width: 640px) {
  .rating-number {
    font-size: 0.6875rem;
  }
}

/* Placeholder Icon for Custom Mods */
.placeholder-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2dd4bf, rgba(45, 212, 191, 0.6));
  color: #042f2e;
  font-size: 0.5rem;
  font-weight: 700;
}

@media (min-width: 640px) {
  .placeholder-icon {
    font-size: 0.5625rem;
  }
}

/* Install Button */
.install-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  background: linear-gradient(135deg, #2dd4bf, rgba(45, 212, 191, 0.8));
  border: none;
  border-radius: 0.5rem;
  padding: 0.375rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #042f2e;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  box-shadow: 0 4px 6px rgba(45, 212, 191, 0.3);
  white-space: nowrap;
  min-width: 60px;
}

@media (min-width: 640px) {
  .install-btn {
    gap: 0.375rem;
    border-radius: 0.625rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    min-width: 72px;
  }
}

.install-btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.install-btn:active {
  transform: scale(0.98);
}

.install-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.install-btn svg {
  width: 0.6875rem;
  height: 0.6875rem;
}

@media (min-width: 640px) {
  .install-btn svg {
    width: 0.8125rem;
    height: 0.8125rem;
  }
}

/* Progress Section */
.progress-section {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(30, 58, 58, 0.5);
  display: none;
}

@media (min-width: 640px) {
  .progress-section {
    margin-top: 1rem;
    padding-top: 1rem;
  }
}

.progress-section.active {
  display: block;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.375rem;
  font-size: 0.625rem;
}

@media (min-width: 640px) {
  .progress-header {
    margin-bottom: 0.5rem;
    font-size: 0.6875rem;
  }
}

.progress-label {
  color: #5eead4;
}

.progress-percent {
  color: #2dd4bf;
  font-weight: 500;
}

.progress-track {
  height: 0.375rem;
  background-color: #14292a;
  border-radius: 9999px;
  overflow: hidden;
}

@media (min-width: 640px) {
  .progress-track {
    height: 0.5rem;
  }
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2dd4bf, rgba(45, 212, 191, 0.7));
  border-radius: 9999px;
  transition: width 0.1s linear;
  width: 0%;
}

/* Missing Files Page */
.missing-files-page {
  display: none;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  position: relative;
  z-index: 1;
}

@media (min-width: 640px) {
  .missing-files-page {
    padding: 1.5rem;
  }
}

.missing-files-page.active {
  display: flex;
}

.main-page {
  display: block;
}

.main-page.hidden {
  display: none;
}

.missing-card {
  width: 100%;
  max-width: 26rem;
  border-radius: 1.25rem;
  border: 2px solid #1e3a3a;
  background-color: rgba(12, 26, 22, 0.9);
  backdrop-filter: blur(4px);
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

@media (min-width: 640px) {
  .missing-card {
    border-radius: 1.5rem;
    padding: 2rem;
  }
}

.warning-icon-container {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
  border: 1px solid rgba(239, 68, 68, 0.2);
}

@media (min-width: 640px) {
  .warning-icon-container {
    width: 5rem;
    height: 5rem;
    margin-bottom: 1.25rem;
    border-radius: 1.5rem;
  }
}

.warning-icon-container svg {
  width: 2rem;
  height: 2rem;
  color: #ef4444;
}

@media (min-width: 640px) {
  .warning-icon-container svg {
    width: 2.5rem;
    height: 2.5rem;
  }
}

.missing-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
  .missing-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }
}

.missing-text {
  font-size: 0.8125rem;
  color: #5eead4;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
  .missing-text {
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1.75rem;
  }
}

.go-btn {
  width: 100%;
  background: linear-gradient(90deg, #2dd4bf, rgba(45, 212, 191, 0.8));
  border: none;
  border-radius: 0.875rem;
  padding: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #042f2e;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 10px 25px rgba(45, 212, 191, 0.3);
}

@media (min-width: 640px) {
  .go-btn {
    border-radius: 1rem;
    padding: 1.25rem;
    font-size: 1.5rem;
  }
}

.go-btn:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.go-btn:active {
  transform: scale(0.98);
}

/* Utility Classes */
.hidden {
  display: none !important;
}
