:root {
  --bg: #0f172a;
  --card: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.12);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --success: #22c55e;
  --danger: #ef4444;
  --low-success: #22c55e70;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Cabin', 'Inter', sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: -100%;
  background:
    radial-gradient(circle at 20% 30%, rgba(236, 72, 153, 0.35), transparent 22%),
    radial-gradient(circle at 75% 25%, rgba(59, 130, 246, 0.3), transparent 22%),
    radial-gradient(circle at 50% 75%, rgba(34, 197, 94, 0.25), transparent 25%);
  filter: blur(90px);
  z-index: -1;
}

body {
  background: radial-gradient(circle at top left, #1e293b, #0f172a 60%);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.container {
  width: 460px;
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  border-radius: 28px;
  padding: 20px 36px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  transition: 0.4s ease;
  margin: 0px auto;
}

.container.connected {
  border-color: var(--success);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.4), 0 25px 60px rgba(0, 0, 0, 0.45);
}

h1 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}


.status {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
  transition: 0.3s ease;
}

.status.not-found {
  color: var(--danger);
}

.status.found {
  color: var(--success);
}

.status.connected {
  color: var(--success);
  font-weight: 500;
}

/* PHONE SILHOUETTE */
.phone-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.phone {
  display: none;
  width: 120px;
  height: 220px;
  border-radius: 28px;
  background: #475569;
  position: relative;
  transition: 0.4s ease;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.phone.loading {
  background: linear-gradient(145deg, #f59e0b, #d97706);
  /* amber loading */
  animation: phone-pulse 1.4s ease-in-out infinite;
}

.phone.connected {
  background: linear-gradient(145deg, #22c55e, #16a34a);
  box-shadow: 0 0 35px rgba(34, 197, 94, 0.6);
}

.phone.connected.loading {
  animation: phone-pulse 1.4s ease-in-out infinite;
}

@keyframes phone-pulse {
  0% {
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 50px rgba(34, 197, 94, 1);
    transform: scale(1.04);
  }

  100% {
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
    transform: scale(1);
  }
}

.phone::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 5px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
}

.phone::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 4px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
}

.button {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 16px;
  transition: 0.25s ease;
}

.button-half {
  width: 120px;
  padding: 12px 7px;
  border-radius: 14px;
  border: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 16px;
  transition: 0.25s ease;
}

.primary {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white;
}

.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

label {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

select,
textarea {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: 0.2s ease;
}

select:focus,
textarea:focus {
  border-color: var(--accent);
}

textarea {
  min-height: 110px;
  resize: none;
  margin-top: 8px;
  font-family: monospace;
  background: rgba(0, 0, 0, 0.4);
}

.footer {
  font-size: 12px;
  color: var(--muted);
  margin-top: 18px;
  text-align: center;
}

.scrollable-container {
  height: 190px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

::-webkit-scrollbar-button {
  display: none;
}


.switch-toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;

}

.switch-toggle input {
  position: absolute;
  opacity: 0;
}

.switch-toggle input+label {
  border: 1px solid var(--bg);
  height: 90px;
  max-width: fit-content;
  min-width: 110px;
  padding: 4px;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.switch-toggle input+label:hover {
  border: 3px solid var(--success);
  padding: 4px;
  color: #fff;
  cursor: pointer;
  box-shadow: 10px 15px 100px var(--success);
}

.switch-toggle input+label>img {
  max-width: 75px;
  background-color: white;
  border-radius: 2px;
  padding: 10px;
}

.switch-toggle input:checked+label {
  border: 3px solid var(--success);
  padding: 4px;
  color: #fff;
  cursor: pointer;
  box-shadow: 10px 15px 100px var(--success);
}

.active {
  border: 3px solid var(--success);
  box-shadow: 10px 15px 100px var(--success);
}

.page-wrapper {
  width: 100%;
  height: 100vh
}

.header {
  text-align: center;
  margin: 20px;
  font-family: 'cabin';
}

.page-wrapper .content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);

  .content-mid {
    min-width: 600px;
  }


}

h2 {
  color: #38bdf8;
  margin-top: 0px;
  margin-bottom: 15px;
  font-weight: 600;
}

p {
  margin: 10px 0;
}

ol {
  padding-left: 22px;
}

ul {
  padding-left: 22px;
  margin-top: 8px;
}

li {
  margin-bottom: 8px;
}

strong {
  color: #ffffff;
}

code {
  background: #1e293b;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: monospace;
  color: #facc15;
}

hr {
  border: none;
  border-top: 1px solid #334155;
  margin: 5px 0;
}

button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.65;
  pointer-events: none;
}

.csc-btn-container {
  display: flex;
  justify-content: space-between;

  button:hover {
    box-shadow: 0 0 35px rgba(34, 197, 94, 0.6);

  }
}

.custom-csc-input {
  width: 120px;
  outline: none;
  background-color: var(--bg);
  border-radius: 14px;
  padding: 7px 12px;
  font-size: 20px;
  color: #fff;
  text-align: center;
  text-transform: uppercase;
  display: none;
}

.custom-csc-input:focus {
  border: 3px solid var(--success);
  box-shadow: 10px 15px 100px var(--success);
}

.custom-csc-btn-container {
  display: flex;
  align-items: center;
}

.instructions-panel {
  position: sticky;
  top: 0;
  width: 560px;
  overflow-y: auto;
  height: 100%;
  padding: 20px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);

  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.content>.content-left {
  display: flex;
  justify-content: right;
  max-height: 800px;
}

.instructions-panel::-webkit-scrollbar {
  width: 8px;
}

.instructions-panel::-webkit-scrollbar-track {
  background: transparent;

}

.instructions-panel::-webkit-scrollbar-thumb {
  background-color: var(--accent);
  border-radius: 10px;
}

.instructions {
  border-radius: 28px;
  overflow: hidden;
  padding: 0px;

}

.mid-header {
  display: flex;
  justify-content: space-between;
}

.mid-header>.indicator {
  height: 32px;
  width: 32px;
  background-color: #475569;
  border-radius: 50%;
  transition: all 0.3s ease;
  will-change: transform, box-shadow;

}

/* loading = pulsing amber */
.indicator.loading {
  background-color: #f59e0b;
  animation: indicator-pulse 1.2s ease-in-out infinite;
}

/* connected = green + optional pulse */
.indicator.connected {
  background-color: var(--success);
  box-shadow: 0 0 35px rgba(34, 197, 94, 0.6);
}

/* connected + loading (active work) */
.indicator.connected.loading {
  animation: indicator-pulse 1.2s ease-in-out infinite;
}

a{
  text-decoration: underline;
  color: var(--accent);
}
.note{
  padding: 7px;
  border: 1px solid rgba(255, 0, 0, 0.5);
  border-radius: 8px;
  background: rgba(255, 0, 0, .1);
  color: white
}

@keyframes indicator-pulse {
  0% {
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 35px rgba(34, 197, 94, 0.9);
    transform: scale(1.15);
  }

  100% {
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
    transform: scale(1);
  }
}

a.code-link{
  text-decoration: underline;
}

@media(min-height: 1305px) {
  .phone {
    display: block;
  }

}