/* Swahili-inspired styles.css */

/* Custom properties for Swahili-inspired colors */
:root {
  --primary: #E67E22; /* Orange, inspired by Swahili textiles */
  --primary-hover: #D35400; /* Darker orange for hover states */
  --secondary: #27AE60; /* Green, representing lush landscapes */
  --accent: #F1C40F; /* Yellow, inspired by African sun */
  /* --background: #34495E; /* Deep blue, representing the Indian Ocean */ */
  --background: #000000; /* Deep blue, representing the Indian Ocean */
  --text: #ECF0F1; /* Off-white for better readability */
  --border-color: #E67E22;
  --form-element-background-color: #2C3E50; /* Slightly lighter than background for form elements */
  --form-element-border-color: #E67E22;
  --form-element-color: #ECF0F1;
  --form-element-placeholder-color: #BDC3C7;
  --card-background-color: #000000;
  --card-sectionning-background-color: #2C3E50;
}

/* Base styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--background);
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Swahili-inspired background pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(45deg, var(--secondary) 25%, transparent 25%),
    linear-gradient(-45deg, var(--secondary) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--secondary) 75%),
    linear-gradient(-45deg, transparent 75%, var(--secondary) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  opacity: 0.1;
  z-index: -1;
}

/* Container styles */
.container {
  max-width: 800px;
  width: 100%;
  padding: 20px;
  background: var(--card-background-color);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(241, 196, 15, 0.3);
  text-align: center;
}

/* Typography */
.title {
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  font-size: clamp(2rem, 5vw, 4rem);
  color: var(--primary);
  text-align: center;
  margin-bottom: 30px;
  text-transform: uppercase;
}

.glow {
  text-shadow: 0 0 5px var(--accent), 0 0 10px var(--accent);
  animation: pulsate 2s infinite alternate;
}

@keyframes pulsate {
  100% {
    text-shadow: 0 0 5px var(--accent), 0 0 10px var(--accent), 0 0 15px var(--accent);
  }
  0% {
    text-shadow: 0 0 2px var(--accent), 0 0 5px var(--accent), 0 0 7px var(--accent);
  }
}

/* Form styles */
.inputWrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.atSymbol {
  font-size: 2rem;
  margin-right: 10px;
  color: var(--primary);
}

input[type="text"] {
  width: 70%;
  padding: 15px;
  border: 2px solid var(--form-element-border-color);
  border-radius: 5px;
  font-size: 1.2rem;
  background-color: var(--form-element-background-color);
  color: var(--form-element-color);
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 5px var(--accent);
}

button {
  padding: 12px 24px;
  background-color: var(--primary);
  color: var(--background);
  border: 2px solid var(--primary);
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s, color 0.3s;
  margin-top: 20px;
}

button:hover {
  background-color: var(--primary-hover);
}

/* Loading styles */
.loadingContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 30px;
}

.spinner {
  border: 4px solid rgba(230, 126, 34, 0.3);
  border-left-color: var(--primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

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

.loadingText {
  margin-top: 20px;
  font-size: 1.2rem;
  color: var(--text);
}

/* Result styles */
.vibe-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#vibe-canvas {
  max-width: 100%;
  height: auto;
  border: 2px solid var(--border-color);
  border-radius: 10px;
}

.downloadButton {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: var(--secondary);
  color: var(--background);
  border: 2px solid var(--secondary);
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s, color 0.3s;
}

.downloadButton:hover {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* Footer styles */
.footerText {
  color: var(--text);
  text-align: center;
  margin-top: 20px;
}

.footerText a {
  color: var(--accent);
  text-decoration: none;
}

.footerText a:hover {
  text-decoration: underline;
}

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

/* Responsive adjustments */
@media (max-width: 600px) {
  .container {
    padding: 10px;
  }

  .title {
    font-size: 2rem;
  }

  .inputWrapper {
    flex-direction: column;
  }

  .atSymbol {
    margin-right: 0;
    margin-bottom: 10px;
  }

  input[type="text"] {
    width: 90%;
  }
}

/* Pico CSS overrides */
[data-theme="light"],
:root:not([data-theme="dark"]) {
  --primary: #E67E22;
  --primary-hover: #D35400;
  --primary-focus: rgba(230, 126, 34, 0.25);
  --primary-inverse: #FFF;
}

[data-theme="dark"] {
  --primary: #F1C40F;
  --primary-hover: #F39C12;
  --primary-focus: rgba(241, 196, 15, 0.25);
  --primary-inverse: #2C3E50;
}

[role="document"] {
  --block-spacing-vertical: 1.5rem;
  --block-spacing-horizontal: 1.5rem;
}

article {
  margin: 0;
  padding: 0;
  background-color: transparent;
}

form {
  margin-bottom: 0;
}

.inputWrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.formIcon {
    width: 100px;
    height: 153px;
    margin-right: 10px;
}

.atSymbol {
    font-size: 2rem;
    margin-right: 10px;
    color: var(--primary);
}
