:root {
  --white: #fff;
  --black: #141414;
  --grey: #626262;
  --glitch-green: #00cb50;
  --light-green: #d0fed0;
  --beige: #f6f1ea;
  --violet: #5b21b6;
  --font: "Roboto", -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  font-size: 16px;
  color: var(--black);
  background: var(--beige);
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: var(--font);
  cursor: pointer;
}

/* Typography Standards */
h1 {
  font-size: 54px;
  font-weight: 800;
  line-height: 1.2;

  @media (max-width: 768px) {
    font-size: 32px;
  }
}


h2 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.25;
  @media (max-width: 768px) {
    font-size: 28px;
  }
}

h3 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.25;
  @media (max-width: 768px) {
    font-size: 22px;
  }
}

h4 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;

  @media (max-width: 768px) {
    font-size: 18px;
  }
}

p {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.definition {
  font-size: 16px;
  font-weight: 400;
  font-style: italic;
}

.chat {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.time-chat {
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
}

ol,
ul {
  padding-left: 1.5em;
}

.hidden {
  display: none !important;
}

/* Welcome Screen */
.welcome-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  background: var(--beige);
  z-index: 1000;
  transition: opacity 0.5s ease;
}

.welcome-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.welcome-left {
  flex: 1;
  padding: 8%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.welcome-left p {
  max-width: 90%;
}

.welcome-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--light-green);
  color: var(--black);
  border: 1px solid var(--black);
  padding: 13px 28px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  transition: background 0.2s, transform 0.15s;
  margin-top: 10px;
}

.welcome-btn:hover {
  background: var(--white);
  transform: translateY(-1px);
}

.welcome-btn img {
  width: 18px;
  height: 18px;
}

.welcome-right {
  flex: 1;
  position: relative;
  background: var(--black);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-right video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-btn {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--light-green);
  border: 3px solid var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.play-btn:hover {
  transform: scale(1.05);
}

.play-btn svg {
  width: 32px;
  height: 32px;
  margin-left: 4px;
  color: var(--black);
}

@media (max-width: 768px) {
  .welcome-screen {
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .welcome-left {
    padding: 32px 24px;
    gap: 16px;
    flex: none;
  }

  .welcome-left p {
    max-width: 100%;
  }

  .welcome-right {
    flex: none;
    height: 350px;
  }
}

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

.app-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 56px;
  height: 96px;
  background: var(--white);
  border-bottom: 3px solid var(--light-green);
  z-index: 10;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 22px;
}

.header-avatar-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--light-green);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  padding: 10px;
}

.header-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header-contact-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

h4.header-name {
  color: var(--black);
}

.header-status {
  color: var(--grey);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.icon-btn {
  background: none;
  border: none;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: background 0.15s;
}

.icon-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.icon-btn img {
  width: 44px;
  height: 44px;
}

.lang-btn {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
  padding: 6px;
  border-radius: 10px;
  transition: background 0.15s;
}

.lang-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.lang-btn img {
  width: 44px;
  height: 44px;
}

.content-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}

.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px 56px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  scroll-behavior: smooth;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  padding-bottom: 8px;
}

.msg-row {
  display: flex;
  flex-direction: column;
  max-width: 58%;
  gap: 5px;
  animation: msgIn 0.35s ease-out;
}

@keyframes msgIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.msg-row.you {
  align-self: flex-end;
  align-items: flex-end;
}

.msg-row.bf,
.msg-row.ai-msg {
  align-self: flex-start;
  align-items: flex-start;
}

.bubble {
  padding: 13px 20px;
  line-height: 1.55;
  max-width: 100%;
}

.bubble-you {
  background: var(--light-green);
  color: var(--black);
  border-radius: 20px 20px 4px 20px;
}

.bubble-bf {
  background: var(--white);
  color: var(--black);
  border-radius: 20px 20px 20px 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.bubble-ai {
  background: var(--violet);
  color: var(--white);
  border-radius: 20px 20px 20px 4px;
}

.msg-time {
  color: var(--grey);
  padding: 0 4px;
}

.typing-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  animation: msgIn 0.3s ease-out;
}

.typing-bubble {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px 18px;
  background: var(--white);
  border-radius: 20px 20px 20px 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: var(--grey);
  border-radius: 50%;
  animation: typingBounce 1.3s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }

  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

.scroll-hint {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  padding: 10px 0 14px;
  background: linear-gradient(transparent, var(--beige) 60%);
}

.scroll-btn {
  min-height: 52px;
  padding: 0 24px;
  border-radius: 50px;
  background: var(--light-green);
  border: 1px solid var(--black);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--black);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  transition: background 0.2s, transform 0.15s;
}

.scroll-btn:hover {
  background: var(--white);
  transform: translateY(-1px);
}

.scroll-btn img {
  width: 18px;
  height: 18px;
}

.app-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 18px 56px;
  background: var(--white);
  border-top: 1px solid #e8e2d9;
  min-height: 165px;
}

.bars-wrap {
  display: flex;
  gap: 56px;
  flex: 1;
}

.bar-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  max-width: 420px;
}

.bar-title {
  color: var(--black);
  white-space: nowrap;
}

.bar-track-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bar-track {
  width: 100%;
  height: 48px;
  border-radius: 50px;
  border: 1px solid var(--black);
  overflow: hidden;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
  background: var(--white);
  position: relative;
}

.bar-fill {
  height: 100%;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--grey) 0%, var(--light-green) 100%);
  border-right: 1px solid var(--black);
  transition: width 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 0%;
}

.bar-emojis {
  display: flex;
  justify-content: space-between;
  padding: 0 6px;
  font-size: 24px;
  line-height: 1;
}

.bar-sublabels {
  display: flex;
  justify-content: space-between;
  padding: 0 6px;
  font-size: 11px;
  color: var(--grey);
}

.footer-you {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.footer-you-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

h4.footer-you-name {
  color: var(--black);
}

.footer-you-status {
  color: var(--grey);
}

.reveal-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 75%;
  background: var(--black);
  color: var(--white);
  border-radius: 24px 24px 0 0;
  padding: 32px 56px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 20;
  
  /* Desktop: Zentriert und NICHT scrollbar */
  justify-content: center;
  overflow: hidden; 

  /* Styling & Background */
  animation: revealUp 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  background-color: #141414;
  background-image: url("../img/header-bg-reveal.png");
  background-size: cover;
  background-position: 50%;
  background-repeat: no-repeat;
  background-blend-mode: color-dodge;
  border-top: 5px solid var(--glitch-green);
}

/* MOBILE VERSION (max-width: 768px) */
@media (max-width: 768px) {
  .reveal-panel {
    justify-content: flex-start; /* Oben ausrichten, damit man runterscrollen kann */
    overflow-y: auto;           /* Scrollen aktivieren */
    -webkit-overflow-scrolling: touch; /* Weiches Scrollen für iPhones */
    padding: 32px 24px;         /* Optional: Etwas weniger Padding auf dem Handy */
    height: 85%;                /* Moved here for better visibility */
  }
}

@keyframes revealUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.reveal-main-text {
  line-height: 1.25;
  max-width: 640px;
}

.reveal-sub-title {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.35;
  max-width: 640px;
}

.reveal-body-text {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  max-width: 640px;
}

.reveal-split-layout {
  display: flex;
  align-items: center;
  gap: 40px;
  width: 100%;
}

.reveal-split-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.reveal-split-right {
  flex: 1;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.reveal-split-right video {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .reveal-split-layout {
    flex-direction: column;
  }

  .reveal-split-right {
    width: 100%;
  }
}

.btn-reveal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 50px;
  padding: 13px 28px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--white);
  border: 1px solid var(--white);
  text-decoration: none;
  width: fit-content;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: multiply;
  background-image: url("../img/glitch-chat-img.webp");
  transition: filter 0.2s, transform 0.15s;
  cursor: pointer;
}

.btn-reveal:hover {
  background-color: rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}

.btn-reveal img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.reveal-action-btn {
  align-self: flex-start;
  background-color: var(--violet);
  margin-top: 6px;
}

.analysis-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
}

.analysis-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

h3.analysis-title {
  line-height: 1.35;
  max-width: 80%;
}

.analysis-avatar-img {
  width: 180px;
  height: 180px;
  position: absolute;
  right: 4%;
  top: 5%;
}

@media (max-width: 768px) {
  .analysis-avatar-img {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
  }
}


.analysis-ai-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.analysis-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  margin-top: 2px;
}

.analysis-ai-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ai-method {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.45;
}

.ai-impact {
  color: var(--light-green);
  font-weight: 700;
}

.human-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.human-text-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.human-bubble {
  background: var(--white);
  color: var(--black);
  padding: 9px 16px;
  border-radius: 20px 20px 20px 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  line-height: 1.4;
}

.psych-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 4px;
}

.psych-box {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  line-height: 1.4;
}

.psych-box img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.psych-box.psych-green {
  background: rgba(0, 203, 80, 0.12);
  border: 1px solid rgba(0, 203, 80, 0.4);
  color: rgba(255, 255, 255, 0.9);
}

.psych-box.psych-violet {
  background: rgba(91, 33, 182, 0.3);
  border: 1px solid rgba(139, 92, 246, 0.5);
  color: rgba(255, 255, 255, 0.9);
}

.psych-arrow {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.psych-arrow img {
  width: 22px;
  height: 22px;
}

.analysis-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
}

.nav-btn {
  background-color: var(--violet);
}

.nav-btn-green {
  background-color: var(--glitch-green);
}

.result-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  min-height: 100%;
}

.result-avatar-top {
  position: absolute;
  top: 0;
  right: 0;
  width: 50px;
  height: 50px;
}

.result-title {
  line-height: 1.2;
  padding-right: 84px;
}

.result-warning-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.result-warning-row img {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}

.result-warning-text {
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}


/* "Lire le guide officiel" — violet bg */
.result-link-btn {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  background-color: var(--beige);
  gap: 10px;
  border-radius: 50px;
  padding: 13px 28px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--white);
  border: 1px solid var(--white);
  text-decoration: none;
  width: fit-content;
  border-radius: 20px 20px 20px 4px;
  color: var(--black);
}

.result-link-btn:hover {
  color: var(--violet);
}

.result-link-btn img {
  width: 18px;
  height: 18px;
  filter: brightness(0);
}

.info-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(3px);
}

.info-modal {
  background: var(--white);
  border-radius: 28px;
  border: 3px solid var(--black);
  padding: 52px 60px 48px;
  max-width: 680px;
  width: 100%;
  position: relative;
  max-height: 88vh;
  overflow-y: auto;
}

.info-close-btn {
  position: absolute;
  top: 2%;
  right: 2%;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--light-green);
  border: 3px solid var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px;
  transition: transform 0.15s;
}

.info-close-btn:hover {
  transform: scale(1.08);
}

.info-close-btn svg {
  width: 100%;
  height: 100%;
}

.info-title {
  color: var(--black);
  margin-bottom: 28px;
}

.info-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.info-resources {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

h4.info-resources-heading {
  color: var(--black);
  margin-bottom: 4px;
}

.info-body ol {
  line-height: 1.8;
  color: var(--black);
  padding-left: 1.8em;
}

.info-body ol a {
  color: var(--black);
  text-decoration: underline;
  transition: opacity 0.15s;
}

.info-body ol a:hover {
  opacity: 0.7;
}

.info-body p {
  line-height: 1.6;
  color: var(--black);
}

.info-copyright {
  font-size: 14px !important;
  color: var(--grey) !important;
  font-style: italic;
}

.app-header.reveal-mode {
  border-bottom: 3px solid var(--glitch-green, #00cb50);
  background-color: #141414;
  background-image: url("../img/header-bg-reveal.png");
  background-size: cover;
  background-position: 50%;
  background-repeat: no-repeat;
  background-blend-mode: color-dodge;
}

.app-header.reveal-mode .header-name,
.app-header.reveal-mode .header-status {
  color: var(--white);
}

.app-header.reveal-mode .icon-btn img,
.app-header.reveal-mode .lang-btn img {
  filter: brightness(0) invert(1);
}

.app-header.reveal-mode .lang-btn {
  color: var(--white);
}

.app-header.reveal-mode .icon-btn:hover,
.app-header.reveal-mode .lang-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.chat-area.reveal-mode {
  background-color: #f6f1ea;
  background-image: url("../img/chat-bg-reveal.png");
  background-size: cover;
  background-position: 50%;
  background-repeat: no-repeat;
  background-blend-mode: color-burn;

  box-shadow: 0 0 4px 1px rgba(0, 0, 0, 0.25);
}

.chat-area.reveal-mode .bubble-you {
  background-color: var(--glitch-green);
  background-image: url("../img/glitch-chat-img.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: multiply;
  color: var(--white);
}

.chat-area.reveal-mode .bubble-bf,
.chat-area.reveal-mode .bubble-ai {
  background-color: var(--violet);
  background-image: url("../img/glitch-chat-img.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: saturation;
  color: var(--white);
  box-shadow: none;
}

.chat-area.reveal-mode .typing-bubble {
  background: var(--violet);
}

.chat-area.reveal-mode .typing-dot {
  background: rgba(255, 255, 255, 0.6);
}

@media (max-width: 1024px) {
  .app-header {
    padding: 0 32px;
  }

  .chat-area {
    padding: 20px 32px;
  }

  .app-footer {
    padding: 16px 32px;
    gap: 24px;
  }

  .bars-wrap {
    gap: 28px;
  }

  .reveal-panel {
    padding: 28px 40px 24px;
  }
}

@media (max-width: 768px) {
  .app-header {
    padding: 0 16px;
    height: 68px;
  }

  .header-avatar-wrap {
    width: 52px;
    height: 52px;
  }

  .icon-btn img,
  .lang-btn img {
    width: 36px;
    height: 36px;
  }

  .chat-area {
    padding: 16px 16px;
  }

  .msg-row {
    max-width: 82%;
  }

  .app-footer {
    flex-direction: row;
    min-height: unset;
    padding: 14px 16px;
    gap: 12px;
    align-items: stretch;
  }

  .bars-wrap {
    flex-direction: column;
    gap: 14px;
  }

  .bar-group {
    max-width: 100%;
  }

  .footer-you {
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }

  .reveal-panel {
    padding: 20px 20px 16px;
    gap: 12px;
  }

  .info-modal {
    padding: 44px 24px 36px;
  }
}

@media (max-width: 480px) {
  .header-right {
    gap: 8px;
  }

  .psych-row {
    flex-direction: column;
  }

  .psych-arrow {
    display: none;
  }

  .analysis-nav {
    flex-direction: column;
    gap: 8px;
  }

  .nav-btn {
    width: 100%;
    justify-content: center;
  }
}