/* static/css/styles.css */

/* ============================================================
   1. BULLETPROOF APPLE FONT LOGIC (Your Solution)
   ============================================================ */
:root {
  /* Inter first ensures Apple look on Windows */
  --app-font: 'Inter', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* WebNotify Theme Variables */
  --mn-primary: #007aff;
  --mn-primary-hover: #0051a8;
  --mn-bg: #f5f5f7;
  --mn-text-main: #1d1d1f;
  --mn-text-muted: #86868b;
  --mn-border: #d2d2d7;

  /* Bootstrap Overrides */
  --bs-primary: var(--mn-primary);
  --bs-body-bg: var(--mn-bg);
  --bs-body-color: var(--mn-text-main);
  --bs-link-color: var(--mn-primary);
}

[data-bs-theme="dark"] {
  --mn-primary: #3b82f6;
  --mn-primary-hover: #2563eb;
  --mn-bg: #0d1117;
  --mn-text-main: #e6edf3;
  --mn-text-muted: #8b949e;
  --mn-border: #30363d;
}

html,
body {
  height: 100%;
}

/* Apply font globally to .app-root but EXCLUDE icons */
.app-root,
.app-root :where(p, a, small, strong, em, mark,
  h1, h2, h3, h4, h5, h6,
  label, input, select, textarea, button,
  ul, ol, li, dl, dt, dd,
  table, thead, tbody, tfoot, tr, th, td,
  blockquote, figcaption, caption,
  div, section, article, aside, nav, header, footer):not(.fa):not(.fas):not(.far):not(.fab) :not(.fa-solid):not(.fa-regular):not(.fa-brands) :not([class^="fa-"]):not([class*=" fa-"]) :not(.bi):not([class^="bi-"]):not([class*=" bi-"]) {
  font-family: var(--app-font) !important;
}

/* Restore Weights (Your snippet had 400 !important, but we want Bold to work) */
.fw-bold {
  font-weight: 700 !important;
}

.fw-semibold {
  font-weight: 600 !important;
}

.fw-medium {
  font-weight: 500 !important;
}

/* === Icon Protection === */
.bi,
[class^="bi-"],
[class*=" bi-"] {
  font-family: "bootstrap-icons" !important;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: 1 !important;
}

[class^="bi-"]::before,
[class*=" bi-"]::before {
  font-family: "bootstrap-icons" !important;
}

/* ============================================================
   2. WEBNOTIFY COMPONENT STYLES
   ============================================================ */

/* Navbar */
.navbar {
  background-color: #ffffff !important;
  border-bottom: 1px solid var(--mn-border);
}

[data-bs-theme="dark"] .navbar {
  background-color: #0d1117 !important;
  border-bottom: 1px solid var(--mn-border);
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--mn-text-main) !important;
}

.nav-link {
  font-weight: 500;
}


/* Cards */
.card {
  background: var(--bs-body-bg);
  border: 1px solid var(--mn-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  border-radius: 4px;
}

.card-header-clean {
  background: transparent;
  border-bottom: 1px solid var(--mn-border);
  padding: 1.25rem 1.5rem;
}

/* Buttons */
.btn {
  font-weight: 500;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.btn-primary {
  background-color: var(--mn-primary);
  border: none;
}

/* Inputs */
.form-control,
.input-group-text,
.form-select {
  border-radius: 4px;
  transition: all 0.2s ease-in-out;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--mn-primary);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
  transform: translateY(-1px);
}

/* Split Screen Layout (New) */
.split-screen-bg {
  background-color: var(--mn-primary);
  background-image: linear-gradient(135deg, var(--mn-primary) 0%, var(--mn-primary-hover) 100%);
  position: relative;
  overflow: hidden;
}

.split-screen-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 150%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% -50%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

/* Focus Mode */
.alert-viewport {
  background: transparent;
  border-radius: 24px;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: white;
}

.alert-viewport .inner {
  z-index: 2;
  text-align: center;
  padding: 2rem;
}

.alert-viewport .icon {
  font-size: 4.5rem;
  margin-bottom: 1rem;
}

.alert-viewport.active {
  animation: alertPulse 2s ease-in-out infinite;
}

/* Smooth Pulse Animation */
@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

@keyframes alertPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
  }

  50% {
    box-shadow: 0 0 0 15px rgba(102, 126, 234, 0);
  }
}

.footer {
  background-color: #ffffff;
  border-top: 1px solid var(--mn-border);
}

[data-bs-theme="dark"] .footer {
  background-color: #0d1117;
}

#toastContainer {
  z-index: 2050;
}

/* Dark Mode List Groups */
.list-group-item {
  background-color: transparent;
  color: var(--mn-text-main);
  border-color: var(--mn-border);
}

/* Adaptive URL Badge */
.url-badge {
  background: rgba(0, 0, 0, 0.05);
  color: var(--mn-text-muted);
}

[data-bs-theme="dark"] .url-badge {
  background: rgba(255, 255, 255, 0.1);
  color: var(--mn-text-main);
}

/* Easter Egg: Spin Animation */
@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

.spin-1 {
  animation: spin 1s ease-in-out;
  display: inline-block;
}

/* ============================================================
   3. MOBILE RESPONSIVENESS (Max-Width 768px)
   ============================================================ */
@media (max-width: 768px) {

  /* Global Adjustments */
  h1,
  .h1 {
    font-size: 1.75rem !important;
  }

  h2,
  .h2 {
    font-size: 1.5rem !important;
  }

  h3,
  .h3 {
    font-size: 1.25rem !important;
  }

  .lead {
    font-size: 1rem !important;
  }

  /* Navbar */
  .navbar-brand {
    font-size: 1.2rem;
  }

  /* Container Padding */
  .container,
  .container-fluid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Dashboard Header */
  .row.align-items-center.mb-4.mt-1.gy-3 {
    text-align: center;
  }

  .col-md-6.d-flex.justify-content-md-end {
    justify-content: center !important;
    margin-top: 1rem;
  }

  /* Monitor Card */
  .alert-viewport {
    min-height: 350px !important;
  }

  .alert-viewport .inner {
    padding: 1.5rem !important;
  }

  #alertIcon {
    font-size: 3.5rem !important;
  }

  /* Button Stacking */
  .d-flex.flex-column.flex-sm-row.justify-content-center.gap-3 {
    flex-direction: column !important;
    width: 100%;
  }

  .d-flex.flex-column.flex-sm-row.justify-content-center.gap-3 .btn {
    width: 100%;
  }

  /* Settings Page */
  .card-body.p-5 {
    padding: 1.5rem !important;
  }

  /* User Guide */
  .ratio-16x9 {
    border-radius: 8px !important;
  }

  /* Login/Register Split Screen */
  /* Stack them: content first, then image or hidden image */
  .row.g-0 {
    flex-direction: column-reverse;
    /* Put form on top if needed, or normal */
  }

  .col-lg-6.d-none.d-lg-block {
    display: none !important;
    /* Hide the big image side on mobile to save space */
  }

  .col-lg-6 {
    width: 100%;
  }

  /* Reduce excessive margins */
  .mb-5 {
    margin-bottom: 1.5rem !important;
  }

  .py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  .p-5 {
    padding: 1.5rem !important;
  }

  /* Tables */
  .table-responsive {
    border: 0;
  }

  /* Footer */
  .footer .container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

/* ============================================================ 
   Global Styles & Animations
   ============================================================ */

.alert-viewport.active {
  animation: alertPulse 2s ease-in-out infinite;
}

/* Smooth Pulse Animation */
@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

@keyframes alertPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
  }

  50% {
    box-shadow: 0 0 0 15px rgba(102, 126, 234, 0);
  }
}

.footer {
  background-color: #ffffff;
  border-top: 1px solid var(--mn-border);
}

[data-bs-theme="dark"] .footer {
  background-color: #0d1117;
}

#toastContainer {
  z-index: 2050;
}

/* Dark Mode List Groups */
.list-group-item {
  background-color: transparent;
  color: var(--mn-text-main);
  border-color: var(--mn-border);
}

/* Adaptive URL Badge */
.url-badge {
  background: rgba(0, 0, 0, 0.05);
  color: var(--mn-text-muted);
}

[data-bs-theme="dark"] .url-badge {
  background: rgba(255, 255, 255, 0.1);
  color: var(--mn-text-main);
}

/* Easter Egg: Spin Animation */
@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

.spin-1 {
  animation: spin 1s ease-in-out;
  display: inline-block;
}

/* ============================================================
   3. MOBILE RESPONSIVENESS (Max-Width 768px) - ADDITIONAL
   ============================================================ */
/* (Note: Main mobile styles are above, this section supplements if needed/duplicated in previous broken edits) */


/* ============================================================
   4. ANDROID APP SPECIFIC STYLES & VIDEO ADS
   ============================================================ */

/* Mobile Touch Targets */
.nav-link,
.btn {
  min-height: 48px;
  /* Recommended touch target size */
  display: flex;
  align-items: center;
}

/* User Guide Video Ad Container */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  /* 16:9 Aspect Ratio */
  background: black;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Ad Overlay UI */
.ad-overlay {
  position: absolute;
  bottom: 60px;
  /* Above controls */
  left: 20px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
  pointer-events: none;
  /* Let clicks pass through if needed */
}

.ad-skip-btn {
  position: absolute;
  bottom: 60px;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 10px 24px 10px 16px;
  border-radius: 4px 0 0 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1000;
  /* High z-index to ensure visibility */
  transition: background 0.2s;
  pointer-events: auto;
  border-right: none;
}

.ad-skip-btn:hover {
  background: rgba(40, 40, 40, 0.9);
}

.ad-skip-btn.disabled {
  background: rgba(0, 0, 0, 0.6);
  /* increased opacity slightly for visibility */
  color: rgba(255, 255, 255, 0.8);
  pointer-events: none;
  cursor: default;
}

.ad-badge {
  background: #fcc00e;
  color: #000;
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

/* Progress Bar for Ad */
.ad-progress-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  z-index: 15;
}

.ad-progress-bar {
  height: 100%;
  background: #ff0000;
  /* YouTube Red */
  width: 0%;
  transition: width 0.1s linear;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .video-container {
    border-radius: 0;
    margin-left: -1rem;
    width: calc(100% + 2rem);
  }
}

/* Easter Egg: Spin Animation */
@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

.spin-1 {
  animation: spin 1s ease-in-out;
  display: inline-block;
}

/* ============================================================
   3. MOBILE RESPONSIVENESS (Max-Width 768px)
   ============================================================ */
@media (max-width: 768px) {

  /* Global Adjustments */
  h1,
  .h1 {
    font-size: 1.75rem !important;
  }

  h2,
  .h2 {
    font-size: 1.5rem !important;
  }

  h3,
  .h3 {
    font-size: 1.25rem !important;
  }

  .lead {
    font-size: 1rem !important;
  }

  /* Navbar */
  .navbar-brand {
    font-size: 1.2rem;
  }

  /* Container Padding */
  .container,
  .container-fluid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Dashboard Header */
  .row.align-items-center.mb-4.mt-1.gy-3 {
    text-align: center;
  }

  .col-md-6.d-flex.justify-content-md-end {
    justify-content: center !important;
    margin-top: 1rem;
  }

  /* Monitor Card */
  .alert-viewport {
    min-height: 350px !important;
  }

  .alert-viewport .inner {
    padding: 1.5rem !important;
  }

  #alertIcon {
    font-size: 3.5rem !important;
  }

  /* Button Stacking */
  .d-flex.flex-column.flex-sm-row.justify-content-center.gap-3 {
    flex-direction: column !important;
    width: 100%;
  }

  .d-flex.flex-column.flex-sm-row.justify-content-center.gap-3 .btn {
    width: 100%;
  }

  /* Settings Page */
  .card-body.p-5 {
    padding: 1.5rem !important;
  }

  /* User Guide */
  .ratio-16x9 {
    border-radius: 8px !important;
  }

  /* Login/Register Split Screen */
  /* Stack them: content first, then image or hidden image */
  .row.g-0 {
    flex-direction: column-reverse;
    /* Put form on top if needed, or normal */
  }

  .col-lg-6.d-none.d-lg-block {
    display: none !important;
    /* Hide the big image side on mobile to save space */
  }

  .col-lg-6 {
    width: 100%;
  }

  /* Reduce excessive margins */
  .mb-5 {
    margin-bottom: 1.5rem !important;
  }

  .py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  .p-5 {
    padding: 1.5rem !important;
  }

  /* Tables */
  .table-responsive {
    border: 0;
  }

  /* Footer */
  .footer .container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .footer .nav {
    justify-content: center;
  }
}

/* ============================================================
   4. ANDROID APP SPECIFIC STYLES & VIDEO ADS
   ============================================================ */

/* Mobile Touch Targets */
.nav-link,
.btn {
  min-height: 48px;
  /* Recommended touch target size */
  display: flex;
  align-items: center;
}

/* User Guide Video Ad Container */
/* Note: We switched to Bootstrap 'ratio' classes, but keeping this just in case */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  /* 16:9 Aspect Ratio */
  background: black;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Ad Overlay UI */
.ad-overlay {
  position: absolute;
  bottom: 60px;
  /* Above controls */
  left: 20px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
  pointer-events: none;
  /* Let clicks pass through if needed */
}

.ad-skip-btn {
  position: absolute;
  bottom: 60px;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 10px 24px 10px 16px;
  border-radius: 4px 0 0 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 20;
  transition: background 0.2s;
  pointer-events: auto;
  border-right: none;
}

.ad-skip-btn:hover {
  background: rgba(40, 40, 40, 0.9);
}

.ad-skip-btn.disabled {
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.7);
  pointer-events: none;
  cursor: default;
}

.ad-badge {
  background: #fcc00e;
  color: #000;
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

/* Progress Bar for Ad */
.ad-progress-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  z-index: 15;
}

.ad-progress-bar {
  height: 100%;
  background: #ff0000;
  /* YouTube Red */
  width: 0%;
  transition: width 0.1s linear;
}

/* Click-through-layer */
.ad-click-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 50px;
  /* Leave space for controls */
  z-index: 5;
  cursor: pointer;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .video-container {
    border-radius: 0;
    margin-left: -1rem;
    width: calc(100% + 2rem);
  }
}

```