* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: #121212;
  color: #e0e0e0;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* --- PAINEL LATERAL (DA SOFIA) --- */
.sidebar {
  width: 440px;
  min-width: 440px;
  background-color: #1e1e1e;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-right: 1px solid #2a2a2a;
  z-index: 10;
}

/* Card Principal da Sofia */
.sofia-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #252525;
  padding: 24px 16px;
  border-radius: 16px;
  border: 1px solid #333;
  text-align: center;
}

/* Avatar da Sofia */
.avatar-container {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  padding: 4px;
  border: 4px solid #444;
  margin-bottom: 12px;
  transition: all 0.3s ease-in-out;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Ponto verde de status */
.status-dot {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  background-color: #2ecc71;
  border: 3px solid #252525;
  border-radius: 50%;
}

/* --- ANIMAÇÃO DE QUANDO A SOFIA FALA --- */
.avatar-container.speaking {
  border-color: #2ecc71;
  box-shadow: 0 0 25px rgba(46, 204, 113, 0.8);
  animation: pulse-green 1.2s infinite alternate ease-in-out;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.4);
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 30px rgba(46, 204, 113, 1);
    transform: scale(1.05);
  }
}

.sofia-info h2 {
  font-size: 1.4rem;
  color: #ffffff;
  font-weight: 600;
}

.sofia-info p {
  font-size: 0.9rem;
  color: #2ecc71;
  font-weight: 500;
  margin-top: 2px;
}

/* Caixa de Diálogo/Texto da Sofia */
.chat-box {
  flex: 1;
  background: #282828;
  border-radius: 12px;
  padding: 20px;
  overflow-y: auto;
  border: 1px solid #383838;
  display: flex;
  align-items: flex-start;
}

.mensagem-sofia {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #ececec;
}

/* Input de Texto e Botão */
.input-form {
  display: flex;
  gap: 10px;
}

.input-form input {
  flex: 1;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid #3c3c3c;
  background-color: #2c2c2c;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
}

.input-form input:focus {
  border-color: #2ecc71;
}

.input-form button {
  padding: 14px 22px;
  border-radius: 10px;
  border: none;
  background-color: #2ecc71;
  color: #121212;
  font-weight: bold;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}

.input-form button:hover {
  background-color: #27ae60;
}

/* --- ÁREA PRINCIPAL (FOTO DO PROJETO) --- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 18px;
  height: 100vh;
}

.nav-ambientes {
  display: flex;
  gap: 12px;
}

.btn-ambiente {
  padding: 12px 24px;
  border-radius: 24px;
  border: 1px solid #444;
  background-color: #1e1e1e;
  color: #ccc;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ambiente:hover, .btn-ambiente.active {
  background-color: #2ecc71;
  color: #121212;
  font-weight: bold;
  border-color: #2ecc71;
}

/* Viewer da imagem */
.image-viewer {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 16px;
  overflow: hidden;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-viewer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Seletor de Estilos no topo superior direito da foto */
.estilo-selector {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  padding: 4px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  gap: 4px;
  z-index: 5;
}

.btn-estilo {
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  background: transparent;
  color: #a0a0a0;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-estilo:hover {
  color: #ffffff;
}

.btn-estilo.active {
  background-color: #2ecc71;
  color: #121212;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
}
