:root {
  --bg: #0b1220;
  --panel: #111a2e;
  --panel2: #0f1830;
  --text: #e9eefc;
  --muted: #aab4d6;
  --border: rgba(255, 255, 255, 0.1);
  --accent: #6ea8ff;
  --accent2: #7bf0d6;
  --danger: #ff6e6e;
  --shadow: 0 14px 50px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --radius2: 14px;
  --max: 1100px;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";
  background:
    radial-gradient(
      clamp(600px, 80vw, 1200px) clamp(300px, 50vh, 600px) at 20% 0%,
      rgba(110, 168, 255, 0.22),
      transparent 55%
    ),
    radial-gradient(
      clamp(900px, 120vw, 1800px) clamp(250px, 40vh, 500px) at 90% 10%,
      rgba(123, 240, 214, 0.18),
      transparent 55%
    ),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
}
a {
  color: inherit;
  text-decoration: none;
}
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  background: rgba(17, 26, 46, 0.66);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: sticky;
  top: 14px;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
}
.brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}
.navlinks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.navlinks a {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid transparent;
}
.navlinks a:hover {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
}
.navlinks a.primary {
  color: #061022;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  font-weight: 700;
}

.hero {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}
.card {
  border: 1px solid var(--border);
  background: rgba(17, 26, 46, 0.62);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
h1 {
  font-size: clamp(28px, 3.8vw, 46px);
  margin: 0 0 10px;
}
h2 {
  font-size: 20px;
  margin: 0 0 10px;
}
p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 12px;
}
.badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 14px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}
.small {
  font-size: 14px;
}
.footer {
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  text-align: center;
}

/* App layout */
.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  margin-top: 18px;
}
.sidebar {
  padding: 16px;
}
.sidebar h2 {
  margin-bottom: 8px;
}
.sidebar .muted {
  color: var(--muted);
  font-size: 13px;
}
.list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.item {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}
.item:hover {
  background: rgba(255, 255, 255, 0.05);
}
.item .title {
  font-weight: 700;
}
.item .meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}
.btn:hover {
  background: rgba(255, 255, 255, 0.08);
}
.btn.primary {
  border: none;
  color: #061022;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}
.btn.danger {
  border-color: rgba(255, 110, 110, 0.4);
  color: #ffd1d1;
}
.btn.danger:hover {
  background: rgba(255, 110, 110, 0.1);
}

.main {
  padding: 0;
}
.chatwrap {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 160px);
  min-height: 520px;
  padding: 16px;
}
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
}
.chat {
  flex: 1;
  overflow: auto;
  padding: 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.msg {
  max-width: 820px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  white-space: pre-wrap;
}
.msg.user {
  align-self: flex-end;
  background: rgba(110, 168, 255, 0.12);
  border-color: rgba(110, 168, 255, 0.25);
}
.msg.ai {
  align-self: flex-start;
}
.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
textarea {
  width: 100%;
  min-height: 52px;
  max-height: 160px;
  resize: vertical;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  outline: none;
}
.hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.kpi {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.kpi .label {
  color: var(--muted);
  font-size: 12px;
}
.kpi .value {
  font-weight: 800;
  font-size: 18px;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .grid3 {
    grid-template-columns: 1fr;
  }
  .app {
    grid-template-columns: 1fr;
  }
  .chatwrap {
    height: auto;
    min-height: 560px;
  }
}

input {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
}


/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(110, 168, 255, 0.5), var(--shadow);
  }
  50% {
    box-shadow: 0 0 40px rgba(110, 168, 255, 0.8), var(--shadow);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Apply animations to major elements */
body {
  animation: fadeIn 0.8s ease-out;
}

.nav {
  animation: slideInDown 0.6s ease-out;
}

.card {
  animation: slideInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.card:nth-child(2) {
  animation-delay: 0.1s;
}

.card:nth-child(3) {
  animation-delay: 0.2s;
}

.hero {
  animation: fadeIn 0.8s ease-out 0.2s both;
}

.btn {
  position: relative;
  overflow: hidden;
}

.btn:hover {
  animation: pulse 0.4s ease-out;
}

.btn.primary:hover {
  animation: glow 1.5s ease-in-out infinite;


}

.item {
  animation: scaleIn 0.4s ease-out;
  animation-fill-mode: both;
}

.item:nth-child(1) {
  animation-delay: 0s;
}

.item:nth-child(2) {
  animation-delay: 0.05s;
}

.item:nth-child(3) {
  animation-delay: 0.1s;
}

.item:nth-child(4) {
  animation-delay: 0.15s;
}

.item:nth-child(5) {
  animation-delay: 0.2s;
}

.msg {
  animation: slideInUp 0.4s ease-out;
}

.badge {
  animation: fadeIn 0.5s ease-out;
  animation-fill-mode: both;
}

.badge:nth-child(1) {
  animation-delay: 0.1s;
}

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

.badge:nth-child(3) {
  animation-delay: 0.3s;
}

.navlinks a:hover {
  animation: float 0.5s ease-in-out;
}

.main-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;

}


.btn-logo:hover{
  animation: glow 1.5s ease-in-out infinite;
}