:root {
  --primary: #ff4b5c;
  --accent: #ffdde1;
  --bg: #f8f9fd;
  --glass: rgba(255, 255, 255, 0.8);
  --text-dark: #1a1a1a;
  --text-light: #707070;
  --shadow-soft: 0 20px 50px rgba(0, 0, 0, 0.05);
  --radius: 32px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Outfit", sans-serif;
}

body {
  background: var(--bg);
  background-image: radial-gradient(
      circle at 10% 20%,
      rgba(255, 75, 92, 0.05) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(100, 149, 237, 0.05) 0%,
      transparent 40%
    );
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--text-dark);
}

.ambient-blob {
  position: absolute;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.4;
  animation: move 20s infinite alternate;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background: #ff4b5c;
  top: -100px;
  left: -100px;
}

.blob-2 {
  width: 300px;
  height: 300px;
  background: #6495ed;
  bottom: -50px;
  right: -50px;
}

@keyframes move {
  from {
    transform: translate(0, 0);
  }

  to {
    transform: translate(100px, 100px);
  }
}

.app-window {
  width: 95%;
  max-width: 1000px;
  height: 85vh;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
}

.header {
  padding: 30px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-section {
  display: flex;
  align-items: center;
  gap: 18px;
}

.baymax-face-container {
  width: 64px;
  height: 64px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.face-svg {
  width: 40px;
  height: 10px;
}

.user-info h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
}

.user-info p {
  font-size: 13px;
  color: #2ed573;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.online-dot {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 10px #2ed573;
}

.flags-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  filter: grayscale(0.2);
  transition: 0.3s;
}

.lang-hint {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 6px;
  font-weight: 500;
  letter-spacing: 0.3px;
  opacity: 0.8;
  text-transform: uppercase;
}

.flag-icon {
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  width: 24px;
  height: 16px;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  border: 1px solid transparent;
}

.flag-icon:hover {
  transform: scale(1.4);
  z-index: 1;
}

.flag-icon.selected {
  transform: scale(1.4);
  z-index: 2;
  border-color: var(--primary);
  box-shadow: 0 0 8px rgba(255, 75, 92, 0.4);
}

.chat-view {
  flex: 1;
  padding: 20px 40px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scrollbar-width: none;
}

.chat-view::-webkit-scrollbar {
  display: none;
}

.msg {
  max-width: 80%;
  padding: 16px 24px;
  border-radius: 24px;
  font-size: 16px;
  line-height: 1.6;
  animation: bubblePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

@keyframes bubblePop {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }

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

.msg.bot {
  background: white;
  color: var(--text-dark);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
}

.msg.user {
  background: var(--text-dark);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.thinking {
  display: none;
  align-self: flex-start;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  gap: 5px;
}

.dot-glow {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: glow 1.5s infinite;
}

@keyframes glow {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 0 10px var(--primary);
  }
}

.footer-action {
  padding: 30px 40px;
  background: rgba(255, 255, 255, 0.4);
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

.input-pill {
  background: white;
  height: 70px;
  border-radius: 35px;
  padding: 0 10px 0 30px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.input-pill:focus-within {
  border-color: var(--primary);
  box-shadow: 0 15px 35px rgba(255, 75, 92, 0.1);
  transform: translateY(-2px);
}

#message-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 17px;
  font-weight: 500;
  background: transparent;
}

.send-circle {
  width: 50px;
  height: 50px;
  background: var(--text-dark);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.send-circle:hover {
  background: var(--primary);
  transform: scale(1.05);
}

.send-circle:active {
  transform: scale(0.95);
}

.icon-btn {
  width: 50px;
  height: 50px;
  background: #f0f2f5;
  color: var(--text-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.icon-btn:hover {
  background: #e4e6e9;
  color: var(--text-dark);
}

.icon-btn.active {
  background: var(--primary);
  color: white;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 75, 92, 0.4);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(255, 75, 92, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 75, 92, 0);
  }
}

.suggestions {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  overflow-x: auto;
  scrollbar-width: none;
}

.suggestion-chip {
  padding: 10px 20px;
  background: white;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  white-space: nowrap;
  transition: 0.2s;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.suggestion-chip:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: #fff5f6;
}

@media (max-width: 600px) {
  .app-window {
    height: 100vh;
    width: 100%;
    border-radius: 0;
  }

  .header,
  .chat-view,
  .footer-action {
    padding-left: 20px;
    padding-right: 20px;
  }

  .msg {
    max-width: 90%;
  }
}

.ad-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 99999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 1s ease;
}

.ad-container.active {
  display: flex;
  opacity: 1;
}

#ad-loading {
  color: white;
  position: absolute;
  font-size: 18px;
}

.ad-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ad-badge {
  position: absolute;
  top: 30px;
  left: 40px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: white;
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.app-window {
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-window.hidden {
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  pointer-events: none;
}

.ad-controls {
  position: absolute;
  top: 30px;
  right: 40px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.ad-volume-btn {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

.ad-volume-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.unmute-hint {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  animation: fadeInOut 2s infinite;
  display: none;
}

@keyframes fadeInOut {
  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}
