@import url("https://fonts.googleapis.com/css2?family=Funnel+Display:wght@300..800&display=swap");

:root {
  /* dark theme colors */
  --primary-color: #000000;
  --secondary-color: #0a0a0a;
  --tertiary-color: #1a1a1a;
  --text-color: white;
  --text-color-alt: #ccc;
  /* light theme colors */
  --light-primary-color: #ffffff;
  --light-secondary-color: #f0f0f0;
  --light-tertiary-color: #e0e0e0;
  --light-text-color: #000000;
  --light-text-color-alt: #333333;
  /* misc */
  --loader-color: #004a86;
}

* {
  font-family: "Funnel Display", sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100vh;
  color: var(--text-color);
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--primary-color);
  margin-bottom: 0;
  min-height: 100vh;
}

.hero {
  background-color: var(--secondary-color);
  border-bottom: 3px solid var(--tertiary-color);
  width: 100%;
  height: 25vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 25px;
}

#theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background-color: var(--tertiary-color);
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
}

.search-bar {
  display: flex;
  flex-direction: row;
  gap: 15px;
  margin: 35px 0;
}

.search-bar input {
  width: 300px;
  height: 40px;
  border-radius: 5px;
  background-color: var(--primary-color);
  border: 1px solid var(--tertiary-color);
  color: var(--light-primary-color);
  padding-left: 10px;
}

.search-bar input:disabled {
  background-color: var(--secondary-color);
  border: 1px solid var(--tertiary-color);
  color: var(--text-color-alt);
  cursor: not-allowed;
}

.search-bar button {
  width: 100px;
  height: 40px;
  border-radius: 5px;
  border: none;
  background-color: var(--tertiary-color);
  color: var(--text-color);
  cursor: pointer;
}

.search-bar button:disabled {
  background-color: var(--secondary-color);
  cursor: not-allowed;
  opacity: 0.6;
}

.loader {
  border: 6px solid var(--secondary-color);
  border-top: 6px solid var(--loader-color);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.loading-p {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.username-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

#username-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 25px;
}

#username-container img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid var(--tertiary-color);
}

.outfits-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 30px 0;
  width: 100%;
  max-width: 1200px;
  padding: 0 20px;
}

.outfit-card {
  background-color: var(--secondary-color);
  border: 1px solid var(--tertiary-color);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  
}

.outfit-card:hover {
  transform: translateY(-2px);
  border-color: #333;
}

.outfit-card h3 {
  background-color: transparent;
  margin-bottom: 10px;
  color: var(--text-color);
  font-size: 18px;
}

.outfit-card p {
  background-color: transparent;
  color: #ccc;
  font-size: 14px;
  margin: 5px 0;
}

#outfits-container {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}

#outfits-container p {
  text-align: center;
  font-size: 16px;
}

.outfit-thumbnail {
  width: 150px;
  height: 150px;
  border-radius: 8px;
  margin-bottom: 10px;
  background-color: transparent;
  object-fit: cover;
  border: 1px solid var(--tertiary-color);
}

.outfit-placeholder {
  width: 150px;
  height: 150px;
  border-radius: 8px;
  margin-bottom: 10px;
  background-color: var(--tertiary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 12px;
  border: 1px solid var(--tertiary-color);
}

.outfit-thumbnail {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.footer {
  width: 100%;
  background-color: var(--secondary-color);
  border-top: 3px solid var(--tertiary-color);
  text-align: center;
  padding: 25px 0;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 16px;
  font-size: 16px;
}

.footer p,
.footer a {
  margin: 0;
  color: var(--text-color-alt);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* light theme styles */
body.light-theme {
  background-color: var(--light-primary-color);
  color: var(--light-text-color);
}

body.light-theme .hero {
  background-color: var(--light-secondary-color);
  border-bottom: 3px solid var(--light-tertiary-color);
}

body.light-theme #theme-toggle {
  background-color: var(--light-tertiary-color);
  color: var(--light-text-color);
  border: 2px solid rgba(0, 0, 0, 0.5);
  color: rgba(0, 0, 0, 0.75);
}

body.light-theme .outfit-card {
  background-color: var(--light-secondary-color);
  border: 1px solid var(--light-tertiary-color);
}

body.light-theme .outfit-card h3 {
  color: var(--light-text-color);
}

body.light-theme .outfit-card p {
  color: var(--light-text-color-alt);
}

body.light-theme .footer {
  background-color: var(--light-secondary-color);
  border-top: 3px solid var(--light-tertiary-color);
}

body.light-theme .footer p,
body.light-theme .footer a {
  color: var(--light-text-color-alt);
}

body.light-theme .footer a:hover {
  color: var(--light-text-color);
}

body.light-theme .search-bar input {
  background-color: var(--light-primary-color);
  border: 1px solid var(--light-tertiary-color);
  color: (var(--primary-color));
}

body.light-theme .search-bar button {
  background-color: var(--light-tertiary-color);
  color: var(--light-text-color);
}

body.light-theme .loader {
  border: 6px solid var(--light-secondary-color);
  border-top: 6px solid var(--loader-color);
}

body.light-theme .outfit-placeholder {
  background-color: var(--light-tertiary-color);
  color: #666;
}

/* responsive styles */
@media (max-width: 900px) {
  .outfits-grid {
    max-width: 100%;
    gap: 14px;
    padding: 0 8px;
  }

  .outfit-thumbnail,
  .outfit-placeholder {
    width: 120px;
    height: 120px;
  }

  #username-container img {
    width: 70px;
    height: 70px;
  }
}

@media (max-width: 600px) {
  .search-bar {
    flex-direction: column;
  }

  #theme-toggle {
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
  }

  .search-bar input {
    width: 180px;
    height: 32px;
  }

  .search-bar button {
    width: 100%;
    height: 32px;
  }

  .outfits-grid {
    gap: 8px;
  }

  .outfit-card {
    padding: 10px;
  }

  .outfit-thumbnail,
  .outfit-placeholder {
    width: 90px;
    height: 90px;
  }

  #username-title {
    max-width: 75%;
    text-align: center;
  }

  #username-container {
    gap: 10px;
    flex-direction: column;
  }

  #username-container img {
    width: 25%;
    height: 25%;
  }
}
