/* Estilos específicos para os modais (feedback, configurações) */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  overflow: auto;
  backdrop-filter: blur(4px);
}

.modal-content {
  background-color: #0e1114;
  margin: auto;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: var(--spacing-xl);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  width: 40vw;
  max-width: 500px;
  min-width: 320px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: modalFadeIn 0.3s ease-out;
}

@media (max-width: 868px) {
  .modal-content {
    width: 96vw;
    max-width: 96vw;
    min-width: 0;
    max-height: 85vh;
    padding: var(--spacing-lg);
  }

  #config-modal .modal-content {
    width: 96vw;
    max-width: 96vw;
    min-width: 0;
  }
}

/* Config modal mais largo */
#config-modal .modal-content {
  width: 60vw;
  max-width: 900px;
  min-width: 600px;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-content h2 {
  color: var(--color-text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 var(--spacing-sm) 0;
}

.modal-content p {
  color: var(--color-text-secondary);
  margin: 0 0 var(--spacing-lg) 0;
  font-size: 0.95rem;
}

.close-button {
  position: absolute;
  right: var(--spacing-lg);
  top: var(--spacing-lg);
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close-button:hover {
  color: var(--color-text-primary);
  background-color: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.form-group {
  margin-bottom: 15px;
  width: 100%;
  box-sizing: border-box;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: var(--color-text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 5px;
  background-color: #1a1f2a;
  color: var(--color-text-primary);
  box-sizing: border-box;
  font-family: inherit;
}

.form-group textarea {
  resize: none;
  min-height: 120px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 141, 163, 0.3);
}

/* Botões do Modal - Seguindo padrão do projeto */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

.btn-primary {
  background-color: #ededed;
  color: #080a0a;
  border: 1px solid transparent;
}

.btn-primary:hover {
  background-color: #ffffff;
  color: #080a0a;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255,255,255,0.15);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-accent-primary) !important;
  border-color: var(--color-accent-primary) !important;
  color: #ffffff !important;
}

.btn-danger {
  background-color: var(--color-accent-danger);
  color: white;
  border: 1px solid transparent;
}

.btn-danger:hover {
  background-color: var(--color-accent-danger-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(211, 47, 47, 0.3);
}

.btn-danger:active {
  transform: translateY(0);
}

/* Botão de gerar link de compartilhamento */
.btn-share-generate {
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s;
  background-color: var(--color-accent-primary);
  color: white;
  font-family: inherit; /* Usa a mesma fonte do conversation-title-area */
  font-size: 0.9rem; /* Mesma fonte que conversation-title-area a */
}

.btn-share-generate:hover {
  background-color: var(--color-accent-primary-hover);
}

.modal-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.share-link {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 15px;
}

.share-link input {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

.share-link button {
  white-space: nowrap;
}

.share-toast {
  position: fixed;
  right: 32px;
  bottom: 120px;
  padding: 12px 18px;
  border-radius: 10px;
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 85;
  pointer-events: none;
}

.share-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.share-toast.error {
  background-color: rgba(206, 61, 61, 0.95);
  color: #fff;
}

/* Estilos para opções de exportação */
.export-options {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-top: 20px;
}

.export-option {
  background-color: var(--color-accent-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius-md);
  padding: 16px 24px;
  cursor: pointer;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  font-family: inherit;
}

.export-option:hover {
  background-color: var(--color-accent-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 141, 163, 0.3);
}

.export-option:active {
  transform: translateY(0);
}

.export-option i {
  font-size: 1.3rem;
}

.export-option span {
  font-size: 1rem;
}

.model-parameters {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--color-border);
}

.parameter {
  margin-bottom: 15px;
}

.parameter label {
  display: block;
  margin-bottom: 5px;
}

.parameter input[type="range"] {
  width: 80%;
  margin-right: 10px;
}

#temperature-value,
#max-tokens-value {
  display: inline-block;
  width: 40px;
  text-align: right;
}

/* Remover estilos conflitantes do toggle-sidebar que estavam aqui */

/* ......................................... */

/* Estilos para a lista de modelos no modal de nova conversa */
.model-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.model-list li {
  padding: 12px;
  margin-bottom: 8px;
  border-radius: var(--border-radius-sm);
  background-color: rgba(0,0,0,0.03);
  transition: background-color var(--transition-speed);
}

.model-list li:hover {
  background-color: rgba(0,0,0,0.06);
}

.model-list label {
  display: flex;
  align-items: center;
  cursor: pointer;
  width: 100%;
}

.model-list input[type="radio"] {
  margin-right: 10px;
}

/* Correção para exibição de modais */
.modal.active {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

/* Estilos para os sliders de personalidade - ajustados */
.personality-sliders {
  margin: 1.5rem 0;
  width: 100%;
}

.personality-sliders-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1.5rem 2.5rem;
    margin: 1.5rem 0;
    width: 100%;
    max-width: 100%;
}

.slider-container {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    position: relative;
    width: 100%;
    max-width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.slider-title {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--color-accent-primary);
    font-size: 1.2rem;
    font-weight: 500;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--color-text-primary);
    width: 100%;
    font-size: 0.85rem;
}

.slider-label-left,
.slider-label-right {
  font-size: 0.9rem;
  flex: 1;
}

.slider-label-left {
  text-align: left;
}

.slider-label-right {
  text-align: right;
}

.slider-value {
  font-weight: bold;
  min-width: 50px;
  text-align: center;
  font-size: 1rem;
}

/* Track do slider - aumentada a espessura */
.slider-track {
  position: absolute;
  width: 100%;
  height: 6px; /* Aumentado de 2px para 6px */
  background-color: var(--color-border);
  top: 50%;
  left: 0;
  z-index: 1;
  border-radius: 3px; /* Ajustado para corresponder à nova espessura */
  transform: translateY(-50%); /* Centralizar verticalmente */
}

.slider-track-inner {
  position: absolute;
  height: 100%;
  background-color: var(--color-accent-primary);
  border-radius: 3px; /* Ajustado para corresponder à nova espessura */
  transition: all 0.3s ease;
}

/* Ajustado o posicionamento do slider para ficar exatamente em cima do track */
.personality-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px; /* Mesma altura do track */
  background: transparent;
  outline: none;
  margin: 20px 0;  /* Aumentado de 15px para 20px para mais espaçamento vertical */
  z-index: 10;
  position: relative;
}

/* Cores unificadas para todos os sliders */
#creativity-track,
#humor-track,
#formality-track,
#politics-track {
  background-color: var(--color-accent-primary);
}

/* Estilizando o botão deslizante (thumb) - ajustado para ficar alinhado com o track */
.personality-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  border: 2px solid var(--color-accent-primary);
  z-index: 20;
  position: relative;
  margin-top: 0; /* Removido o margin-top para alinhar com o track */
}

.personality-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  border: 2px solid var(--color-accent-primary);
  z-index: 20;
  position: relative;
}

/* Destaque para o slider ativo */
.personality-slider:active::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
}

.personality-slider:active::-moz-range-thumb {
  width: 22px;
  height: 22px;
}

/* Slider controls (reset and apply buttons) */
.slider-controls {
  display: flex;
  justify-content: space-between; /* Alterado de center para space-between */
  gap: 15px;
  margin-top: 20px;
  padding: 0 10px; /* Adicionado padding horizontal para dar respiro nas extremidades */
}

#reset-sliders {
  outline: none !important;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

#reset-sliders:focus {
  outline: none !important;
  box-shadow: none !important;
}

#reset-sliders:hover {
  background-color: var(--color-accent-danger) !important;
  color: #ffffff !important;
  border-color: var(--color-accent-danger) !important;
}

/* Estilos para a Galeria de Prompts */
.prompts-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.prompts-categories {
  min-width: 200px;
}

.prompts-categories select {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  font-size: 0.9rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.prompts-categories select:hover {
  border-color: var(--color-accent-primary);
}

.prompts-categories select:focus {
  outline: none;
  border-color: var(--color-accent-primary);
  box-shadow: 0 0 0 2px rgba(0, 141, 163, 0.2);
}

.prompts-list {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.prompt-card {
  background-color: var(--color-bg-tertiary);
  border-radius: var(--border-radius-md);
  padding: 15px;
  margin-bottom: 12px;
  border: 1px solid var(--color-border);
  position: relative;
}

.prompt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.prompt-title {
  font-weight: bold;
  color: var(--color-accent-primary);
  margin: 0;
}

.prompt-category {
  font-size: 0.8em;
  background-color: rgba(0, 141, 163, 0.15);
  color: var(--color-accent-primary);
  padding: 3px 8px;
  border-radius: 12px;
}

.prompt-content {
  color: var(--color-text-primary);
  margin-bottom: 10px;
  line-height: 1.4;
  max-height: 100px;
  overflow-y: auto;
  padding: 5px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.prompt-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.prompt-action-btn {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  font-size: 14px;
  padding: 5px;
  border-radius: 4px;
  transition: all 0.2s;
}

.prompt-action-btn:hover {
  background-color: var(--color-bg-hover);
  color: var(--color-accent-primary);
}

.empty-prompts-message {
  text-align: center;
  color: var(--color-text-secondary);
  padding: 30px 0;
}

.category-input-container {
  position: relative;
  width: 100%;
}

.category-input-container input {
  width: 100%;
  padding-right: 30px; /* Espaço para o ícone */
}

#prompt-categories {
  width: 100%;
}

/* Estilização do datalist como dropdown */
input[list]::-webkit-calendar-picker-indicator {
  color: rgba(0, 0, 0, 0);
  opacity: 1;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px;
  cursor: pointer;
  width: 20px;
  height: 20px;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

/* Estilos para o botão de usar prompt */
.use-prompt-btn {
  color: var(--color-accent-primary);
}

/* Melhorias nos botões de ação do formulário */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Animação para feedback de cópia */
@keyframes copy-feedback {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.copy-feedback {
  animation: copy-feedback 0.3s ease-in-out;
}

/* Estilos para o modal de comandos especiais */
.commands-modal-content {
  max-height: 90vh;
  overflow-y: auto;
  margin: 4vh auto !important; 
  width: 95%;
  max-width: 700px; 
  padding: 25px; 
}

.command-input-container {
  display: flex;
  align-items: center;
  background-color: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  padding-left: 8px;
}

.command-prefix {
  color: var(--color-accent-primary);
  font-weight: bold;
  font-size: 1.1em;
}

#command-name {
  border: none;
  background: transparent;
  flex: 1;
  padding: 10px 8px;
}

#command-name:focus {
  outline: none;
}

.command-input-container:focus-within {
  border-color: var(--color-accent-primary);
  box-shadow: 0 0 0 2px rgba(0, 141, 163, 0.2);
}

#command-instruction {
  min-height: 100px;
  font-family: inherit;
}

/* Estilos para as abas de comandos */
.commands-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.commands-tab {
  background: none;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  color: var(--color-text-secondary);
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  font-weight: bold;
}

.commands-tab:hover {
  color: var(--color-text-primary);
}

.commands-tab.active {
  color: var(--color-accent-primary);
  border-bottom-color: var(--color-accent-primary);
}

.commands-tab-content {
  display: none;
}

.commands-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Estilos para a lista de comandos */
.commands-list-container {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.commands-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.command-item {
  background-color: var(--color-bg-tertiary);
  border-radius: var(--border-radius-md);
  padding: 15px;
  border: 1px solid var(--color-border);
  position: relative;
}

.command-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.command-item-header-left {
  display: flex;
  flex-direction: column;
}

.command-name {
  font-weight: bold;
  color: var(--color-accent-primary);
  margin: 0 0 5px 0;
  display: flex;
  align-items: center;
}

.command-prefix-display {
  color: var(--color-accent-primary);
  font-weight: bold;
  margin-right: 2px;
}

.command-title {
  font-size: 1.1em;
  margin: 0 0 8px 0;
}

.command-instruction {
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  margin-bottom: 10px;
  font-size: 0.9em;
  max-height: 100px;
  overflow-y: auto;
}

.command-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.command-action-btn {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  font-size: 14px;
  padding: 5px 10px;
  border-radius: var(--border-radius-sm);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.command-action-btn:hover {
  background-color: var(--color-bg-hover);
}

.command-action-btn.delete-btn:hover {
  background-color: rgba(211, 47, 47, 0.1);
  color: var(--color-accent-danger);
}

.command-action-btn.edit-btn:hover {
  color: var(--color-accent-primary);
}

.command-action-btn.use-btn:hover {
  color: var(--color-accent-primary);
}

.commands-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 0;
}

.no-commands-message {
  text-align: center;
  color: var(--color-text-secondary);
  padding: 30px 0;
}
/* Perfil do usuário dentro do chat - layout revisado */
.modal.profile-modal {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  overflow: hidden;
}

.modal.profile-modal.active {
  display: flex;
}

#profile-modal .modal-content {
  width: 1120px;
  height: 80vh;
  max-width: 96vw;
  max-height: 80vh;
  margin: 0;
  padding: 0;
  background: var(--color-bg-primary);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.profile-modal-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  background: var(--color-bg-primary);
}

.profile-modal-sidebar {
  width: 240px;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.profile-modal-sidebar .modal-header-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.profile-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: var(--color-text-secondary);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.profile-tab i {
  width: 18px;
  text-align: center;
  font-size: 1.1rem;
}

.profile-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-primary);
}

.profile-tab.active {
  background: rgba(0, 141, 163, 0.18);
  color: var(--color-text-primary);
}

.profile-modal-main {
  flex: 1;
  padding: 40px 48px 32px;
  overflow-y: auto;
  position: relative;
  background: var(--color-bg-primary);
}

.modal-close-area {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 10;
}

.profile-alert {
  margin-bottom: 20px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text-secondary);
  display: none;
}

.profile-alert.show {
  display: block;
}

.profile-alert.success {
  border-color: rgba(46, 204, 113, 0.4);
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
}

.profile-alert.error {
  border-color: rgba(231, 76, 60, 0.4);
  background: rgba(231, 76, 60, 0.12);
  color: #ff6b6b;
}

.profile-tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.profile-tab-panel.active {
  display: block;
}

.profile-tab-panel .tab-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 28px;
  color: var(--color-text-primary);
}

.settings-group {
  margin-bottom: 28px;
  padding: 22px 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: var(--shadow-sm);
}

.settings-row,
.settings-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.settings-row + .settings-row {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 70%;
}

.settings-name,
.settings-label {
  font-weight: 600;
  color: var(--color-text-primary);
  font-size: 1rem;
}

.settings-desc {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin: 0;
}

.settings-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
}

.theme-option {
  cursor: pointer;
}

.theme-option input {
  display: none;
}

.theme-card {
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--color-text-secondary);
  box-shadow: var(--shadow-sm);
}

.theme-card i {
  font-size: 1.5rem;
}

.theme-option:hover .theme-card {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.theme-option input:checked + .theme-card {
  background: rgba(0, 141, 163, 0.12);
  color: var(--color-accent-primary);
  border: 1px solid var(--color-accent-primary);
  box-shadow: none !important;
}

.theme-option input:checked:hover + .theme-card,
.theme-option:hover input:checked + .theme-card {
  box-shadow: none !important;
  transform: translateY(-2px);
}

.user-profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 20px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
}

.user-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: none;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.user-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar-large i {
  font-size: 2.5rem;
  color: var(--color-text-secondary);
}

.user-details h3 {
  margin: 0 0 4px 0;
  font-size: 1.25rem;
}

.muted {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.plan-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(0, 141, 163, 0.18);
  color: var(--color-accent-primary);
  box-shadow: var(--shadow-sm);
}

.plan-pill.free {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-primary);
}

.settings-select {
  padding: 10px 14px;
  border-radius: 10px;
  background-color: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  min-width: 180px;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.settings-select:hover {
  border-color: var(--color-accent-primary);
}

.settings-select:focus {
  border-color: var(--color-accent-primary);
  box-shadow: 0 0 0 2px rgba(0, 141, 163, 0.2);
}

.settings-select option {
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

.profile-links-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-link-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  gap: 18px;
  box-shadow: var(--shadow-sm);
}

.profile-link-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.profile-link-item a {
  color: var(--color-accent-primary);
  word-break: break-all;
}

.profile-link-form {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-sm);
}

.profile-link-form.active {
  display: flex;
}

.profile-link-form .form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-link-form input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: var(--color-text-primary);
}

.link-actions {
  display: flex;
  gap: 10px;
}

.shared-links-panel {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shared-links-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shared-link-card {
  border-radius: 16px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.shared-link-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.shared-link-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.shared-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.shared-link-duration {
  width: 180px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: var(--color-text-primary);
}

.badge {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(0, 141, 163, 0.18);
  color: var(--color-accent-primary);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge.inactive {
  background: rgba(231, 76, 60, 0.2);
  color: #ff6b6b;
}

.empty-state {
  border: 1px dashed rgba(255, 255, 255, 0.15);
  padding: 20px;
  border-radius: 16px;
  text-align: center;
  color: var(--color-text-secondary);
}

.danger-zone {
  margin-top: 32px;
  border-radius: 20px;
  background: rgba(255, 107, 107, 0.08);
  padding: 20px;
  box-shadow: 0 15px 35px rgba(255, 107, 107, 0.15);
}

.text-danger {
  color: #ff6b6b;
}

.confirm-panel {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: none;
}

.confirm-panel.show {
  display: block;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

@media (max-width: 900px) {
  .modal.profile-modal {
    padding: 24px 12px;
  }

  #profile-modal .modal-content {
    max-height: calc(100vh - 40px);
  }

  .profile-modal-layout {
    flex-direction: column;
  }

  .profile-modal-sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    padding: 12px;
    gap: 12px;
    overflow-x: auto;
  }

  .profile-modal-sidebar .modal-header-title {
    display: none;
  }

  .profile-tabs {
    flex-direction: row;
    width: 100%;
  }

  .profile-tab {
    white-space: nowrap;
    padding: 10px 14px;
    flex: 1;
    justify-content: center;
  }

  .profile-modal-main {
    padding: 24px;
  }

  .settings-row,
  .settings-row-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .settings-info {
    max-width: 100%;
  }

  .settings-control {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* === LIGHT THEME OVERRIDES === */
.light-theme .modal-content {
  background-color: #ffffff;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  color: var(--color-text-primary);
}

.light-theme .modal-content h2,
.light-theme .modal-content h3,
.light-theme .modal-content label,
.light-theme .modal-content p {
  color: var(--color-text-primary);
}

.light-theme .form-group input,
.light-theme .form-group select,
.light-theme .form-group textarea {
  background-color: #f0f2f5;
  border: 1px solid rgba(0,0,0,0.15);
  color: var(--color-text-primary);
}

.light-theme .form-group input:focus,
.light-theme .form-group select:focus,
.light-theme .form-group textarea:focus {
  border-color: var(--color-accent-primary);
  box-shadow: 0 0 0 3px rgba(0,141,163,0.2);
}

.light-theme .modal-header {
  border-bottom-color: rgba(0,0,0,0.08);
}

.light-theme .modal-footer {
  border-top-color: rgba(0,0,0,0.08);
}

.light-theme .btn-secondary {
  background-color: #e9ecef;
  color: #333;
  border-color: rgba(0,0,0,0.12);
}

.light-theme .btn-secondary:hover {
  background-color: #dee2e6;
}

