@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400&display=swap');

/* Apply to all elements */
* {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Color Scheme */
:root {
  --primary-color: #2E4052;
  /* Deep blue for a rich background */
  --secondary-color: #ADB2B5;
  /* Muted silver for subtle contrasts */
  --background-color: #EAEFF4;
  /* Light gray for a complementary background */
  --accent-color: #B68D40;
  /* Muted gold for highlights and accents */
  --text-color: #333333;
  /* Almost black for optimal readability */
  --input-background: #FFFFFF;
  /* Pure white for form elements */
  --button-hover: #495A6A;
  /* Darken primary color for button hovers */
  --menu-background: #2E4052;
  /* Consistent with primary color */
  --modal-background: #FFFFFF;
  /* Pure white for focus on modals */
  --box-shadow-color: rgba(50, 50, 50, 0.1);
  /* Soft shadow for delicate depth */
  --border-color: #C5C5C5;
  /* Light border color for input fields */
  --text-muted: #64748b;
  /* Muted text color */
  --transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* Smooth transition */
  --card-background: rgba(255, 255, 255, 0.8);
  /* Glassmorphism base */
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(12px);
}

html,
body {
  height: 100%;
  width: 100%;
  background:
    radial-gradient(circle at top left, rgba(182, 141, 64, 0.1), transparent 24%),
    radial-gradient(circle at top right, rgba(46, 64, 82, 0.08), transparent 22%),
    linear-gradient(180deg, #eef3f7 0%, var(--background-color) 100%);
  color: var(--text-color);
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
}

/* Elegantly styled input fields */
input,
select,
textarea {
  width: 100%;
  padding: 12px 20px;
  margin: 10px 0;
  border: 1px solid var(--border-color);
  border-radius: 25px;
  background-color: var(--input-background);
  transition: border-color 0.3s ease-in-out;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(46, 64, 82, 0.4);
  outline-offset: 2px;
}

input::placeholder,
select::placeholder,
textarea::placeholder {
  color: var(--secondary-color);
  opacity: 0.7;
}

/* Subtle hover effect on inputs */
input:hover,
select:hover,
textarea:hover {
  border-color: var(--accent-color);
}



button {
  background-color: var(--primary-color);
  color: var(--input-background);
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  /* More rounded edges for elegance */
  cursor: pointer;
  transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out;
  box-shadow: 0 3px 6px var(--box-shadow-color);
}

.button-container {
  display: flex;
  flex-direction: column;
  /* Stack buttons vertically */
  align-items: flex-start;
  /* Align buttons to the left */
}

button:hover,
button:focus {
  background-color: var(--button-hover);
  box-shadow: 0 5px 12px var(--box-shadow-color);
  transform: translateY(-2px);
}


/* Style definitions for Logo */
.logo {
  font-family: 'Poppins', sans-serif;
  font-size: 28px;
  color: white;
  text-align: center;
  margin: 0;
  display: inline-block;
  letter-spacing: -0.03em;
}

/* Modal Overlay */
.modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  /* Stay in place */
  z-index: 1000;
  /* Sit on top */
  left: 0;
  top: 0;
  width: 100%;
  /* Full width */
  height: 100%;
  /* Full height */
  background-color: rgba(0, 0, 0, 0.6);
  /* Darker overlay for more focus on modal */
  justify-content: center;
  align-items: center;
}

/* Modal Content Box */
.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 20px;
  border: 1px solid #888;
  width: 50%;
  /* Make the modal a bit more narrow for a modern look */
  max-width: 600px;
  /* Limit the max width for large screens */
  border-radius: 10px;
  /* Rounded corners */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  /* Soft shadow for depth */
  max-height: 80vh;
  /* Limit height to viewport */
  overflow-y: auto;
  /* Enable scrolling inside the modal box */
  transform: scale(0.7);
  /* Start the modal a bit smaller and animate to normal size */
  animation: scaleUp 0.3s forwards;
  /* Animation to make the modal pop */
  position: relative;
  /* Necessary for absolute positioning of children */
}

@keyframes scaleUp {
  from {
    transform: scale(0.7);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Specifically target modal buttons with .modal-button class */
.modal-button {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  background-color: var(--primary-color);
  color: white;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s;
  margin-top: 20px;
}

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

/* Modern Spinner Animation */
.spinner {
  width: 50px;
  height: 50px;
  margin: 20px auto;
  border: 4px solid rgba(46, 64, 82, 0.1);
  border-left-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

#toast-container {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1400;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast-message {
  min-width: 280px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 16px;
  color: #f8fafc;
  background: rgba(46, 64, 82, 0.96);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
  transform: translateY(16px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.toast-message.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-message.is-exiting {
  opacity: 0;
  transform: translateY(8px);
}

.toast-success {
  background: linear-gradient(135deg, rgba(35, 78, 54, 0.96), rgba(19, 59, 44, 0.94));
}

.toast-error {
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.96), rgba(91, 22, 22, 0.94));
}

.neo-voice-picker {
  display: grid;
  gap: 14px;
}

.neo-voice-picker__hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.neo-voice-picker__copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.neo-voice-picker__kicker {
  margin: 0;
  color: #9a6700;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.neo-voice-picker__title {
  color: #182533;
  font-size: 1rem;
}

.neo-voice-picker__description {
  margin: 0;
  color: #52637b;
  font-size: 0.86rem;
  line-height: 1.6;
}

.neo-voice-picker__badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.neo-voice-picker__selected {
  display: grid;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.neo-voice-picker__selected-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.neo-voice-picker__selected-label {
  color: #243447;
  font-size: 0.88rem;
  font-weight: 700;
}

.neo-voice-picker__selected-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(46, 64, 82, 0.1);
  color: #334155;
  font-size: 0.74rem;
  font-weight: 800;
}

.neo-voice-picker__clear {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 0;
  background: rgba(46, 64, 82, 0.08);
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.neo-voice-picker__clear:hover:not(:disabled),
.neo-voice-picker__clear:focus-visible:not(:disabled) {
  background: rgba(46, 64, 82, 0.14);
  color: #182533;
}

.neo-voice-picker__clear:disabled {
  opacity: 0.55;
  cursor: default;
}

.neo-voice-picker__selected-values,
.neo-voice-picker__quick,
.neo-voice-picker__group-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.neo-voice-picker__token {
  min-height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #2e4052, #4d6d8c);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: 0 12px 22px rgba(46, 64, 82, 0.18);
}

.neo-voice-picker__token:hover,
.neo-voice-picker__token:focus-visible {
  filter: brightness(1.04);
}

.neo-voice-picker__token-dismiss {
  font-size: 1rem;
  line-height: 1;
  opacity: 0.8;
}

.neo-voice-picker__empty,
.neo-voice-picker__selected-hint {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.5;
}

.neo-voice-picker__editor {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.52);
  overflow: hidden;
}

.neo-voice-picker__editor-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  list-style: none;
  cursor: pointer;
}

.neo-voice-picker__editor-summary::-webkit-details-marker {
  display: none;
}

.neo-voice-picker__editor-title {
  color: #182533;
  font-size: 0.88rem;
  font-weight: 700;
}

.neo-voice-picker__editor-hint {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

.neo-voice-picker__editor-body {
  padding: 0 16px 16px;
  display: grid;
  gap: 12px;
}

.neo-voice-picker__quick-section {
  display: grid;
  gap: 10px;
}

.neo-voice-picker__quick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.neo-voice-picker__quick-label {
  color: #243447;
  font-size: 0.88rem;
  font-weight: 700;
}

.neo-voice-picker__quick-hint {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

.neo-voice-picker__search {
  display: block;
}

.neo-voice-picker__search-input {
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.neo-voice-picker__chip {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #334155;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.neo-voice-picker__chip:hover,
.neo-voice-picker__chip:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 1);
  color: #182533;
}

.neo-voice-picker__chip.is-active {
  background: linear-gradient(135deg, #2e4052, #4d6d8c);
  color: #fff;
  box-shadow: 0 14px 24px rgba(46, 64, 82, 0.2);
}

.neo-voice-picker__library {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.56);
  overflow: hidden;
}

.neo-voice-picker__library-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  list-style: none;
  cursor: pointer;
  color: #182533;
  font-size: 0.9rem;
  font-weight: 700;
}

.neo-voice-picker__library-summary::-webkit-details-marker {
  display: none;
}

.neo-voice-picker__library-summary span:last-child {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

.neo-voice-picker__library-body {
  padding: 0 16px 16px;
  display: grid;
  gap: 14px;
}

.neo-voice-picker__group {
  display: grid;
  gap: 8px;
}

.neo-voice-picker__group-head {
  display: grid;
  gap: 4px;
}

.neo-voice-picker__group-title {
  color: #243447;
  font-size: 0.88rem;
}

.neo-voice-picker__group-description {
  margin: 0;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.5;
}

.neo-voice-picker__search-empty {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(46, 64, 82, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: #52637b;
  font-size: 0.84rem;
  line-height: 1.5;
}

.tts-language-card {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 12px 13px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(249, 250, 251, 0.98), rgba(244, 247, 251, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.tts-language-head {
  display: grid;
  gap: 3px;
}

.tts-language-head strong {
  color: #182533;
  font-size: 0.9rem;
}

.tts-language-head span,
.tts-language-help {
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.5;
}

.tts-language-select {
  width: 100%;
  min-height: 46px;
  margin: 0;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}


.remember-me-container {
  display: flex;
  /* This makes it flexible and inline with other input fields */
  justify-content: center;
  /* This centers the checkbox horizontally in its container */
  margin: 5px 0;
  /* Adjust this value as required to align with other elements */
}

.remember-me-label {
  font-size: 0.8rem;
  /* Reduces the size of the text; adjust as needed */
  display: flex;
  align-items: center;
  /* Aligns the checkbox and label text vertically */
}

header {
  background: linear-gradient(180deg, #33465a 0%, #2c3b4c 100%);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 18px;
  padding: 18px 12px 88px;
  position: fixed;
  height: 100vh;
  width: 220px;
  left: 0;
  top: 0;
  z-index: 1000;
  overflow-x: hidden;
  box-shadow: 18px 0 40px rgba(15, 23, 42, 0.16);
}

.menu-brand {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding-top: 8px;
}

.menu-brand-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  opacity: 0.88;
}

.menu-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 16px;
  padding-right: 2px;
}

.menu-links {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-section {
  width: 100%;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: background-color 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.menu-section.is-open {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.menu-section-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: white;
  box-shadow: none;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background-color 0.2s ease;
}

.menu-section-toggle:hover,
.menu-section-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  transform: none;
  box-shadow: none;
}

.menu-section-toggle__label {
  color: rgba(255, 255, 255, 0.62);
}

.menu-section.is-open .menu-section-toggle__label {
  color: rgba(255, 255, 255, 0.92);
}

.menu-section-toggle__icon {
  width: 9px;
  height: 9px;
  border-right: 2px solid rgba(255, 255, 255, 0.7);
  border-bottom: 2px solid rgba(255, 255, 255, 0.7);
  transform: rotate(45deg);
  transition: transform 0.22s ease, opacity 0.22s ease;
  opacity: 0.86;
}

.menu-section.is-open .menu-section-toggle__icon {
  transform: rotate(-135deg) translate(-1px, -1px);
}

.menu-section-links {
  list-style: none;
  margin: 0;
  padding: 0 8px 10px;
  display: none;
  gap: 4px;
}

.menu-section.is-open .menu-section-links {
  display: grid;
}

.menu-section-links li {
  width: 100%;
}

.menu-section-links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
  padding: 12px 14px;
  margin: 0;
  border-radius: 14px;
  transition: color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.menu-section-links a:hover {
  background-color: rgba(255, 255, 255, 0.09);
}

.menu-section-links a.is-active {
  background-color: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.menu-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--accent-color);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
}

.menu-pill:not([hidden]) {
  box-shadow: 0 0 0 0 rgba(182, 141, 64, 0.32);
  animation: menuPillPulse 1.8s ease-out infinite;
}

.menu-pill.is-ready {
  background: #15803d;
}

.menu-logout-button {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 1100;
  min-width: 156px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(212, 220, 228, 0.96), rgba(188, 198, 209, 0.94));
  color: #314152;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.18);
}

.menu-logout-button:hover,
.menu-logout-button:focus-visible {
  background: linear-gradient(135deg, rgba(222, 228, 234, 0.98), rgba(199, 208, 217, 0.96));
}

@keyframes menuPillPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(182, 141, 64, 0.32);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(182, 141, 64, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(182, 141, 64, 0);
  }
}

/* Responsive menu */
@media (max-width: 600px) {
  header {
    width: 100%;
    height: auto;
    padding: 14px 14px 78px;
    gap: 12px;
  }

  .menu-brand {
    justify-items: start;
    gap: 4px;
    padding-top: 0;
  }

  .menu-brand-mark {
    display: none;
  }

  .menu-links {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .menu-section {
    min-width: 164px;
  }

  .menu-section-toggle {
    padding: 10px 12px;
  }

  .menu-section-links {
    padding: 0 6px 8px;
  }

  .menu-section-links a {
    margin: 0;
    padding: 10px 12px;
  }

  .menu-logout-button {
    left: auto;
    right: 14px;
    top: 14px;
    bottom: auto;
    min-width: 112px;
    padding: 10px 14px;
    font-size: 0.84rem;
  }

  .neo-voice-picker__hero,
  .neo-voice-picker__selected-head,
  .neo-voice-picker__editor-summary,
  .neo-voice-picker__quick-head,
  .neo-voice-picker__library-summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

body {
  margin-left: 225px;
  width: calc(100% - 225px);
  overflow-x: hidden;
}

@media (max-width: 960px) {
  body {
    margin-left: 0;
    width: 100%;
  }
}
