
:root {
  --deep-purple: #2a2356;
  --seafoam: #40916c;
  --soft-mint: #b7e4c7;
  --accent: #95d5b2;
  --accent-dark: #76c893;
  --lavender: #8990ba;
  --sage: #a7d0b2;
  --border-radius: 12px;
  --animation-duration: 0.3s;
}

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

body {
  background-color: #f8f9fa;
  color: var(--deep-purple);
  min-height: 100vh;
  overflow-x: hidden;
}

#app {
  position: relative;
  min-height: 100vh;
}

/* Views */
.view {
  display: none;
  min-height: 100vh;
  position: relative;
}

.view.active {
  display: block;
}

/* Mesh Gradient */
.mesh-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.6);
  filter: blur(60px);
}

.scrollable {
  position: fixed;
  height: 100vh;
}

.blobs-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.mesh-blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.7;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(5%, 15%) rotate(5deg);
  }
  50% {
    transform: translate(10%, -5%) rotate(-5deg);
  }
  75% {
    transform: translate(-10%, 5%) rotate(3deg);
  }
}

/* Home View */
.centered-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.app-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  animation: fadeIn 0.5s ease-out;
  cursor: default;
}

.clickable {
  cursor: pointer;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Search Input */
.search-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  animation: fadeIn 0.7s ease-out;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

#search-input, #results-search-input {
  width: 100%;
  height: 60px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 30px;
  padding: 0 70px;
  font-size: 18px;
  outline: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

#search-input:focus, #results-search-input:focus {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#surprise-button, #results-surprise-button {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  z-index: 2;
  transition: transform 0.2s ease-out;
}

#surprise-button:hover, #results-surprise-button:hover {
  color: var(--accent-dark);
  transform: translateY(-50%) scale(1.1);
}

#search-button, #results-search-button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(to right, var(--seafoam), var(--accent));
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

#search-button:hover, #results-search-button:hover {
  transform: translateY(calc(-50% - 2px));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Results View */
.results-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

header .app-title {
  font-size: 2rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  header .app-title {
    margin-bottom: 0;
  }
}

.search-container.compact {
  width: 100%;
}

@media (min-width: 768px) {
  .search-container.compact {
    max-width: 500px;
  }
}

/* Breadcrumb Trail */
.breadcrumb-container {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(5px);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 2rem;
  overflow: hidden;
}

.breadcrumb-label {
  font-size: 0.75rem;
  color: var(--seafoam);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.breadcrumb-trail {
  display: flex;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

.breadcrumb-trail::-webkit-scrollbar {
  height: 4px;
}

.breadcrumb-trail::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 2px;
}

.breadcrumb-trail::-webkit-scrollbar-thumb {
  background-color: var(--accent);
  border-radius: 2px;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.trail-button {
  background: rgba(255, 255, 255, 0.5);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 15px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.trail-button:hover {
  background: var(--soft-mint);
}

.trail-button.active {
  background: var(--deep-purple);
  color: white;
}

.chevron {
  margin: 0 0.5rem;
  color: var(--seafoam);
}

/* Loader */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 0;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(64, 145, 108, 0.3);
  border-radius: 50%;
  border-top-color: var(--seafoam);
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 1rem;
}

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

.loader-text {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.loader-subtext {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Results Cards */
.results-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

.result-card {
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease, box-shadow 0.5s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: cardFadeIn 0.5s forwards;
}

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

.glow-active {
  transition: box-shadow 0.5s ease;
}

.result-card-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .result-card-content {
    flex-direction: row;
  }
}

.result-card-main {
  flex: 1;
}

.result-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.result-card-title {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--deep-purple);
  margin-right: 1rem;
}

.result-card-link {
  color: var(--seafoam);
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.result-card-link:hover {
  color: var(--deep-purple);
}

.result-card-description {
  font-size: 1rem;
  color: rgba(42, 35, 86, 0.8);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.result-card-sidebar {
  width: 100%;
}

@media (min-width: 768px) {
  .result-card-sidebar {
    width: 30%;
    border-left: 1px solid rgba(64, 145, 108, 0.3);
    padding-left: 1rem;
  }
}

.suggested-paths-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--seafoam);
  margin-bottom: 0.75rem;
}

.suggested-paths {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.path-button {
  background: rgba(183, 228, 199, 0.3);
  border: none;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  text-align: left;
  color: var(--deep-purple);
  cursor: pointer;
  transition: all 0.2s ease;
}

.path-button:hover {
  background: var(--soft-mint);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Close connection glow */
.result-card.close {
  box-shadow: 0 0 0 rgba(230, 230, 250, 0);
}

.result-card.close.glow-active {
  box-shadow: 0 0 20px rgba(230, 230, 250, 0.8);
}

/* Adjacent glow */
.result-card.adjacent {
  box-shadow: 0 0 0 rgba(213, 232, 228, 0);
}

.result-card.adjacent.glow-active {
  box-shadow: 0 0 20px rgba(213, 232, 228, 0.8);
}

/* Unexpected glow */
.result-card.unexpected {
  box-shadow: 0 0 0 rgba(248, 200, 220, 0);
}

.result-card.unexpected.glow-active {
  box-shadow: 0 0 20px rgba(248, 200, 220, 0.8);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: white;
  border-left: 4px solid var(--seafoam);
  border-radius: 4px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  animation: toastIn 0.3s ease forwards;
  max-width: 350px;
  display: flex;
  flex-direction: column;
}

.toast.error {
  border-left-color: #e53e3e;
}

@keyframes toastIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.toast-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.toast-message {
  font-size: 0.85rem;
  color: rgba(42, 35, 86, 0.8);
}

.hidden {
  display: none;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 0;
  margin-top: 3rem;
  color: var(--seafoam);
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Animation for placeholder cards */
@keyframes pulse {
  0%, 100% {
    opacity: 0.7;
  }
  50% {
    opacity: 0.5;
  }
}

.placeholder {
  animation: pulse 2s infinite;
}
