:root {
  color-scheme: dark;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: #0f1535;
}

[data-stock-ai-widget] {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 0 0 40px;
  background: linear-gradient(135deg, #0f1535 60%, #1ec6e6 100%);
  color: #fff;
  font-family: "Segoe UI", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
}

[data-stock-ai-widget] * {
  box-sizing: border-box;
}

[data-stock-ai-widget] .saw-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 32px 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

[data-stock-ai-widget] .saw-robot {
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-stock-ai-widget] .saw-robot img {
  animation: sawFloat 2.2s ease-in-out infinite alternate;
}

@keyframes sawFloat {
  0% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 2px 8px #ffa20044);
  }

  50% {
    transform: translateY(-12px) scale(1.04);
    filter: drop-shadow(0 8px 18px #ffa20066);
  }

  100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 2px 8px #ffa20044);
  }
}

[data-stock-ai-widget] .saw-title {
  width: 100%;
  margin: 8px 0;
  color: #ffa200;
  font-size: 2rem;
  font-weight: 600;
  text-align: left;
}

[data-stock-ai-widget] .saw-subtitle {
  width: 100%;
  margin: 0 0 24px;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
}

[data-stock-ai-widget] .saw-card {
  width: 100%;
  margin-bottom: 24px;
  padding: 20px 18px;
  border-radius: 18px;
  background: rgba(20, 30, 60, 0.95);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

[data-stock-ai-widget] .saw-accuracy {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

[data-stock-ai-widget] .saw-accuracy span {
  color: #ffa200;
  font-size: 1.3rem;
  font-weight: 700;
}

[data-stock-ai-widget] .saw-desc {
  margin-bottom: 6px;
  color: #b8c6e0;
  font-size: 1rem;
  line-height: 1.5;
}

[data-stock-ai-widget] .saw-highlight {
  color: #ffa200;
  font-weight: 500;
  text-decoration: underline;
}

[data-stock-ai-widget] .saw-input-wrap {
  width: 100%;
  margin-bottom: 18px;
}

[data-stock-ai-widget] .saw-input {
  width: 100%;
  padding: 14px 12px;
  border: 0;
  border-radius: 8px;
  outline: none;
  background: #232b45;
  color: #b8c6e0;
  font-size: 1rem;
}

[data-stock-ai-widget] .saw-btn {
  width: 100%;
  margin-top: 8px;
  padding: 14px 0;
  border: 0;
  border-radius: 24px;
  background: linear-gradient(90deg, #1ec6e6 0%, #25a4e9 100%);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(30, 198, 230, 0.18);
  animation: sawBtnBreath 1.8s ease-in-out infinite;
}

@keyframes sawBtnBreath {
  0% {
    box-shadow:
      0 2px 16px 0 rgba(30, 198, 230, 0.25),
      0 2px 8px rgba(30, 198, 230, 0.18);
    transform: scale(1);
  }

  50% {
    box-shadow:
      0 4px 32px 0 rgba(30, 198, 230, 0.38),
      0 2px 16px rgba(30, 198, 230, 0.22);
    transform: scale(1.04);
  }

  100% {
    box-shadow:
      0 2px 16px 0 rgba(30, 198, 230, 0.25),
      0 2px 8px rgba(30, 198, 230, 0.18);
    transform: scale(1);
  }
}

[data-stock-ai-widget] .saw-wa {
  background: #15a223;
  animation: sawWaBreath 1.6s ease-in-out infinite;
}

@keyframes sawWaBreath {
  0% {
    box-shadow: 0 2px 12px 0 #15a22333;
    transform: scale(1);
  }

  50% {
    box-shadow: 0 6px 24px 0 #15a22355;
    transform: scale(1.04);
  }

  100% {
    box-shadow: 0 2px 12px 0 #15a22333;
    transform: scale(1);
  }
}

[data-stock-ai-widget] .saw-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding: 24px 16px;
  overflow-y: auto;
  background:
    radial-gradient(circle at top, rgba(30, 198, 230, 0.18), transparent 36%),
    rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
}

[data-stock-ai-widget] .saw-panel {
  width: min(100%, 380px);
  margin: max(36px, 8vh) auto;
  border: 1px solid rgba(62, 234, 255, 0.16);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(14, 24, 42, 0.98), rgba(5, 16, 26, 0.98));
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

[data-stock-ai-widget] .saw-progress-panel,
[data-stock-ai-widget] .saw-result-panel {
  padding: 28px 22px;
}

[data-stock-ai-widget] .saw-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 12px;
  border: 1px solid rgba(62, 234, 255, 0.18);
  border-radius: 999px;
  background: rgba(30, 198, 230, 0.14);
  color: #8ff6ff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

[data-stock-ai-widget] .saw-status-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3eeaff;
  box-shadow: 0 0 14px rgba(62, 234, 255, 0.7);
}

[data-stock-ai-widget] .saw-status-badge--success {
  border-color: rgba(68, 221, 102, 0.2);
  background: rgba(21, 162, 35, 0.16);
  color: #a8ffb3;
}

[data-stock-ai-widget] .saw-status-badge--success::before {
  background: #44dd66;
  box-shadow: 0 0 14px rgba(68, 221, 102, 0.65);
}

[data-stock-ai-widget] .saw-progress-title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

[data-stock-ai-widget] .saw-progress-subtitle,
[data-stock-ai-widget] .saw-result-copy {
  margin: 0 0 18px;
  color: #b8c6e0;
  font-size: 14px;
  line-height: 1.6;
}

[data-stock-ai-widget] .saw-progress-item {
  margin-bottom: 14px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(62, 234, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

[data-stock-ai-widget] .saw-progress-label {
  margin-bottom: 10px;
  color: #e9f6ff;
  font-size: 15px;
  font-weight: 600;
}

[data-stock-ai-widget] .saw-progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

[data-stock-ai-widget] .saw-progress-bar {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1ec6e6 0%, #3eeaff 55%, #8ff6ff 100%);
  box-shadow: 0 0 18px rgba(62, 234, 255, 0.35);
  transition: width 0.18s ease;
}

[data-stock-ai-widget] .saw-result-title {
  margin: 0 0 14px;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.35;
}

[data-stock-ai-widget] .saw-result-panel .saw-wa {
  margin-top: 6px;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(21, 162, 35, 0.28);
}

[data-stock-ai-widget] .saw-footer {
  width: 100%;
  max-width: 400px;
  margin: 32px auto 0;
  padding: 0 16px 24px;
  color: #b8c6e0;
  font-size: 0.92rem;
  text-align: center;
}

[data-stock-ai-widget] .saw-link {
  margin: 0 8px;
  color: #3eeaff;
  text-decoration: underline;
}

[data-stock-ai-widget] .saw-cookie {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  padding: 14px 12px;
  background: rgba(20, 30, 60, 0.98);
  color: #fff;
  font-size: 0.98rem;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.13);
}

[data-stock-ai-widget] .saw-cookie-text {
  flex: 1;
}

[data-stock-ai-widget] .saw-cookie-btn {
  margin-left: 18px;
  padding: 7px 18px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(90deg, #1ec6e6 0%, #3eeaff 100%);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 480px) {
  [data-stock-ai-widget] .saw-container {
    padding: 18px 10px 0;
  }

  [data-stock-ai-widget] .saw-robot {
    width: 120px;
    height: 120px;
  }

  [data-stock-ai-widget] .saw-title {
    margin-bottom: 0;
    font-size: 1.34rem;
    text-align: center;
  }

  [data-stock-ai-widget] .saw-subtitle {
    font-size: 1.06rem;
    text-align: center;
  }

  [data-stock-ai-widget] .saw-modal {
    padding: 18px 10px;
  }

  [data-stock-ai-widget] .saw-panel {
    width: 100%;
    margin: 20px auto;
    border-radius: 20px;
  }

  [data-stock-ai-widget] .saw-progress-panel,
  [data-stock-ai-widget] .saw-result-panel {
    padding: 24px 16px;
  }

  [data-stock-ai-widget] .saw-progress-title,
  [data-stock-ai-widget] .saw-result-title {
    font-size: 1.12rem;
  }

  [data-stock-ai-widget] .saw-cookie {
    flex-direction: column;
    gap: 10px;
  }

  [data-stock-ai-widget] .saw-cookie-btn {
    margin-left: 0;
  }
}
