﻿:root {
  --bg-1: #070b1f;
  --bg-2: #0b1430;
  --accent-1: #7c3aed;
  --accent-2: #06b6d4;
  --glass: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.12);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.65);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 400px at 10% 10%, rgba(124,58,237,0.14), transparent 40%),
    radial-gradient(700px 300px at 90% 90%, rgba(6,182,212,0.14), transparent 40%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
  overflow: hidden;
}

/* App shell */
.app {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ================= HEADER ================= */

.header {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;

  backdrop-filter: blur(14px);
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.10),
    rgba(255,255,255,0.02)
  );

  border-bottom: 1px solid var(--border);
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* Logo */
.logo-wrap {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #ffffff;

  display: grid;
  place-items: center;
  overflow: hidden;

  border: 1px solid rgba(255,255,255,0.25);
  box-shadow:
    0 18px 40px rgba(0,0,0,0.45),
    0 0 0 6px rgba(255,255,255,0.08);
}

.logo-wrap img {
  width: 90%;
  height: 90%;
  object-fit: contain;
}

/* Brand text */
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 17px;
  font-weight: 800;
}

.brand-text span {
  font-size: 13px;
  color: var(--muted);
}

/* Status */
.status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34,197,94,0.9);
}

/* ================= CHAT AREA ================= */

.chat-wrapper {
  flex: 1;
  padding: 36px;
  display: flex;
}

.chat-card {
  flex: 1;
  border-radius: var(--radius);
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.06),
    rgba(255,255,255,0.02)
  );
  border: 1px solid var(--border);
  box-shadow: 0 30px 90px rgba(2,6,23,0.8);
  overflow: hidden;
  position: relative;
  padding: 6px;
}

/* Subtle gradient edge */
.chat-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  background: linear-gradient(
    135deg,
    rgba(124,58,237,0.35),
    rgba(6,182,212,0.25)
  );
  opacity: 0.12;
  pointer-events: none;
}

/* Iframe */
iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #0a1025;
  border-radius: calc(var(--radius) - 6px);
}

/* ================= LOADER ================= */

.loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(7,11,31,0.94);
  z-index: 10;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  border-radius: calc(var(--radius) - 6px);
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  font-weight: 600;
}

/* Loader animation */
.pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  animation: pulse 1.2s infinite ease-in-out;
}

.pulse:nth-child(2) { animation-delay: .15s; }
.pulse:nth-child(3) { animation-delay: .3s; }

@keyframes pulse {
  0% { transform: scale(0.8); opacity: .6; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.8); opacity: .6; }
}

/* ================= MOBILE ================= */

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

  .chat-wrapper {
    padding: 16px;
  }

  .logo-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .brand-text strong {
    font-size: 15px;
  }
}
