/*
  Author: Bladestar2105
  License: MIT
*/
/* IPTV-Manager - TV-Inspired Design */

select option[data-icon] {
  background-repeat: no-repeat;
  background-position: left center;
  padding-left: 25px; /* Adjust based on icon size */
}

:root {
  --tv-dark: #0a0e27;
  --tv-darker: #050812;
  --tv-blue: #1e3a8a;
  --tv-blue-light: #60a5fa;
  --tv-cyan: #22d3ee;
  --tv-purple: #a78bfa;
  --tv-green: #34d399;
  --tv-red: #f87171;
  --tv-yellow: #fbbf24;
  --tv-gray: #4b5563;
  --tv-gray-light: #9ca3af;
  --tv-text-primary: #f9fafb;
  --tv-text-secondary: #e5e7eb;
  --tv-text-muted: #d1d5db;
  --tv-border: #1f2937;
  --tv-glow: rgba(96, 165, 250, 0.3);
}

body {
  background: linear-gradient(135deg, var(--tv-darker) 0%, var(--tv-dark) 100%);
  color: var(--tv-text-primary);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
}

.container, .container-fluid {
  background: rgba(10, 14, 39, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.1);
  border: 1px solid var(--tv-border);
}

h1 {
  color: var(--tv-blue-light);
  text-shadow: 0 0 20px var(--tv-glow);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 2rem;
  text-align: center;
}

h3 {
  color: var(--tv-cyan);
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--tv-border);
}

h5, h6 {
  color: var(--tv-blue-light);
}

.card {
  background: rgba(31, 41, 55, 0.6);
  border: 1px solid var(--tv-border);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
  border-color: var(--tv-blue-light);
}

.card-header {
  background-color: rgba(31, 41, 55, 0.8);
  border-bottom: 1px solid var(--tv-border);
  color: var(--tv-cyan);
  font-weight: 600;
  padding: 0.75rem 1.25rem;
}

.card-title {
  margin-bottom: 0;
  color: var(--tv-blue-light);
  text-align: center;
}

.form-control, .form-select {
  background: rgba(31, 41, 55, 0.9);
  border: 1px solid var(--tv-border);
  color: var(--tv-text-primary);
  transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
  background: rgba(31, 41, 55, 1);
  border-color: var(--tv-blue-light);
  box-shadow: 0 0 10px var(--tv-glow);
  color: var(--tv-text-primary);
}

.form-control::placeholder {
  color: var(--tv-text-muted);
}

.form-control:disabled, .form-control[readonly] {
  background-color: rgba(17, 24, 39, 0.6);
  color: var(--tv-text-muted);
  opacity: 1;
}

.form-select option {
  background: #1f2937;
  color: var(--tv-text-primary);
}

.btn {
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--tv-blue) 0%, var(--tv-blue-light) 100%);
  box-shadow: 0 4px 15px rgba(96, 165, 250, 0.3);
  color: white;
  font-weight: 600;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--tv-blue-light) 0%, var(--tv-cyan) 100%);
  box-shadow: 0 6px 20px rgba(96, 165, 250, 0.5);
  transform: translateY(-2px);
  color: white;
}

.btn-success {
  background: var(--tv-green);
  box-shadow: 0 4px 15px rgba(52, 211, 153, 0.3);
  color: var(--tv-darker);
  font-weight: 600;
}

.btn-success:hover {
  background: #059669;
  box-shadow: 0 6px 20px rgba(52, 211, 153, 0.5);
  transform: translateY(-2px);
  color: white;
}

.btn-danger {
  background: var(--tv-red);
  box-shadow: 0 4px 15px rgba(248, 113, 113, 0.3);
  color: white;
  font-weight: 600;
}

.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 6px 20px rgba(248, 113, 113, 0.5);
  transform: translateY(-2px);
  color: white;
}

.btn-warning {
  background: var(--tv-yellow);
  color: var(--tv-darker);
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
  font-weight: 600;
}

.btn-warning:hover {
  background: #d97706;
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.5);
  transform: translateY(-2px);
  color: white;
}

.btn-outline-primary {
  border: 2px solid var(--tv-blue-light);
  color: var(--tv-blue-light);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--tv-blue-light);
  color: white;
  box-shadow: 0 0 15px var(--tv-glow);
}

.btn-outline-secondary {
  border: 2px solid var(--tv-gray);
  color: var(--tv-text-secondary);
  background: transparent;
}

.btn-outline-secondary:hover {
  background: var(--tv-gray);
  color: var(--tv-text-primary);
  border-color: var(--tv-gray-light);
}

.list-group-item {
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid var(--tv-border);
  color: var(--tv-text-primary);
  transition: all 0.3s ease;
}

.list-group-item:hover {
  background: rgba(31, 41, 55, 0.95);
  border-color: var(--tv-blue-light);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.list-group-item.text-muted {
  color: var(--tv-text-muted) !important;
}

.modal-content {
  background: linear-gradient(135deg, var(--tv-dark) 0%, var(--tv-darker) 100%);
  border: 1px solid var(--tv-border);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.modal-header {
  border-bottom: 1px solid var(--tv-border);
}

.modal-footer {
  border-top: 1px solid var(--tv-border);
}

.modal-title {
  color: var(--tv-blue-light);
}

.btn-close {
  filter: invert(1);
}

.table {
  color: var(--tv-text-primary);
}

.table td, .table th {
  border-color: var(--tv-border);
  padding: 0.75rem;
}

.table tbody td {
  color: var(--tv-text-primary);
  font-weight: 500;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  background: rgba(31, 41, 55, 0.4);
}

.table-striped > tbody > tr:nth-of-type(even) > * {
  background: rgba(31, 41, 55, 0.2);
}

.table thead th {
  background: var(--tv-blue-light);
  color: white;
  border-color: var(--tv-border);
  font-weight: 600;
}

.badge {
  padding: 0.4em 0.8em;
  font-weight: 500;
}

.badge.bg-success {
  background: var(--tv-green) !important;
}

.badge.bg-danger {
  background: var(--tv-red) !important;
}

code {
  background: rgba(31, 41, 55, 0.8);
  color: var(--tv-cyan);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--tv-border);
}

hr {
  border-color: var(--tv-border);
  opacity: 0.5;
}

#language-selector {
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid var(--tv-border);
  color: var(--tv-text-primary);
  padding: 0.5rem;
  border-radius: 6px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--tv-darker);
}

::-webkit-scrollbar-thumb {
  background: var(--tv-blue);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--tv-blue-light);
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.6);
  }
}

.btn-primary:focus {
  animation: glow 2s infinite;
}

@media (max-width: 768px) {
  .container, .container-fluid {
    padding: 1rem;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  .btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
}

.alert {
  border-radius: 8px;
  border: 1px solid;
}

.alert-info {
  background: rgba(6, 182, 212, 0.1);
  border-color: var(--tv-cyan);
  color: var(--tv-cyan);
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--tv-green);
  color: var(--tv-green);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--tv-red);
  color: var(--tv-red);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--tv-yellow);
  color: var(--tv-yellow);
}

.form-check-input {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--tv-text-muted);
}

.form-check-input:checked {
  background-color: var(--tv-blue-light);
  border-color: var(--tv-blue-light);
}

.form-check-input:focus {
  box-shadow: 0 0 10px var(--tv-glow);
}

small, .small {
  color: var(--tv-text-secondary);
}

.text-muted {
  color: var(--tv-text-muted) !important;
}

strong {
  color: var(--tv-blue-light);
}

a {
  color: var(--tv-cyan);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--tv-blue-light);
  text-shadow: 0 0 10px var(--tv-glow);
}

/* Additional text visibility improvements */
label {
  color: var(--tv-text-primary);
  font-weight: 500;
}

.form-label {
  color: var(--tv-text-primary);
  font-weight: 500;
}

p {
  color: var(--tv-text-primary);
}

span {
  color: inherit;
}

.text-secondary {
  color: var(--tv-text-secondary) !important;
}

.text-dark {
  color: var(--tv-text-primary) !important;
}

.text-light {
  color: var(--tv-text-primary) !important;
}

/* Improve visibility of disabled elements */
.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  color: var(--tv-text-muted);
}

/* Improve dropdown menu visibility */
.dropdown-menu {
  background: rgba(31, 41, 55, 0.95);
  border: 1px solid var(--tv-border);
}

.dropdown-item {
  color: var(--tv-text-primary);
}

.dropdown-item:hover {
  background: rgba(59, 130, 246, 0.2);
  color: var(--tv-blue-light);
}

/* Improve modal text visibility */
.modal-body {
  color: var(--tv-text-primary);
}

.modal-body label {
  color: var(--tv-text-primary);
}

/* Improve list group text */
.list-group-item strong {
  color: var(--tv-blue-light);
}

.list-group-item small {
  color: var(--tv-text-secondary);
}

/* Improve badge visibility */
.badge {
  font-weight: 600;
}

/* Improve card text */
.card-body {
  color: var(--tv-text-primary);
}

.card-title {
  color: var(--tv-blue-light);
}

.card-text {
  color: var(--tv-text-primary);
}

/* Fix visibility of mapped EPGs in dark mode */
.table-info {
  --bs-table-bg: rgba(30, 58, 138, 0.5) !important;
  --bs-table-striped-bg: rgba(30, 58, 138, 0.6) !important;
  background-color: var(--bs-table-bg) !important;
  color: var(--tv-text-primary) !important;
}

.table-info > td,
.table-info > th {
  background-color: var(--bs-table-bg) !important;
  color: var(--tv-text-primary) !important;
  box-shadow: none !important;
}

.table-info:hover > td,
.table-info:hover > th {
   background-color: rgba(30, 58, 138, 0.7) !important;
}

/* Fix EPG Sources Box scrolling */
#epg-sources-list {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: auto;
}

/* Fix table-danger visibility in dark mode (used in Client Logs) */
.table-danger {
  --bs-table-bg: rgba(239, 68, 68, 0.25) !important;
  --bs-table-striped-bg: rgba(239, 68, 68, 0.35) !important;
  background-color: var(--bs-table-bg) !important;
  color: var(--tv-text-primary) !important;
}

.table-danger > td,
.table-danger > th {
  background-color: transparent !important;
  color: var(--tv-text-primary) !important;
  box-shadow: none !important;
}

.table-danger:hover > td {
   background-color: rgba(239, 68, 68, 0.4) !important;
}

/* Extracted from index.html */
.sortable-ghost {
  opacity: 0.4;
  background: #f0f0f0;
}
.sortable-drag {
  opacity: 0.8;
}
.drag-handle {
  cursor: grab;
  padding: 0 8px;
  color: var(--tv-text-muted);
  transition: all 0.2s ease;
  font-size: 1.2em;
}
.drag-handle:hover {
  color: var(--tv-blue-light);
  cursor: grab;
  transform: scale(1.1);
}
.drag-handle:active {
  cursor: grabbing;
  color: var(--tv-cyan);
  transform: scale(0.95);
}
.lang-switcher {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 1000;
}

/* Helper Classes to remove inline styles */
.w-150px { width: 150px; }
.w-250px { width: 250px; }
.flex-grow-1 { flex-grow: 1; }
.z-1100 { z-index: 1100; }

.max-h-200-scroll { max-height: 200px; overflow: auto; }
.max-h-300-scroll { max-height: 300px; overflow-y: auto; }
.max-h-400-scroll { max-height: 400px; overflow-y: auto; }
.max-h-600-scroll { max-height: 600px; overflow-y: auto; }

.tv-container-border {
  border: 1px solid var(--tv-border);
  border-radius: 8px;
}

.th-w-5 { width: 5%; }
.th-w-15 { width: 15%; }
.th-w-25 { width: 25%; }
.th-w-30 { width: 30%; }
.qr-code-img { max-width: 200px; }

/* Focus visible styles for accessibility */
[role="button"]:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--tv-cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Add visual indicator for required form fields */
.form-label:has(+ input[required])::after,
.form-label:has(+ select[required])::after,
.form-label:has(+ .input-group > input[required])::after,
.form-label:has(+ .input-group > select[required])::after {
  content: " *";
  color: var(--tv-red);
}

/* StremIPTV launch login scene */
body.login-active {
  background:
    radial-gradient(circle at 14% 18%, rgba(20, 184, 166, 0.22), transparent 34%),
    radial-gradient(circle at 78% 8%, rgba(250, 204, 21, 0.12), transparent 30%),
    linear-gradient(135deg, #020713 0%, #061827 42%, #120d09 100%);
  font-family: "Space Grotesk", "Rajdhani", "Eurostile", "Trebuchet MS", sans-serif;
  overflow-x: hidden;
}

body.login-active #main-navbar,
body.login-active #main-content {
  display: none !important;
}

.strem-launch {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(2, 6, 23, 0.92), rgba(2, 12, 18, 0.62)),
    radial-gradient(circle at 16% 24%, rgba(34, 211, 238, 0.22), transparent 34%),
    radial-gradient(circle at 72% 42%, rgba(20, 184, 166, 0.2), transparent 36%),
    radial-gradient(circle at 92% 78%, rgba(245, 158, 11, 0.18), transparent 34%);
}

.strem-launch::before,
.strem-launch::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.72;
  pointer-events: none;
}

.strem-launch::before {
  width: 42vw;
  height: 42vw;
  left: -14vw;
  top: -10vw;
  background: conic-gradient(from 40deg, rgba(34, 211, 238, 0), rgba(34, 211, 238, 0.42), rgba(22, 163, 74, 0.2), rgba(34, 211, 238, 0));
  animation: strem-spin 22s linear infinite;
}

.strem-launch::after {
  width: 50vw;
  height: 50vw;
  right: -18vw;
  bottom: -20vw;
  background: conic-gradient(from 160deg, rgba(245, 158, 11, 0), rgba(245, 158, 11, 0.28), rgba(20, 184, 166, 0.26), rgba(245, 158, 11, 0));
  animation: strem-spin 28s linear infinite reverse;
}

.strem-noise {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 7px 7px;
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 78%);
}

.strem-grid {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(45, 212, 191, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 191, 0.12) 1px, transparent 1px);
  background-size: 72px 72px;
  transform: perspective(900px) rotateX(63deg) translateY(22vh) scale(1.4);
  transform-origin: center bottom;
  animation: strem-grid-flow 16s linear infinite;
}

.strem-orb {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  mix-blend-mode: screen;
}

.strem-orb-primary {
  width: 38rem;
  height: 38rem;
  right: 3vw;
  top: 18vh;
  background:
    radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.85), transparent 5%),
    radial-gradient(circle, rgba(34, 211, 238, 0.24), rgba(20, 184, 166, 0.08) 42%, transparent 70%);
  box-shadow: 0 0 110px rgba(34, 211, 238, 0.28);
  animation: strem-float 9s ease-in-out infinite;
}

.strem-orb-secondary {
  width: 22rem;
  height: 22rem;
  left: 20vw;
  bottom: 7vh;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.22), rgba(249, 115, 22, 0.08) 44%, transparent 72%);
  box-shadow: 0 0 80px rgba(250, 204, 21, 0.18);
  animation: strem-float 11s ease-in-out infinite reverse;
}

.strem-signal {
  position: absolute;
  height: 2px;
  width: 58vw;
  left: -8vw;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(125, 249, 255, 0.92), rgba(250, 204, 21, 0.64), transparent);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.6);
  transform: rotate(-18deg);
  animation: strem-scan 5.5s ease-in-out infinite;
}

.strem-signal-one {
  top: 24vh;
}

.strem-signal-two {
  top: 62vh;
  left: 52vw;
  animation-delay: 1.8s;
  transform: rotate(-18deg) scaleX(0.72);
}

.strem-stage {
  position: absolute;
  left: clamp(2rem, 6vw, 7rem);
  top: 50%;
  z-index: 1;
  width: min(58rem, 68vw);
  transform: translateY(-50%);
  color: #f8fafc;
  pointer-events: none;
}

.strem-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.48rem 0.78rem;
  border: 1px solid rgba(45, 212, 191, 0.42);
  border-radius: 999px;
  background: rgba(3, 24, 33, 0.62);
  color: #67e8f9;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  box-shadow: 0 0 26px rgba(34, 211, 238, 0.16);
}

.strem-stage h1 {
  max-width: 54rem;
  margin: 1.35rem 0 1rem;
  color: #ffffff;
  text-align: left;
  font-size: clamp(3.35rem, 6.65vw, 8.2rem);
  line-height: 0.88;
  letter-spacing: -0.08em;
  text-shadow:
    0 0 28px rgba(34, 211, 238, 0.2),
    0 18px 70px rgba(0, 0, 0, 0.55);
}

.strem-stage p {
  width: min(44rem, 100%);
  color: rgba(226, 232, 240, 0.86);
  font-size: clamp(1.05rem, 1.28vw, 1.34rem);
  line-height: 1.7;
}

.strem-roadmap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  width: min(50rem, 100%);
  margin-top: 1.65rem;
}

.strem-roadmap span {
  padding: 0.82rem 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: rgba(2, 8, 23, 0.48);
  color: rgba(241, 245, 249, 0.86);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05), 0 16px 40px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

.strem-build-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  width: min(58rem, 100%);
  margin-top: 1rem;
}

.strem-build-board div {
  min-height: 8rem;
  padding: 1rem;
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: 24px;
  background:
    linear-gradient(155deg, rgba(8, 18, 34, 0.62), rgba(3, 10, 20, 0.34)),
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.14), transparent 42%);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05), 0 20px 55px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

.strem-build-board strong,
.strem-build-board span {
  display: block;
}

.strem-build-board strong {
  color: #ffffff;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.strem-build-board span {
  margin-top: 0.55rem;
  color: rgba(226, 232, 240, 0.68);
  font-size: 0.9rem;
  line-height: 1.55;
}

body.login-active .modal-backdrop.show {
  opacity: 0;
  pointer-events: none;
}

body.login-active #login-modal {
  font-family: "Space Grotesk", "Rajdhani", "Eurostile", "Trebuchet MS", sans-serif;
}

body.login-active #login-modal .strem-login-dialog {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  width: min(330px, calc(100vw - 2rem));
  max-width: none;
  min-height: 0;
  margin: 0;
  align-items: flex-start;
}

body.login-active #login-modal .strem-login-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(8, 15, 34, 0.93), rgba(3, 9, 20, 0.88)),
    radial-gradient(circle at 82% 12%, rgba(45, 212, 191, 0.18), transparent 30%);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 60px rgba(34, 211, 238, 0.14);
  backdrop-filter: blur(24px);
}

body.login-active #login-modal .strem-login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 30%, rgba(255, 255, 255, 0.08) 44%, transparent 58% 100%),
    radial-gradient(circle at 50% 0%, rgba(250, 204, 21, 0.12), transparent 34%);
  transform: translateX(-70%);
  animation: strem-glint 6s ease-in-out infinite;
}

body.login-active #login-modal .strem-login-header {
  position: relative;
  z-index: 1;
  padding: 0.95rem 1rem 0.6rem;
  border-bottom: 1px solid rgba(103, 232, 249, 0.16);
}

body.login-active #login-modal .modal-title {
  margin-top: 0.34rem;
  color: #ffffff;
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: -0.035em;
  text-shadow: 0 0 26px rgba(34, 211, 238, 0.22);
}

.strem-pill {
  display: inline-flex;
  padding: 0.26rem 0.52rem;
  border: 1px solid rgba(45, 212, 191, 0.46);
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.12);
  color: #5eead4;
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

body.login-active #login-modal .strem-login-body {
  position: relative;
  z-index: 1;
  padding: 0.9rem 1rem 1rem;
}

.strem-login-logo {
  display: none;
}

.strem-login-logo::before {
  content: none;
}

.strem-login-logo img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(34, 211, 238, 0.34));
}

.strem-login-note {
  margin: 0 0 0.85rem;
  color: rgba(226, 232, 240, 0.74);
  font-size: 0.78rem;
  line-height: 1.45;
}

body.login-active #login-modal .form-label {
  margin-bottom: 0.34rem;
  color: rgba(241, 245, 249, 0.82);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.login-active #login-modal .form-control {
  min-height: 2.55rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 13px;
  background: rgba(2, 8, 23, 0.68);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 800;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

body.login-active #login-modal .form-control:focus {
  border-color: rgba(45, 212, 191, 0.84);
  background: rgba(3, 13, 24, 0.94);
  box-shadow:
    0 0 0 0.2rem rgba(20, 184, 166, 0.14),
    0 0 30px rgba(34, 211, 238, 0.16);
}

body.login-active #login-modal .input-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

body.login-active #login-modal .input-group .btn {
  border-color: rgba(148, 163, 184, 0.24);
  border-top-right-radius: 13px;
  border-bottom-right-radius: 13px;
  background: rgba(15, 23, 42, 0.75);
  color: #cffafe;
}

body.login-active #login-modal .mb-3 {
  margin-bottom: 0.72rem !important;
}

body.login-active #login-modal #login-btn {
  min-height: 2.75rem;
  margin-top: 0.15rem;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #2dd4bf 0%, #22d3ee 48%, #facc15 130%);
  color: #03111d;
  font-weight: 950;
  letter-spacing: 0.02em;
  box-shadow:
    0 14px 34px rgba(34, 211, 238, 0.18),
    inset 0 1px rgba(255, 255, 255, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

body.login-active #login-modal #login-btn:hover {
  transform: translateY(-2px);
  filter: saturate(1.12);
  box-shadow:
    0 18px 44px rgba(34, 211, 238, 0.26),
    inset 0 1px rgba(255, 255, 255, 0.34);
}

body.login-active #login-modal .alert-danger {
  border: 1px solid rgba(248, 113, 113, 0.32);
  border-radius: 14px;
  background: rgba(127, 29, 29, 0.28);
  color: #fecaca;
}

body.login-active #login-modal .strem-login-logo {
  display: none;
}

body.login-active #login-modal .strem-login-note {
  text-align: left;
}

body.login-active #login-modal .modal-body .strem-login-logo,
body.login-active #login-modal .modal-body .strem-login-logo::before {
  animation: none;
}

/* Legacy login block kept intentionally scoped above; this rule prevents the old large card from returning. */
body.login-active #login-modal .strem-login-body > .strem-login-logo {
  display: none !important;
}

/* Original large-login declarations are overridden below for the compact corner login. */
.strem-login-logo {
  position: relative;
  display: none;
  width: 7.2rem;
  height: 7.2rem;
  margin: 0 auto 1.15rem;
  place-items: center;
  border-radius: 2rem;
  background:
    radial-gradient(circle at 50% 50%, rgba(103, 232, 249, 0.22), transparent 55%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.34));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.08),
    0 0 36px rgba(34, 211, 238, 0.18);
}

.strem-login-logo::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: inherit;
  border: 1px solid rgba(103, 232, 249, 0.2);
  animation: strem-pulse 2.8s ease-in-out infinite;
}

.strem-login-logo img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(34, 211, 238, 0.34));
}

.strem-login-note {
  text-align: left;
}

@keyframes strem-spin {
  to { transform: rotate(360deg); }
}

@keyframes strem-grid-flow {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 72px, 72px 0; }
}

@keyframes strem-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -22px, 0) scale(1.04); }
}

@keyframes strem-scan {
  0%, 100% { opacity: 0; transform: translateX(-18vw) rotate(-18deg); }
  20%, 65% { opacity: 0.85; }
  100% { transform: translateX(84vw) rotate(-18deg); }
}

@keyframes strem-glint {
  0%, 62%, 100% { transform: translateX(-72%); opacity: 0; }
  72% { opacity: 0.75; }
  88% { transform: translateX(72%); opacity: 0; }
}

@keyframes strem-pulse {
  0%, 100% { transform: scale(0.96); opacity: 0.35; }
  50% { transform: scale(1.08); opacity: 0.78; }
}

@media (max-width: 991.98px) {
  .strem-stage {
    left: 1.25rem;
    right: 1.25rem;
    top: 10.5rem;
    width: auto;
    transform: none;
    opacity: 0.95;
  }

  .strem-stage h1 {
    max-width: 29rem;
    font-size: clamp(2.2rem, 13vw, 4.25rem);
  }

  .strem-stage p,
  .strem-roadmap,
  .strem-build-board {
    display: none;
  }

  body.login-active #login-modal .strem-login-dialog {
    top: 0.8rem;
    left: 0.8rem;
    right: 0.8rem;
    width: auto;
    max-width: none;
    margin: 0;
  }
}

@media (max-width: 575.98px) {
  .strem-launch::before {
    width: 90vw;
    height: 90vw;
  }

  .strem-login-note {
    font-size: 0.84rem;
  }

  body.login-active #login-modal .strem-login-header,
  body.login-active #login-modal .strem-login-body {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .strem-launch::before,
  .strem-launch::after,
  .strem-grid,
  .strem-orb,
  .strem-signal,
  body.login-active #login-modal .strem-login-card::before,
  .strem-login-logo::before {
    animation: none !important;
  }
}
