/* ============================================================
   SilentSniper — Competitor Scanner
   Navy / teal control-panel theme
   ============================================================ */

:root {
  /* Surfaces */
  --navy-950: #070b14;
  --navy-900: #0b1322;
  --navy-800: #111c30;
  --navy-700: #18253c;
  --navy-600: #213452;

  /* Lines */
  --line: #243551;
  --line-subtle: #1c2940;
  --line-strong: #2c3e5e;

  /* Accent */
  --teal-300: #7fe9da;
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-glow: rgba(45, 212, 191, 0.18);

  /* Status colors */
  --success-400: #34d399;
  --success-500: #10b981;
  --danger-400: #fb7185;
  --danger-500: #e11d48;

  /* Text */
  --ink-100: #eaf2fb;
  --ink-300: #c2d0e4;
  --ink-400: #91a3bd;
  --ink-600: #5a6b85;

  /* Type */
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 7px;

  --shadow-panel: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 14px 30px -18px rgba(0, 0, 0, 0.7);
}

* {
  box-sizing: border-box;
}

/* General Styles */
body {
  font-family: var(--font-body);
  color: var(--ink-100);
  margin: 0;
  padding: 0;
  background:
    radial-gradient(900px 420px at 50% -120px, rgba(45, 212, 191, 0.10), transparent 60%),
    var(--navy-950);
  min-height: 100vh;
}

.ss-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

/* Header / brand */
.ss-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 40px;
  text-align: center;
  flex-direction: column;
}

.ss-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-400);
}

.ss-brand__mark {
  width: 18px;
  height: 18px;
  color: var(--teal-400);
}

.ss-brand__name {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-400);
}

.ss-header__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ss-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-400);
}

.ss-eyebrow--danger {
  color: var(--danger-400);
}

h1.page-title {
  font-family: var(--font-display);
  font-weight: 600;
  text-align: center;
  color: var(--ink-100);
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.01em;
}

/* Container Styles */
.container {
  margin-bottom: 20px;
}

.ss-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: stretch;
}

/* Panels */
.panel {
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  padding: 22px 22px 20px;
  flex: 1 1 45%;
  min-width: 300px;
}

.panel__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin: 0 0 14px;
  font-weight: 500;
}

#competitor-controls-container,
#scan-info-container {
  box-sizing: border-box;
}

/* Textarea */
#competitorInput {
  width: 100%;
  height: 150px;
  padding: 12px 14px;
  resize: vertical;
  background: var(--navy-700);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink-100);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#competitorInput::placeholder {
  color: var(--ink-600);
}

#competitorInput:focus-visible {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px var(--teal-glow);
}

#competitorInput::-webkit-scrollbar {
  width: 8px;
}

#competitorInput::-webkit-scrollbar-track {
  background: transparent;
}

#competitorInput::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 4px;
}

/* Button Styles */
#button-container,
.ss-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

button,
.btn {
  font-family: var(--font-body);
  border: 1px solid transparent;
  padding: 10px 16px;
  margin: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

button:active {
  transform: translateY(1px);
}

.btn--primary {
  background-color: var(--teal-500);
  color: var(--navy-950);
}

.btn--primary:hover {
  background-color: var(--teal-400);
}

.btn--ghost {
  background-color: transparent;
  border-color: var(--line-strong);
  color: var(--ink-300);
}

.btn--ghost:hover {
  border-color: var(--ink-400);
  color: var(--ink-100);
}

.btn--danger-outline {
  background-color: transparent;
  border-color: rgba(225, 29, 72, 0.4);
  color: var(--danger-400);
}

.btn--danger-outline:hover {
  background-color: rgba(225, 29, 72, 0.1);
  border-color: var(--danger-500);
}

.btn--success {
  background-color: var(--success-500);
  color: var(--navy-950);
}

.btn--success:hover {
  background-color: var(--success-400);
}

button:disabled,
.btn:disabled {
  background-color: var(--navy-700);
  border-color: var(--line-subtle);
  color: var(--ink-600);
  cursor: not-allowed;
}

button:disabled:hover,
.btn:disabled:hover {
  transform: none;
}

/* Telemetry / stats */
.ss-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-subtle);
}

.ss-stat:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ss-stat label,
.ss-stat__label {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-300);
}

.ss-stat__value {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--teal-300);
}

#currentPosition {
  width: 80px;
  text-align: right;
}

.ss-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#currentUser {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--ink-100);
}

.ss-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-600);
  flex: 0 0 auto;
}

#currentUser:not(:empty) ~ .ss-status__dot {
  background: var(--teal-400);
  box-shadow: 0 0 0 4px var(--teal-glow);
  animation: ss-pulse 1.6s ease-in-out infinite;
}

/* Options and Links */
.ss-options {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  text-align: center;
}

#options-container {
  text-align: center;
}

#captcha-solver-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  color: var(--danger-400);
  font-weight: 500;
  font-size: 0.86rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}

#captcha-solver-link:hover {
  color: var(--danger-500);
  text-decoration: underline;
}

/* Reset Animation Styles */
#resetAnimationContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(7, 11, 20, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 999;
}

#resetAnimationContainer.show {
  opacity: 1;
  pointer-events: auto;
}

#resetAnimationContent {
  text-align: center;
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  box-shadow: var(--shadow-panel);
  animation: ss-fadeIn 0.4s ease forwards;
}

.ss-reticle {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 14px auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ss-reticle::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 50%;
}

.ss-reticle::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px dashed rgba(251, 113, 133, 0.45);
  border-radius: 50%;
  animation: ss-spin 7s linear infinite;
}

#resetIcon {
  animation: shake 0.5s ease-in-out;
  stroke: var(--danger-400);
  position: relative;
  z-index: 1;
}

#resetAnimationContent p {
  font-size: 1.02rem;
  color: var(--ink-100);
  margin: 0;
  font-weight: 500;
}

@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

@keyframes ss-fadeIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes ss-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes ss-pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--teal-glow); }
  50% { box-shadow: 0 0 0 7px rgba(45, 212, 191, 0.06); }
}

/* Input and Dropdown Styles */
input[type="number"],
select {
  padding: 7px 10px;
  margin-top: 0;
  background: var(--navy-700);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: var(--font-mono);
  color: var(--ink-100);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select {
  font-family: var(--font-body);
}

input[type="number"]:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px var(--teal-glow);
}

input[type="number"] {
  width: 80px;
}

label {
  font-weight: 500;
  color: var(--ink-300);
}

/* Scan Options Container */
.panel--row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 14px;
}

#scan-options-container label {
  display: inline-block;
  margin-right: 8px;
  font-weight: 500;
  font-size: 0.86rem;
  color: var(--ink-300);
}

#scan-options-container select {
  width: auto;
  display: inline-block;
  margin-right: 28px;
}

#scan-options-container > div {
  display: inline-flex;
  align-items: center;
  margin-right: 28px;
}

#scan-options-container > div select {
  margin-right: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .ss-shell {
    padding: 36px 16px 48px;
  }

  .ss-grid {
    flex-direction: column;
  }

  .panel {
    flex: 1 1 100%;
    min-width: 0;
  }

  h1.page-title {
    font-size: 1.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
