:root {
  --plus-bg-a: #11091f;
  --plus-bg-b: #1f1238;
  --plus-bg-c: #2f1d55;
}

.app[hidden],
.plusLoginGate[hidden] {
  display: none !important;
}

.plusLoginGate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(154, 111, 255, 0.22), transparent 44%),
    radial-gradient(circle at bottom right, rgba(202, 152, 255, 0.18), transparent 36%),
    linear-gradient(160deg, var(--plus-bg-a), var(--plus-bg-b), var(--plus-bg-c));
}

.plusLoginCard {
  max-width: 360px;
  width: 100%;
  background: rgba(19, 15, 36, 0.92);
  border: 1px solid rgba(210, 178, 255, 0.24);
  border-radius: 20px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.plusLoginLogo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: contain;
}

.plusLoginTitle {
  margin: 0;
  font-size: 22px;
  color: #f6efff;
}

.plusLoginSub {
  margin: 0;
  font-size: 13px;
  color: #d7c7f7;
}

.plusLoginForm {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plusLoginInput {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(210, 178, 255, 0.3);
  background: rgba(40, 28, 70, 0.7);
  color: #f6efff;
  font-size: 14px;
  box-sizing: border-box;
}

.plusLoginInput:focus {
  border-color: rgba(202, 152, 255, 0.7);
  outline: none;
  box-shadow: 0 0 0 3px rgba(202, 152, 255, 0.15);
}

.plusLoginBtn {
  width: 100%;
  padding: 11px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  background: rgba(100, 60, 180, 0.7);
  border: 1px solid rgba(202, 152, 255, 0.4);
}

.plusLoginError {
  width: 100%;
  color: #ff8fa3;
  font-size: 13px;
  text-align: center;
  padding: 8px;
  background: rgba(255, 80, 100, 0.12);
  border-radius: 8px;
  box-sizing: border-box;
}

.plusLoginBrand {
  font-size: 11px;
  color: rgba(210, 178, 255, 0.5);
  margin-top: 8px;
}

.plus-feature {
  border-color: rgba(202, 152, 255, 0.5);
  background: rgba(80, 45, 140, 0.45);
}

.plus-feature:hover {
  border-color: rgba(224, 191, 255, 0.68);
  background: rgba(108, 65, 176, 0.56);
}

.aiPanel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 320px;
  z-index: 500;
  background: rgba(19, 15, 36, 0.97);
  border-left: 1px solid rgba(210, 178, 255, 0.18);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, visibility 0.2s ease;
  transform: translateX(0);
}

.aiPanel[hidden] {
  display: flex !important;
  transform: translateX(100%);
  pointer-events: none;
  visibility: hidden;
}

.aiPanelHdr {
  padding: 16px;
  border-bottom: 1px solid rgba(210, 178, 255, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.aiPanelTitle {
  font-weight: 700;
  color: #f6efff;
}

.aiPanelSection {
  padding: 16px;
  border-bottom: 1px solid rgba(210, 178, 255, 0.08);
}

.aiPanelHint {
  font-size: 12px;
  color: #d7c7f7;
  line-height: 1.5;
  margin: 0 0 10px;
}

.aiPanelFooter {
  padding: 16px;
  margin-top: auto;
}

.aiSummaryResult,
.aiExpandResult {
  font-size: 13px;
  color: #eadbff;
  background: rgba(40, 28, 70, 0.5);
  border-radius: 8px;
  padding: 10px;
  margin-top: 10px;
  line-height: 1.5;
}

.aiSuggestionList {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.brainDumpTextarea {
  width: 100%;
  min-height: 180px;
  background: rgba(19, 15, 36, 0.8);
  color: #f6efff;
  border: 1px solid rgba(210, 178, 255, 0.24);
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
}

.brainDumpTextarea:focus {
  border-color: rgba(202, 152, 255, 0.6);
  outline: none;
}

.brainDumpCharCount {
  font-size: 11px;
  color: rgba(210, 178, 255, 0.5);
  text-align: right;
  margin-top: 4px;
}

.brainDumpStatus {
  font-size: 13px;
  color: #ca98ff;
  font-style: italic;
  padding: 8px 0;
  min-height: 24px;
}

.brainDumpStatus.is-error {
  color: #ff8fa3;
}

.brainDumpStatus.is-busy::after {
  content: "...";
  display: inline-block;
  width: 0;
  overflow: hidden;
  vertical-align: bottom;
  animation: plus-ellipsis 1.2s steps(4, end) infinite;
}

.dlgActions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

@keyframes plus-ellipsis {
  from {
    width: 0;
  }
  to {
    width: 1.35em;
  }
}

@media (max-width: 900px) {
  .aiPanel {
    width: min(92vw, 320px);
  }
}
