* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: #121212;
  color: #e8eaed;
  scroll-behavior: smooth;
}

header {
  position: sticky;
  top: 0;
  background: #1c2526;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.logo {
  font-size: 1.8rem;
  font-weight: 600;
  background: linear-gradient(45deg, #6200ea, #8b5cf6);
  -webkit-background-clip: text;
  color: transparent;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: #e8eaed;
  font-size: 1.5rem;
  cursor: pointer;
}

nav {
  display: flex;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin: 0 1rem;
}

nav ul li a {
  color: #e8eaed;
  text-decoration: none;
  font-size: 1rem;
  padding: 0.5rem;
  transition: color 0.3s, transform 0.3s;
}

nav ul li a.active,
nav ul li a:hover {
  color: #8b5cf6;
  transform: scale(1.05);
}

.search-bar {
  display: flex;
  align-items: center;
  background: #2c2f33;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  transition: all 0.3s;
}

.search-bar input {
  background: none;
  border: none;
  color: #e8eaed;
  outline: none;
  padding: 0 0.5rem;
  width: 150px;
}

.search-bar input::placeholder {
  color: #a1a1aa;
}

.search-bar i {
  color: #8b5cf6;
}

.category {
  padding: 2rem;
}

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

.category h2 {
  font-size: 1.5rem;
  color: #e8eaed;
}

.show-more {
  color: #8b5cf6;
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: background 0.3s, color 0.3s;
}

.show-more:hover {
  background: #8b5cf6;
  color: #fff;
}

.card-container {
  display: block;
  overflow-y: auto;
  max-height: 400px;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: #555 #2c2f33;
}

.card-container::-webkit-scrollbar {
  width: 6px;
}

.card-container::-webkit-scrollbar-track {
  background: #2c2f33;
}

.card-container::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 3px;
  border: 2px solid #2c2f33;
}

.card-container::-webkit-scrollbar-thumb:hover {
  background-color: #777;
}

.app-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #333;
}

.app-icon {
  width: 50px;
  height: 50px;
  margin-right: 15px;
  border-radius: 8px;
  object-fit: cover;
}

.app-info h3 {
  font-size: 18px;
  margin: 0;
  color: #e8eaed;
}

.app-desc {
  font-size: 14px;
  color: #a1a1aa;
  margin: 2px 0;
}

.app-purchases {
  font-size: 12px;
  color: #666;
  margin: 0;
}

.app-button {
  margin-left: auto;
  padding: 8px 16px;
  background-color: #1c2526;
  border: 1px solid #007aff;
  border-radius: 20px;
  color: #007aff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.app-button:hover {
  background-color: #007aff;
  color: #fff;
}

.loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 4px solid #2c2f33;
  border-top: 4px solid #8b5cf6;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.auth-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease-in;
}

.auth-content {
  background: #1c2526;
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  position: relative;
  animation: slideIn 0.3s ease-in;
}

.auth-content .close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #e8eaed;
  transition: color 0.3s;
}

.auth-content .close:hover {
  color: #8b5cf6;
}

.auth-content h2 {
  margin-bottom: 1.5rem;
  color: #8b5cf6;
  text-align: center;
}

.input-group {
  position: relative;
  margin-bottom: 1rem;
}

.input-group i {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  color: #8b5cf6;
}

.input-group input {
  padding: 0.8rem 0.8rem 0.8rem 2.5rem;
  border: 1px solid #4b5e5f;
  border-radius: 8px;
  background: #2c2f33;
  color: #e8eaed;
  width: 100%;
}

.input-group input::placeholder {
  color: #a1a1aa;
}

.auth-content button {
  padding: 0.8rem;
  border: none;
  border-radius: 8px;
  background: #8b5cf6;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s;
  width: 100%;
  margin-bottom: 1rem;
}

.auth-content button:hover {
  background: #6200ea;
}

.auth-content button#google-sign-in {
  background: #2c2f33;
  color: #e8eaed;
  border: 1px solid #4b5e5f;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-content button#google-sign-in:hover {
  background: #3c4043;
}

.auth-content p {
  margin-top: 1rem;
  text-align: center;
  color: #e8eaed;
}

.auth-content a {
  color: #8b5cf6;
  text-decoration: none;
}

.auth-content a:hover {
  text-decoration: underline;
}

.auth-message {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  text-align: center;
  color: #e8eaed;
}

.auth-message.error {
  color: #f28b82;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 768px) {
  header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .hamburger {
    display: block;
  }

  nav {
    display: none;
    width: 100%;
  }

  nav.active {
    display: block;
  }

  nav ul {
    flex-direction: column;
    background: #1c2526;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  }

  nav ul li {
    margin: 0.5rem 0;
  }

  .search-bar {
    width: 100%;
  }

  .search-bar input {
    width: 100%;
  }

  .category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .app-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-icon {
    margin-bottom: 10px;
  }

  .app-button {
    margin-left: 0;
    margin-top: 10px;
  }
}