/* General Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Raleway:wght@400;600&display=swap');

body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: linear-gradient(180deg, #000 0%, #ff8e53 100%);
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow-x: hidden;
}

/* Applying border-box to all elements for consistent sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

header.hero-header {
  text-align: center;
  margin-bottom: 24px;
}

header.hero-header h1 {
  font-size: 2.6rem;
  margin: 0 0 12px;
  color: #fff;
  font-weight: 700;
}

header.hero-header h1 a {
  text-decoration: none;
  color: inherit;
}

header.hero-header p {
  margin: 0;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
}

/* Main Section */
.app-shell {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 48px 16px 72px;
}

.app-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 680px;
  gap: 28px;
  align-self: center;
}

.hero-card {
  background: linear-gradient(180deg, #c322e08a 0%, #6324eead 100%);
  border-radius: 36px;
  padding: 32px 24px 40px;
  box-shadow: 0 28px 56px rgba(59, 0, 94, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  overflow: hidden;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.input-container {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 18px 20px;
  border-radius: 28px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: rgba(44, 0, 90, 0.8);
  box-shadow: 0 18px 36px rgba(16, 0, 42, 0.55);
  gap: 16px;
}

textarea {
  flex: 1;
  min-height: 120px;
  margin: 0;
  border: none;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1.6;
  background: transparent;
  color: #fff;
  font-family: 'Inter', sans-serif;
  resize: vertical;
}

.input-container textarea::placeholder {
  color: rgba(155, 155, 155, 0.65);
}

.input-container textarea:focus {
  outline: none;
}

#clearButton {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.3);
  color: #4c1a7f;
  font-size: 1.4rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

#clearButton:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

#clearButton:active {
  transform: scale(0.95);
}

#clearButton:focus-visible {
  outline: 3px solid rgba(255, 209, 102, 0.8);
  outline-offset: 3px;
}

.primary-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cta-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 64px;
  width: 100%;
  border: none;
  border-radius: 26px;
  padding: 18px 24px;
  font-size: 1.15rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  color: #fff;
  background: linear-gradient(135deg, #ff1479 0%, #ff0066 100%);
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(255, 0, 102, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button.alt {
  background: linear-gradient(135deg, #ffb347 0%, #ff6a00 100%);
  /*box-shadow: 0 14px 28px rgba(255, 106, 0, 0.35);*/
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.2);
}

.cta-button:active {
  transform: translateY(0);
}

.cta-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
}

.settings-button {
  width: 100%;
  border: none;
  border-radius: 26px;
  min-height: 64px;
  padding: 18px 24px;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: #ffffff;
  background: rgba(21, 0, 62, 0.55);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.settings-button:hover {
  background: rgba(21, 0, 62, 0.7);
}

.settings-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
}

#optionsContent {
  margin-top: 12px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(17, 0, 55, 0.55);
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Options Container */
.options-container {
  margin-top: 30px;
  text-align: left;
}

.options-container label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.options-container select {
  width: 100%;
  max-width: 400px;
  padding: 12px;
  border-radius: 10px;
  border: 2px solid #ddd;
  background: #fff;
  font-size: 1.2rem;
  color: #333;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s ease-in-out;
}

.options-container select:focus {
  border-color: #6a11cb;
  outline: none;
}

.toggles {
  border-radius: 18px;
  margin: 0;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.12);
}

.toggles input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  outline: none;
  margin-right: 10px;
  vertical-align: middle;
  cursor: pointer;
  background: transparent;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.toggles input[type="radio"]:checked {
  border-color: #ff90e8;
  background: linear-gradient(135deg, #ff90e8 0%, #ffd166 100%);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.toggles input[type="radio"]:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25);
}

.toggles label {
  display: block;
  margin-top: 12px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
}

/* Button Styles */
button {
  font-family: 'Inter', sans-serif;
  border: none;
  cursor: pointer;
  background: none;
  color: inherit;
  padding: 0;
}

button:hover {
  filter: brightness(1.05);
}

button:active {
  filter: brightness(0.95);
}

/* Output Section */
.output-card {
  background: linear-gradient(180deg, #ffd8b573 0%, #ff9f6899 100%);
  border-radius: 32px;
  padding: 28px 24px;
  box-shadow: 0 20px 46px rgba(204, 70, 15, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #2c1b1b;
}

.output-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

#outputText {
  min-height: 120px;
  padding: 22px 24px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 24px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  font-size: 1.25rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  line-height: 1.5;
  color: #2c1b1b;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.output-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.output-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 60px;
  width: 100%;
  border-radius: 26px;
  padding: 16px 24px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ff1479 0%, #ff0066 100%);
  box-shadow: 0 14px 28px rgba(255, 0, 102, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.output-button.alt {
  background: linear-gradient(135deg, #ffb347 0%, #ff6a00 100%);
  box-shadow: 0 14px 28px rgba(255, 106, 0, 0.3);
}

.output-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.2);
}

.output-button:active {
  transform: translateY(0);
}

.output-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
}

.store-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: -8px;
  padding-bottom: 8px;
}

.store-badges img {
  height: 44px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25));
}

/* Footer */
footer {
  text-align: center;
  padding: 30px;
  font-size: 1rem;
/*  background: #f5f5f5;*/
  margin-top: 40px;
  color: #666;
}

footer a {
  text-decoration: none;
  color: #808080;
}

/* Toggle Options Button */
#toggleOptionsButton {
  display: inline-block;
  margin: 20px 0;
  padding: 12px 25px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: #fff;
  background: linear-gradient(135deg, #ff758c, #ff7eb3);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

#toggleOptionsButton:hover {
  background: linear-gradient(135deg, #ff527c, #ff68a6);
}

#toggleOptionsButton:active {
  transform: scale(0.97);
}

/* Hidden Options */
#optionsContent.hidden {
  display: none;
}

.options-container {
  text-align: left;
  margin-top: 20px;
}

.options-container label {
  font-size: 1.1rem;
  font-weight: 600;
  display: block;
  margin: 10px 0;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-top: 4px solid #ff1479;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
  }

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

  @keyframes float {
    0% {transform: translateY(0);}
    50% {transform: translateY(-20px);}
    100% {transform: translateY(0);}
  }
  .emojithing {
    animation:float 6s ease-in-out infinite;position: absolute;font-size: 3.75rem;
  }
 .info-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px auto;
    max-width: 680px;
    background: rgb(255 255 255 / 82%);
    border-radius: 28px;
    box-shadow: 0 20px 36px rgba(0, 0, 0, 0.15);
    padding: 32px 28px;
    color: #3a1d50;
  }

  .info-container h2 {
    font-size: 1.8rem;
    color: #6224ee;
    margin-bottom: 16px;
  }

  .info-container p {
    font-size: 1.1rem;
    color: #3a1d50;
    text-align: center;
    margin-bottom: 18px;
  }

  .toast {
    visibility: hidden;
    min-width: 200px;
    margin-left: -100px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 16px;
    position: fixed;
    z-index: 1;
    left: 50%;
    bottom: 30px;
    font-size: 17px;
    transition: visibility 0s, opacity 0.5s linear;
    opacity: 0;
  }

  .toast.show {
    visibility: visible;
    opacity: 1;
  }
  
#shareButton {
  /* display: none; */
}
  @media (hover: none) {
  #shareButton {
    display: inline-flex;
  }
}


/* Brainfish-inspired palette overrides */
:root {
  --bf-bg-gradient-start: #f7fee8;
  --bf-bg-gradient-end: #d2fae5;
  --bf-hero-gradient-start: #b4edd8;
  --bf-hero-gradient-end: #6adbb1;
  --bf-highlight-gradient-start: #dbf4b5;
  --bf-highlight-gradient-end: #c6ee89;
  --bf-border-strong: #171717;
  --bf-border-soft: rgba(23, 23, 23, 0.08);
  --bf-shadow-strong: #0a0a0d;
  --bf-shadow-soft: rgba(10, 10, 13, 0.08);
  --bf-text-primary: #171717;
  --bf-text-secondary: #404040;
  --bf-text-muted: #525252;
  --bf-button-bg: #a3e635;
  --bf-button-bg-accent: #84cc16;
  --bf-surface: #ffffff;
  --bf-surface-muted: rgba(255, 255, 255, 0.92);
  --bf-highlight-ring: rgba(163, 230, 53, 0.25);
}

body {
  background: linear-gradient(180deg, var(--bf-bg-gradient-start) 0%, var(--bf-bg-gradient-end) 100%);
  color: var(--bf-text-primary);
}

header.hero-header h1 {
  color: var(--bf-text-primary);
}

header.hero-header p {
  color: var(--bf-text-secondary);
}

.hero-card {
  background: linear-gradient(180deg, var(--bf-hero-gradient-start) 0%, var(--bf-hero-gradient-end) 100%);
  border-radius: 28px;
  border: 1px solid var(--bf-border-strong);
  box-shadow: 6px 6px 0 var(--bf-shadow-strong);
  color: var(--bf-text-primary);
}

.input-container {
  border-radius: 22px;
  border: 1.5px solid var(--bf-border-strong);
  background: var(--bf-surface);
  box-shadow: 3px 3px 0 var(--bf-shadow-strong);
}

textarea {
  color: var(--bf-text-primary);
}

.input-container textarea::placeholder {
  color: var(--bf-text-muted);
}

#clearButton {
  border: 1.5px solid var(--bf-border-strong);
  background: var(--bf-button-bg);
  color: var(--bf-text-primary);
}

#clearButton:hover {
  background: var(--bf-button-bg-accent);
}

#clearButton:focus-visible {
  outline: 3px solid var(--bf-highlight-ring);
}

.cta-button {
  border-radius: 20px;
  color: var(--bf-text-primary);
  background: var(--bf-button-bg);
  border: 1.5px solid var(--bf-border-strong);
  box-shadow: 4px 4px 0 var(--bf-shadow-strong);
}

.cta-button.alt {
  background: var(--bf-surface);
  color: var(--bf-text-primary);
}

.cta-button:hover {
  box-shadow: 6px 6px 0 var(--bf-shadow-strong);
}

.cta-button:focus-visible {
  outline: 3px solid var(--bf-highlight-ring);
}

.settings-button {
  border-radius: 20px;
  color: var(--bf-text-primary);
  background: rgba(255, 255, 255, 0.65);
  border: 1.5px solid var(--bf-border-strong);
  box-shadow: 4px 4px 0 var(--bf-shadow-strong);
}

.settings-button:hover {
  background: rgba(255, 255, 255, 0.85);
}

.settings-button:focus-visible {
  outline: 3px solid var(--bf-highlight-ring);
}

#optionsContent {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--bf-text-secondary);
  border: 1px solid var(--bf-border-soft);
}

.toggles {
  border-radius: 16px;
  background: linear-gradient(135deg, var(--bf-highlight-gradient-start), var(--bf-highlight-gradient-end));
  box-shadow: 2px 2px 0 var(--bf-shadow-strong);
}

.toggles input[type="radio"] {
  border: 2px solid var(--bf-border-strong);
}

.toggles input[type="radio"]:checked {
  border-color: var(--bf-border-strong);
  background: var(--bf-button-bg);
  box-shadow: 0 0 0 4px var(--bf-highlight-ring);
}

.toggles input[type="radio"]:focus {
  box-shadow: 0 0 0 4px var(--bf-highlight-ring);
}

.toggles label {
  color: var(--bf-text-primary);
}

.output-card {
  background: var(--bf-surface-muted);
  border-radius: 24px;
  border: 1px solid var(--bf-border-strong);
  box-shadow: 6px 6px 0 var(--bf-shadow-strong);
  color: var(--bf-text-primary);
}

#outputText {
  background: var(--bf-surface);
  border-radius: 20px;
  border: 1.5px solid var(--bf-border-strong);
  color: var(--bf-text-primary);
}

.output-button {
  border-radius: 20px;
  color: var(--bf-text-primary);
  background: var(--bf-button-bg);
  border: 1.5px solid var(--bf-border-strong);
  box-shadow: 4px 4px 0 var(--bf-shadow-strong);
}

.output-button.alt {
  background: var(--bf-surface);
}

.output-button:hover {
  box-shadow: 6px 6px 0 var(--bf-shadow-strong);
}

.output-button:focus-visible {
  outline: 3px solid var(--bf-highlight-ring);
}

.store-badges img {
  filter: drop-shadow(4px 4px 0 var(--bf-shadow-strong));
}

.info-container {
  background: linear-gradient(180deg, var(--bf-hero-gradient-start), rgba(255, 255, 255, 0.9));
  border-radius: 24px;
  box-shadow: 6px 6px 0 var(--bf-shadow-strong);
  color: var(--bf-text-primary);
}

.info-container h2 {
  color: var(--bf-text-primary);
}

.info-container p {
  color: var(--bf-text-secondary);
}

.toast {
  background-color: var(--bf-text-primary);
  color: var(--bf-surface);
}

.spinner {
  border-color: rgba(23, 23, 23, 0.15);
  border-top-color: var(--bf-border-strong);
}

button:hover {
  filter: none;
}

button:active {
  filter: none;
}
