/* =========================================================================
   GLOBAL VARIABLES & TYPOGRAPHY
   ========================================================================= */
:root {
   --neon-pink: #ff2a6d;
   --neon-cyan: #05d9e8;
   --neon-yellow: #ffde03;
   --neon-green: #01ffc3;
   --space-dark: #070314;
   --space-light: rgba(255, 255, 255, 0.05);
}

body {
   font-family: 'Outfit', sans-serif;
   background: radial-gradient(circle at center, #1b0a3a 0%, var(--space-dark) 100%);
   color: white;
   min-height: 100vh;
   overflow-x: hidden;
   background-attachment: fixed;
   padding-top: 70px;
   display: flex;
   flex-direction: column;
   font-size: 0.95rem;
}

/* A11y: Visible Focus */
:focus-visible {
   outline: 2px solid var(--neon-cyan);
   outline-offset: 4px;
   box-shadow: 0 0 15px var(--neon-cyan);
}

/* =========================================================================
   BACKGROUNDS & ANIMATIONS
   ========================================================================= */
.stars {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   pointer-events: none;
   background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600"><circle cx="400" cy="300" r="1" fill="white" opacity="0.5"/><circle cx="100" cy="100" r="1.5" fill="white" opacity="0.8"/><circle cx="700" cy="500" r="1" fill="white" opacity="0.3"/></svg>') repeat;
   z-index: -1;
   animation: twinkle 10s infinite alternate;
}

.ambient-bg {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   pointer-events: none;
   z-index: -1;
   background:
      radial-gradient(circle at 15% 50%, rgba(5, 217, 232, 0.08), transparent 40%),
      radial-gradient(circle at 85% 30%, rgba(255, 42, 109, 0.08), transparent 40%),
      radial-gradient(circle at 50% 80%, rgba(1, 255, 195, 0.05), transparent 40%);
}

@keyframes twinkle {
   0% {
      opacity: 0.5;
   }

   100% {
      opacity: 1;
   }
}

@keyframes spinTimer {
   0% {
      transform: rotate(0deg);
   }

   100% {
      transform: rotate(360deg);
   }
}

@keyframes fadeIn {
   from {
      opacity: 0;
      transform: translateY(10px);
   }

   to {
      opacity: 1;
      transform: translateY(0);
   }
}

@keyframes slideInRight {
   from {
      transform: translateX(120%);
      opacity: 0;
   }

   to {
      transform: translateX(0);
      opacity: 1;
   }
}

/* =========================================================================
   UI COMPONENTS (NAV, FOOTER, CARDS, BUTTONS)
   ========================================================================= */
.navbar-custom {
   background: rgba(7, 3, 20, 0.8);
   backdrop-filter: blur(15px);
   border-bottom: 1px solid rgba(255, 255, 255, 0.1);
   z-index: 1030;
}

.navbar-brand {
   font-weight: 800;
   font-size: 1.5rem;
   background: linear-gradient(45deg, var(--neon-cyan), var(--neon-pink));
   background-clip: text;
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
}

.nav-link {
   color: white !important;
   font-weight: 600;
   text-transform: uppercase;
   font-size: 0.9rem;
   letter-spacing: 1px;
   transition: 0.3s;
   cursor: pointer;
}

.nav-link:hover {
   color: var(--neon-cyan) !important;
   text-shadow: 0 0 10px var(--neon-cyan);
}

.footer-custom {
   background: rgba(0, 0, 0, 0.8);
   border-top: 1px solid rgba(255, 255, 255, 0.1);
   padding: 3rem 0;
   margin-top: auto;
   font-size: 0.9rem;
}

.footer-link {
   color: rgba(255, 255, 255, 0.6);
   text-decoration: none;
   transition: 0.3s;
}

.footer-link:hover {
   color: var(--neon-cyan);
}

.glass-card {
   background: var(--space-light);
   backdrop-filter: blur(12px);
   -webkit-backdrop-filter: blur(12px);
   border: 1px solid rgba(255, 255, 255, 0.1);
   border-radius: 15px;
   padding: 1.25rem;
   box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
   width: 100%;
}

.logo-title {
   font-size: clamp(2.5rem, 8vw, 4.5rem);
   font-weight: 800;
   background: linear-gradient(45deg, var(--neon-cyan), var(--neon-pink));
   background-clip: text;
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   text-shadow: 0 0 30px rgba(5, 217, 232, 0.3);
   margin-bottom: 2rem;
   line-height: 1.1;
}

.neon-btn {
   border: none;
   border-radius: 50px;
   padding: 10px 16px;
   font-size: 1rem;
   font-weight: 600;
   color: white;
   background: rgba(255, 255, 255, 0.1);
   border: 1px solid rgba(255, 255, 255, 0.2);
   transition: all 0.3s ease;
   cursor: pointer;
   text-transform: uppercase;
   letter-spacing: 1px;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
   width: 100%;
}

.neon-btn:hover:not(:disabled) {
   transform: translateY(-3px);
}

.neon-btn:disabled {
   opacity: 0.5;
   cursor: not-allowed;
}

.neon-cyan {
   border-color: var(--neon-cyan);
}

.neon-cyan:hover:not(:disabled) {
   background: var(--neon-cyan);
   color: var(--space-dark);
   box-shadow: 0 0 15px rgba(5, 217, 232, 0.4);
}

.neon-pink {
   border-color: var(--neon-pink);
}

.neon-pink:hover:not(:disabled) {
   background: var(--neon-pink);
   color: white;
   box-shadow: 0 0 15px rgba(255, 42, 109, 0.4);
}

.neon-yellow {
   border-color: var(--neon-yellow);
}

.neon-yellow:hover:not(:disabled) {
   background: var(--neon-yellow);
   color: var(--space-dark);
   box-shadow: 0 0 15px rgba(255, 222, 3, 0.4);
}

.neon-green {
   border-color: var(--neon-green);
}

.neon-green:hover:not(:disabled) {
   background: var(--neon-green);
   color: var(--space-dark);
   box-shadow: 0 0 15px rgba(1, 255, 195, 0.4);
}

.neon-success-anim {
   background: var(--neon-green) !important;
   color: var(--space-dark) !important;
   border-color: var(--neon-green) !important;
   box-shadow: 0 0 20px rgba(1, 255, 195, 0.6) !important;
   transform: scale(0.98);
}

/* =========================================================================
   FORM ELEMENTS
   ========================================================================= */
.pin-input {
   font-size: 1.2rem;
   text-align: center;
   font-weight: 800;
   letter-spacing: 3px;
   background: rgba(0, 0, 0, 0.4);
   border: 2px solid rgba(255, 255, 255, 0.2);
   color: white;
   border-radius: 12px;
   padding: 12px;
   width: 100%;
   transition: 0.3s;
}

#game-pin {
   text-transform: uppercase;
}

.pin-input::placeholder {
   color: rgba(255, 255, 255, 0.3);
   font-size: 1rem;
}

.pin-input:focus {
   background: rgba(0, 0, 0, 0.6);
   border-color: var(--neon-cyan);
   color: white;
   outline: none;
   box-shadow: 0 0 20px rgba(5, 217, 232, 0.4);
}

.form-control,
.input-group-text {
   padding: 12px 15px;
   border-radius: 10px;
}

.form-control:focus {
   background: rgba(0, 0, 0, 0.6);
   border-color: var(--neon-cyan);
   color: white;
   box-shadow: 0 0 10px rgba(5, 217, 232, 0.2);
}

textarea.form-control {
   resize: none;
   overflow: hidden;
   min-height: 60px;
}

/* =========================================================================
   LAYOUTS & VIEWS
   ========================================================================= */
.view-container {
   display: none;
   flex: 1;
   padding: 1rem;
   animation: fadeIn 0.4s ease forwards;
}

.view-container.active {
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: flex-start;
}

.waiting-overlay {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: rgba(0, 0, 0, 0.9);
   backdrop-filter: blur(10px);
   z-index: 1000;
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   opacity: 0;
   pointer-events: none;
   transition: 0.3s;
   padding: 20px;
}

.waiting-overlay.active {
   opacity: 1;
   pointer-events: all;
}

/* Dashboard Layout */
.top-nav {
   display: flex;
   justify-content: space-between;
   align-items: center;
   width: 100%;
   max-width: 1200px;
   margin-bottom: 10px;
   padding: 12px 15px;
   background: rgba(0, 0, 0, 0.4);
   border-radius: 12px;
   border: 1px solid rgba(255, 255, 255, 0.1);
   flex-wrap: wrap;
   gap: 10px;
}

.editor-layout {
   display: flex;
   flex-direction: column;
   width: 100%;
   max-width: 1000px;
   gap: 15px;
   flex: 1;
   min-height: 0;
}

#view-editor.active {
   height: calc(100vh - 70px);
   overflow: hidden;
   padding-bottom: 0;
}

.editor-sidebar {
   width: 100%;
   background: rgba(0, 0, 0, 0.4);
   border-radius: 15px;
   border: 1px solid rgba(255, 255, 255, 0.1);
   display: flex;
   flex-direction: column;
   overflow: hidden;
   max-height: 300px;
   min-height: 0;
}

.editor-main {
   flex: 1;
   background: rgba(0, 0, 0, 0.4);
   border-radius: 12px;
   border: 1px solid rgba(255, 255, 255, 0.1);
   padding: 20px;
   overflow-y: auto;
   min-height: 0;
}

#slide-editor-form,
#module-picker {
   max-width: 800px;
   margin: 0 auto;
   width: 100%;
}

/* Live Layout */
.live-host-layout {
   width: 100%;
   max-width: 1200px;
   display: flex;
   flex-direction: column;
   height: 100%;
   flex: 1;
}

.live-header {
   display: flex;
   flex-wrap: wrap;
   justify-content: space-between;
   align-items: center;
   background: rgba(0, 0, 0, 0.6);
   border: 1px solid var(--neon-cyan);
   padding: 15px;
   border-radius: 15px;
   margin-bottom: 15px;
   gap: 10px;
}

.live-content {
   display: flex;
   flex-direction: column;
   gap: 15px;
   flex: 1;
   min-height: 0;
}

.live-main-screen {
   flex: 1;
   background: rgba(0, 0, 0, 0.4);
   border: 1px solid rgba(255, 255, 255, 0.1);
   border-radius: 15px;
   display: flex;
   flex-direction: column;
   padding: 20px;
   overflow-y: auto;
   min-height: 400px;
   position: relative;
}

.live-sidebar {
   background: rgba(0, 0, 0, 0.4);
   border: 1px solid rgba(255, 255, 255, 0.1);
   border-radius: 15px;
   padding: 15px;
   display: flex;
   flex-direction: column;
   height: 250px;
}

.live-controls {
   display: flex;
   flex-wrap: wrap;
   justify-content: space-between;
   align-items: center;
   padding: 20px 0 0 0;
   gap: 10px;
   margin-top: auto;
}

.student-layout {
   width: 100%;
   max-width: 1200px;
   display: flex;
   flex-direction: column;
   justify-content: center;
   min-height: 60vh;
}

@media (min-width: 768px) {
   .view-container {
      padding: 2rem;
   }

   .editor-layout {
      flex-direction: row;
   }

   #view-editor .editor-layout {
      height: auto;
      flex: 1;
      min-height: 0;
   }

   .editor-sidebar {
      width: 320px;
      max-height: 100%;
      height: 100%;
   }

   .live-content {
      flex-direction: row !important;
   }

   .live-main-screen {
      flex: 3 !important;
   }

   .live-sidebar {
      flex: 1 !important;
      height: auto !important;
   }
}

/* =========================================================================
   INTERACTIVE ELEMENTS (SLIDES, CARDS)
   ========================================================================= */
.slide-list {
   flex: 1;
   overflow-y: auto;
   padding: 10px;
   display: flex;
   flex-direction: column;
   gap: 8px;
}

.slide-item {
   background: rgba(255, 255, 255, 0.05);
   border: 1px solid rgba(255, 255, 255, 0.1);
   border-radius: 8px;
   padding: 8px 12px;
   cursor: pointer;
   transition: 0.2s;
   display: flex;
   justify-content: space-between;
   align-items: center;
}

.slide-item:hover {
   background: rgba(255, 255, 255, 0.1);
}

.slide-item.active {
   border-color: var(--neon-cyan);
   background: rgba(5, 217, 232, 0.1);
}

.module-picker {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
   gap: 12px;
}

.module-card {
   background: rgba(0, 0, 0, 0.5);
   border: 1px solid rgba(255, 255, 255, 0.2);
   border-radius: 12px;
   padding: 15px 10px;
   text-align: center;
   cursor: pointer;
   transition: 0.2s;
   font-size: 0.9rem;
}

.module-card:hover {
   border-color: var(--neon-cyan);
   transform: translateY(-3px);
   background: rgba(5, 217, 232, 0.1);
}

.module-card i {
   font-size: 2rem;
   margin-bottom: 10px;
   display: block;
}

.interactive-btn {
   background: rgba(0, 0, 0, 0.5);
   border: 2px solid var(--neon-cyan);
   color: white;
   border-radius: 15px;
   padding: 15px;
   font-size: 1.1rem;
   width: 100%;
   transition: 0.2s;
   margin-bottom: 10px;
   cursor: pointer;
}

.interactive-btn:hover {
   background: var(--neon-cyan);
   color: var(--space-dark);
}

.interactive-btn:disabled {
   opacity: 0.5;
   cursor: not-allowed;
   border-color: gray;
}

.interactive-btn.correct {
   background: var(--neon-green);
   color: var(--space-dark);
   border-color: var(--neon-green);
   transform: scale(1.02);
}

.interactive-btn.wrong {
   opacity: 0.4;
   border-color: gray;
}

.quiz-orb-btn {
   min-height: 100px;
   border-radius: 20px;
   font-size: 1.3rem;
   display: flex;
   align-items: center;
   justify-content: center;
   border: 2px solid;
   background: rgba(0, 0, 0, 0.5);
   color: white;
   transition: 0.2s;
   cursor: pointer;
   padding: 15px;
   font-weight: bold;
   width: 100%;
}

.quiz-orb-btn:hover {
   transform: scale(1.02);
   background: rgba(255, 255, 255, 0.1);
}

.tf-orb-btn {
   min-height: 200px;
   border-radius: 30px;
   font-size: 2rem;
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   border: 3px solid;
   background: rgba(0, 0, 0, 0.5);
   color: white;
   transition: 0.2s;
   cursor: pointer;
   font-weight: bold;
   width: 100%;
}

.tf-orb-btn:hover {
   transform: scale(1.03);
   background: rgba(255, 255, 255, 0.1);
}

/* =========================================================================
   DATA VIZ & CHARTS
   ========================================================================= */
.stat-circle {
   width: 150px;
   height: 150px;
   border-radius: 50%;
   border: 8px solid var(--neon-cyan);
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 3rem;
   font-weight: bold;
   margin: 0 auto;
   box-shadow: 0 0 20px rgba(5, 217, 232, 0.4);
}

.pie-chart {
   width: 180px;
   height: 180px;
   border-radius: 50%;
   border: 3px solid rgba(255, 255, 255, 0.1);
   margin: 0 auto;
   box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
   transition: background 0.5s ease;
}

.legend-dot {
   display: inline-block;
   width: 12px;
   height: 12px;
   border-radius: 50%;
   margin-right: 5px;
}

.v-chart-container {
   display: flex;
   justify-content: space-around;
   height: 280px;
   width: 100%;
   background: rgba(0, 0, 0, 0.2);
   border-radius: 15px;
   padding: 30px 15px 10px 15px;
   border-bottom: 2px solid rgba(255, 255, 255, 0.2);
   border-left: 2px solid rgba(255, 255, 255, 0.2);
   margin-top: 20px;
}

.v-chart-bar-wrapper {
   display: flex;
   flex-direction: column;
   align-items: center;
   flex: 1;
   margin: 0 8px;
   height: 100%;
   position: relative;
}

.v-chart-bar-area {
   flex: 1;
   width: 100%;
   display: flex;
   flex-direction: column;
   justify-content: flex-end;
   align-items: center;
   position: relative;
   border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.v-chart-bar {
   width: 100%;
   max-width: 50px;
   border-radius: 8px 8px 0 0;
   transition: height 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
   position: relative;
   min-height: 4px;
   box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.v-chart-value {
   position: absolute;
   top: -25px;
   left: 50%;
   transform: translateX(-50%);
   font-weight: 800;
   font-size: 0.95rem;
   color: white;
   text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.v-chart-label {
   margin-top: 12px;
   text-align: center;
   font-size: 0.75rem;
   line-height: 1.2;
   height: 3rem;
   overflow: hidden;
   display: -webkit-box;
   line-clamp: 2;
   -webkit-line-clamp: 2;
   -webkit-box-orient: vertical;
   color: rgba(255, 255, 255, 0.8);
   text-transform: uppercase;
   font-weight: 600;
}

.matrix-wrapper {
   padding: 30px 40px;
   width: 100%;
   display: flex;
   justify-content: center;
}

.matrix-bg {
   background: rgba(255, 255, 255, 0.05);
   position: relative;
   width: 100%;
   max-width: 400px;
   aspect-ratio: 1;
   border: 2px solid rgba(255, 255, 255, 0.3);
   margin: 0 auto;
   border-radius: 10px;
   cursor: crosshair;
}

.matrix-axis-x {
   position: absolute;
   bottom: -30px;
   left: 50%;
   transform: translateX(-50%);
   width: 100%;
   text-align: center;
   font-weight: bold;
   color: var(--neon-cyan);
}

.matrix-axis-y {
   position: absolute;
   left: -60px;
   top: 50%;
   transform: translateY(-50%) rotate(-90deg);
   transform-origin: center;
   font-weight: bold;
   color: var(--neon-pink);
   white-space: nowrap;
}

.matrix-cross {
   position: absolute;
   top: 50%;
   left: 0;
   width: 100%;
   height: 1px;
   background: rgba(255, 255, 255, 0.2);
}

.matrix-cross-v {
   position: absolute;
   top: 0;
   left: 50%;
   width: 1px;
   height: 100%;
   background: rgba(255, 255, 255, 0.2);
}

.matrix-dot {
   position: absolute;
   width: 15px;
   height: 15px;
   background: var(--neon-yellow);
   border-radius: 50%;
   transform: translate(-50%, -50%);
   box-shadow: 0 0 10px var(--neon-yellow);
   pointer-events: none;
}

.cloud-word {
   transition: all 0.5s ease;
   padding: 5px;
   display: inline-block;
   text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* =========================================================================
   SPECIFIC DYNAMICS (LIKERT, MATCH, UNSCRAMBLE)
   ========================================================================= */
.likert-btn {
   flex: 1;
   background: rgba(0, 0, 0, 0.5);
   border: 2px solid rgba(255, 255, 255, 0.3);
   color: white;
   padding: 15px;
   font-weight: bold;
   font-size: 1.2rem;
   transition: 0.2s;
}

.likert-btn:hover {
   background: rgba(255, 255, 255, 0.2);
}

.likert-btn:disabled {
   opacity: 0.5;
   cursor: not-allowed;
}

.likert-1 {
   border-color: var(--neon-pink);
}

.likert-2 {
   border-color: #ff8c42;
}

.likert-3 {
   border-color: var(--neon-yellow);
}

.likert-4 {
   border-color: #a2d729;
}

.likert-5 {
   border-color: var(--neon-green);
}

.match-btn {
   background: rgba(0, 0, 0, 0.8);
   border: 2px solid rgba(255, 255, 255, 0.4);
   border-radius: 10px;
   padding: 15px;
   width: 100%;
   margin-bottom: 10px;
   transition: 0.2s;
   color: white;
   font-weight: 600;
   text-shadow: 1px 1px 2px black;
}

.match-btn.selected {
   border-color: var(--neon-yellow);
   background: var(--neon-yellow);
   color: black;
   text-shadow: none;
   box-shadow: 0 0 15px rgba(255, 222, 3, 0.6);
}

.match-btn.matched {
   border-color: var(--neon-green);
   background: rgba(1, 255, 195, 0.15);
   color: rgba(255, 255, 255, 0.4);
   opacity: 0.6;
   pointer-events: none;
   text-shadow: none;
}

.unscramble-box {
   min-height: 80px;
   border: 2px dashed rgba(255, 255, 255, 0.2);
   border-radius: 10px;
   padding: 10px;
   display: flex;
   flex-wrap: wrap;
   gap: 8px;
   background: rgba(0, 0, 0, 0.2);
   margin-bottom: 15px;
   align-items: center;
   justify-content: center;
}

.unscramble-word {
   background: rgba(255, 255, 255, 0.1);
   border: 1px solid var(--neon-cyan);
   padding: 8px 15px;
   border-radius: 20px;
   cursor: pointer;
   user-select: none;
   transition: 0.1s;
}

.unscramble-word:hover {
   background: var(--neon-cyan);
   color: black;
}

.sequence-row {
   display: flex;
   align-items: center;
   gap: 10px;
   margin-bottom: 8px;
   background: rgba(255, 255, 255, 0.05);
   padding: 10px;
   border-radius: 8px;
   border: 1px solid rgba(255, 255, 255, 0.1);
}

/* =========================================================================
   WYSIWYG EDITOR
   ========================================================================= */
.wysiwyg-toolbar {
   background: rgba(0, 0, 0, 0.6);
   border: 1px solid rgba(255, 255, 255, 0.2);
   border-bottom: none;
   border-radius: 10px 10px 0 0;
   padding: 8px;
   display: flex;
   gap: 5px;
   flex-wrap: wrap;
}

.wysiwyg-btn {
   background: rgba(255, 255, 255, 0.1);
   border: 1px solid transparent;
   color: white;
   padding: 6px 12px;
   border-radius: 6px;
   cursor: pointer;
   transition: 0.2s;
   font-size: 1rem;
}

.wysiwyg-btn:hover {
   background: var(--neon-cyan);
   color: var(--space-dark);
   border-color: var(--neon-cyan);
}

.wysiwyg-editor {
   background: rgba(0, 0, 0, 0.4);
   border: 1px solid rgba(255, 255, 255, 0.2);
   border-radius: 0 0 10px 10px;
   min-height: 200px;
   padding: 15px;
   color: white;
   outline: none;
   overflow-y: auto;
   max-height: 500px;
   transition: 0.3s;
}

.wysiwyg-editor:focus {
   border-color: var(--neon-cyan);
   box-shadow: 0 0 10px rgba(5, 217, 232, 0.2);
}

.wysiwyg-editor img,
.content-render-area img {
   max-width: 100%;
   height: auto;
   border-radius: 8px;
   margin: 10px 0;
   box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.wysiwyg-editor iframe,
.content-render-area iframe {
   width: 100%;
   aspect-ratio: 16/9;
   border-radius: 8px;
   margin: 10px 0;
   border: none;
   box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* =========================================================================
   ALERTS, MODALS & TOASTS
   ========================================================================= */
.player-badge {
   background: rgba(255, 255, 255, 0.1);
   padding: 5px 12px;
   border-radius: 20px;
   margin: 4px;
   display: inline-block;
   font-size: 0.85rem;
   border: 1px solid rgba(255, 255, 255, 0.2);
}

.player-badge.answered {
   border-color: var(--neon-green);
   color: var(--neon-green);
}

.modal-glass {
   background: rgba(7, 3, 20, 0.85);
   backdrop-filter: blur(20px);
   border: 1px solid rgba(5, 217, 232, 0.3);
   border-radius: 20px;
   box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

#toast-container {
   position: fixed;
   top: 90px;
   right: 20px;
   z-index: 1050;
   display: flex;
   flex-direction: column;
   gap: 10px;
}

.toast-custom {
   background: rgba(0, 0, 0, 0.85);
   backdrop-filter: blur(10px);
   border-left: 5px solid;
   color: white;
   padding: 15px 20px;
   border-radius: 10px;
   box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
   display: flex;
   align-items: center;
   gap: 12px;
   min-width: 250px;
   max-width: 350px;
   animation: slideInRight 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast-custom.success {
   border-left-color: var(--neon-green);
}

.toast-custom.error {
   border-left-color: var(--neon-pink);
}

.toast-custom.warning {
   border-left-color: var(--neon-yellow);
}

.toast-custom.info {
   border-left-color: var(--neon-cyan);
}

.toast-custom i {
   font-size: 1.5rem;
}

.toast-custom.success i {
   color: var(--neon-green);
}

.toast-custom.error i {
   color: var(--neon-pink);
}

.toast-custom.warning i {
   color: var(--neon-yellow);
}

.toast-custom.info i {
   color: var(--neon-cyan);
}

.history-card {
   background: rgba(0, 0, 0, 0.4);
   border: 1px solid rgba(255, 255, 255, 0.1);
   border-radius: 12px;
   padding: 15px;
   transition: 0.2s;
}

.history-card:hover {
   border-color: var(--neon-cyan);
   background: rgba(5, 217, 232, 0.1);
}

/* =========================================================================
   SPECIFIC PAGE STYLES
   ========================================================================= */
.hero-section {
   min-height: 60vh;
   display: flex;
   align-items: center;
}

.feature-card {
   transition: 0.3s;
   border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-card:hover {
   transform: translateY(-5px);
}

.architecture-box {
   border-left: 3px solid var(--neon-cyan);
   padding-left: 15px;
   margin-bottom: 15px;
}

/* Features Page - Dynamic Catalog */
.feature-row {
   margin-bottom: 12rem;
   padding: 4rem 0;
   border-bottom: 1px solid rgba(255, 255, 255, 0.05);
   opacity: 0;
   transform: translateY(40px);
   transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.feature-row.visible {
   opacity: 1;
   transform: translateY(0);
}

.feature-row:last-of-type {
   border-bottom: none;
   margin-bottom: 4rem;
}

.dynamic-title {
   font-size: clamp(1.8rem, 4vw, 2.8rem);
   font-weight: 800;
   margin-bottom: 2rem;
   display: flex;
   align-items: center;
   gap: 20px;
   letter-spacing: -1px;
   line-height: 1.1;
   text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.dynamic-title i {
   font-size: 0.9em;
   filter: drop-shadow(0 0 15px currentColor);
   opacity: 0.9;
}

.catalog-header {
   margin-top: 10rem;
   margin-bottom: 8rem;
   position: relative;
}

.catalog-header::after {
   content: '';
   position: absolute;
   bottom: -20px;
   left: 50%;
   transform: translateX(-50%);
   width: 60px;
   height: 4px;
   background: var(--neon-cyan);
   border-radius: 2px;
   box-shadow: 0 0 15px var(--neon-cyan);
}

.feature-desc {
   font-size: 1.25rem;
   line-height: 1.8;
   color: rgba(255, 255, 255, 0.75);
   max-width: 550px;
}

.feature-desc p {
   margin-bottom: 1.5rem;
}

.preview-container {
   background: rgba(0, 0, 0, 0.5);
   border: 2px solid rgba(255, 255, 255, 0.1);
   border-radius: 30px;
   padding: 3rem 2rem;
   min-height: 350px;
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   position: relative;
   overflow: hidden;
   box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
   transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-row:hover .preview-container {
   transform: scale(1.02);
   border-color: rgba(255, 255, 255, 0.2);
   box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.6);
}

.sim-overlay {
   position: absolute;
   top: 15px;
   right: 15px;
   padding: 5px 15px;
   border: 1px solid rgba(255, 255, 255, 0.3);
   border-radius: 50px;
   font-size: 0.7rem;
   text-transform: uppercase;
   font-weight: 800;
   display: flex;
   align-items: center;
   gap: 8px;
   background: rgba(0, 0, 0, 0.4);
   backdrop-filter: blur(5px);
   z-index: 10;
}

.sim-dot {
   width: 8px;
   height: 8px;
   border-radius: 50%;
   animation: pulseSim 2s infinite;
}

@keyframes pulseSim {
   0% {
      transform: scale(1);
      opacity: 1;
   }

   50% {
      transform: scale(1.3);
      opacity: 0.5;
   }

   100% {
      transform: scale(1);
      opacity: 1;
   }
}

/* Pricing Table */
.price-badge {
   display: inline-block;
   padding: 5px 15px;
   border-radius: 50px;
   font-weight: bold;
   text-transform: uppercase;
   font-size: 0.8rem;
   margin-bottom: 1rem;
   border: 1px solid;
}

.tier-price {
   font-size: 3rem;
   font-weight: 800;
   margin: 0.5rem 0 1rem 0;
   line-height: 1;
}

.tier-price span {
   font-size: 1rem;
   font-weight: 400;
   color: rgba(255, 255, 255, 0.5);
}

.tier-desc {
   font-size: 0.9rem;
   color: rgba(255, 255, 255, 0.7);
   line-height: 1.4;
   margin-bottom: 1.5rem;
   flex-grow: 0;
   min-height: 80px;
}

.feature-list {
   list-style: none;
   padding-left: 0;
   margin-bottom: 2rem;
   flex-grow: 1;
   border-top: 1px solid rgba(255, 255, 255, 0.1);
   padding-top: 1.5rem;
}

.feature-list li {
   margin-bottom: 15px;
   font-size: 0.95rem;
   color: rgba(255, 255, 255, 0.9);
   display: flex;
   align-items: center;
   gap: 10px;
}

.feature-list li i {
   font-size: 1.2rem;
}

.comparison-table {
   width: 100%;
   border-collapse: separate;
   border-spacing: 0;
   background: rgba(0, 0, 0, 0.4);
   border-radius: 15px;
   border: 1px solid rgba(255, 255, 255, 0.1);
   overflow: hidden;
}

.comparison-table th,
.comparison-table td {
   padding: 1.5rem;
   text-align: center;
   border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comparison-table th {
   font-size: 1.1rem;
   font-weight: 800;
   text-transform: uppercase;
}

.comparison-table td:first-child,
.comparison-table th:first-child {
   text-align: left;
   border-right: 1px solid rgba(255, 255, 255, 0.05);
   width: 35%;
}

.comparison-table tr:last-child td {
   border-bottom: none;
}

.comp-ours {
   background: rgba(1, 255, 195, 0.05);
}

.comp-theirs {
   background: rgba(255, 42, 109, 0.05);
}

.comp-desc {
   font-size: 0.9rem;
   color: rgba(255, 255, 255, 0.6);
   margin-top: 5px;
   display: block;
}

.info-banner {
   background: rgba(5, 217, 232, 0.1);
   border: 1px solid var(--neon-cyan);
   border-radius: 15px;
   padding: 1.5rem;
   display: flex;
   align-items: center;
   gap: 20px;
   margin-top: 3rem;
}

.info-banner i {
   font-size: 2.5rem;
   color: var(--neon-cyan);
}

/* Custom Billing Loader Overlay */
#evasphere-billing-loader {
   position: fixed;
   top: 0;
   left: 0;
   width: 100vw;
   height: 100vh;
   background: rgba(8, 8, 12, 0.7);
   backdrop-filter: blur(10px);
   -webkit-backdrop-filter: blur(10px);
   display: flex;
   align-items: center;
   justify-content: center;
   z-index: 1080;
   /* Bootstrap modals are 1055, we want to overlay the modal */
   opacity: 0;
   transition: opacity 0.3s ease;
   pointer-events: none;
}

#evasphere-billing-loader.active {
   opacity: 1;
   pointer-events: all;
}

.billing-loader-card {
   background: rgba(16, 16, 24, 0.85);
   border: 1px solid rgba(255, 255, 255, 0.08);
   border-radius: 20px;
   max-width: 400px;
   width: 90%;
   box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);
   transform: translateY(20px);
   transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#evasphere-billing-loader.active .billing-loader-card {
   transform: translateY(0);
}

.billing-loader-spinner-wrapper {
   position: relative;
   width: 80px;
   height: 80px;
   margin: 0 auto;
   display: flex;
   align-items: center;
   justify-content: center;
}

.billing-loader-spinner {
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   border-radius: 50%;
   border: 3px solid rgba(255, 255, 255, 0.05);
   border-top-color: transparent !important;
   animation: spinLoader 1s infinite linear;
}

.border-cyan {
   border-top-color: var(--neon-cyan) !important;
   box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

.border-yellow {
   border-top-color: var(--neon-yellow) !important;
   box-shadow: 0 0 15px rgba(255, 179, 0, 0.2);
}

.border-pink {
   border-top-color: var(--neon-pink) !important;
   box-shadow: 0 0 15px rgba(243, 85, 136, 0.2);
}

.neon-cyan-text {
   color: var(--neon-cyan);
   text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

.neon-yellow-text {
   color: var(--neon-yellow);
   text-shadow: 0 0 10px rgba(255, 179, 0, 0.5);
}

.neon-pink-text {
   color: var(--neon-pink);
   text-shadow: 0 0 10px rgba(243, 85, 136, 0.5);
}

@keyframes spinLoader {
   to {
      transform: rotate(360deg);
   }
}

/* =========================================================================
   LIVE HOST & VIEWPORT HEIGHT FIXES
   ========================================================================= */
body.live-mode {
   height: 100vh !important;
   max-height: 100vh !important;
   overflow: hidden !important;
   padding-top: 0 !important;
}

body.live-mode #view-host-live {
   height: 100vh !important;
   max-height: 100vh !important;
   padding: 15px !important;
   box-sizing: border-box !important;
   overflow: hidden !important;
   display: flex !important;
   flex-direction: column !important;
   justify-content: flex-start !important;
   align-items: center !important;
}

body.live-mode .live-host-layout {
   height: 100% !important;
   max-height: 100% !important;
   display: flex !important;
   flex-direction: column !important;
   overflow: hidden !important;
   width: 100% !important;
}

body.live-mode .live-content {
   flex: 1 !important;
   min-height: 0 !important;
   overflow: hidden !important;
   display: flex !important;
   flex-direction: column !important;
}

body.live-mode .live-main-screen {
   min-height: 0 !important;
   flex: 1 !important;
   overflow-y: auto !important;
   display: flex !important;
   flex-direction: column !important;
}

body.live-mode .live-sidebar {
   transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.live-mode .live-host-layout.sidebar-hidden .live-sidebar {
   flex: 0 !important;
   min-width: 0 !important;
   width: 0 !important;
   padding: 0 !important;
   margin: 0 !important;
   opacity: 0 !important;
   overflow: hidden !important;
}

/* Responsive Matrix styling inside live mode to fit viewport */
body.live-mode .matrix-wrapper {
   padding: 10px !important;
   flex: 1 !important;
   display: flex !important;
   align-items: center !important;
   justify-content: center !important;
   min-height: 0 !important;
}

body.live-mode .matrix-bg {
   max-height: 40vh !important;
   max-width: 40vh !important;
   width: 100% !important;
   height: 100% !important;
   aspect-ratio: 1 / 1 !important;
}

@media (min-width: 768px) {
   body.live-mode .live-content {
      flex-direction: row !important;
   }

   body.live-mode .live-main-screen {
      flex: 3 !important;
   }

   body.live-mode .live-sidebar {
      flex: 1 !important;
      height: auto !important;
      max-height: 100% !important;
      display: flex !important;
      flex-direction: column !important;
   }
}