body,
html {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  width: 100%;
  height: 100%;
  background-color: #25262b;
  color: white;
  font-size: 100%;
  overflow: hidden;
  cursor: none !important;
}

img,
video {
  max-width: 100%;
  height: auto;
}

#background-image {
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 1;
}

/* Initial loader */
#initial-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #000;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}

/* Maintain backwards compatibility with old classes */
#initial-loader.fade-out,
#initial-loader.opacity-0 {
  opacity: 0;
  pointer-events: none;
}

/* Content states */
#content {
  height: 100%;
  width: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

/* Maintain backwards compatibility with old classes */
#content.visible {
  display: flex;
  opacity: 1;
}

/* Support for new utility classes */
#content.flex {
  display: flex;
}

#content.opacity-100 {
  opacity: 1;
}

#prefetch-elements {
  display: none;
}

.serif {
  font-family: 'Times New Roman', serif;
}

.wrapper {
  position: relative;
  z-index: 20;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.device-info {
  display: none;
  /* More vibrant background with bold gradient */
  background-color: rgba(10, 14, 25, 0.85);
  background-image: linear-gradient(to bottom, rgba(35, 50, 80, 0.9), rgba(25, 35, 60, 0.95));
  border: 1px solid rgba(100, 150, 255, 0.2);
  border-radius: 20px 20px 0 0;
  max-width: 90%;
  width: 100%;
  box-shadow: 0 -15px 30px rgba(0, 0, 30, 0.5), 0 -5px 15px rgba(80, 120, 255, 0.15);
  padding: 20px;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  z-index: 100;
  overflow: hidden;
}

/* Base state for device info */
.device-info {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  opacity: 0;
  display: none;
  z-index: 100;
}

/* Visible state with animation */
.device-info.visible {
  display: block;
  animation: slideUpFadeIn 0.4s ease forwards;
}

/* Animation for sliding up and fading in */
@keyframes slideUpFadeIn {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(100%);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Animation for sliding down and fading out */
@keyframes slideDownFadeOut {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(100%);
  }
}

/* Class to apply when hiding the panel */
.device-info.hiding {
  animation: slideDownFadeOut 0.4s ease forwards;
}

@keyframes modalSlideUp {
  0% {
    opacity: 0.3;
    transform: translateX(-50%) translateY(100%);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes modalSlideDown {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(100%);
    pointer-events: none;
  }
}

/* Device Info Panel Styling */
.device-info-title {
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 16px;
  color: white;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Card Grid Layout */
.device-info-container {
  width: 100%;
  max-height: calc(80vh - 100px);
  overflow-y: auto;
  padding: 5px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* Card grid utilities */
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.grid {
  display: grid;
}

.gap-x-8 {
  column-gap: 2rem;
}

.gap-y-10 {
  row-gap: 2.5rem;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

/* Responsive grid breakpoints */
@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Ensure media playback card spans 2 columns on medium screens */
  .md\:col-span-2 {
    grid-column: span 2 / span 2;
  }
}

@media (min-width: 1081px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Card Styling */
.device-info-card {
  background-color: rgba(15, 25, 40, 0.85);
  border-radius: 12px;
  border: 1px solid rgba(100, 150, 255, 0.15);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 20px rgba(50, 100, 200, 0.1);
}

.device-info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 0 25px rgba(70, 130, 255, 0.2);
  border-color: rgba(100, 170, 255, 0.3);
}

/* Card Header */
.device-info-card-header {
  padding: 14px 16px;
  background-color: rgba(30, 45, 75, 0.9);
  border-bottom: 1px solid rgba(100, 150, 255, 0.2);
  background-image: linear-gradient(to right, rgba(40, 60, 100, 0.8), rgba(30, 45, 80, 0.8));
}

.device-info-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 1);
  display: flex;
  align-items: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 10px rgba(70, 130, 255, 0.3);
}

.device-info-card-icon {
  margin-right: 10px;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 0 10px rgba(100, 170, 255, 0.5);
}

/* Card Body */
.device-info-card-body {
  padding: 6px 0;
  margin: 0;
  flex: 1;
}

/* Item Styling */
.device-info-item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.2s ease;
  margin-bottom: 2px;
}

.device-info-item:last-child {
  border-bottom: none;
}

.device-info-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Item Label */
.device-info-item-label {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.9);
}

/* Icon Styling */
.device-info-item-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  margin-right: 8px;
  flex-shrink: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Value Styling */
.device-info-item-value {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  display: block;
  padding-left: 32px;
  margin-left: 4px;
  overflow: visible;
  text-align: left;
  line-height: 1.4;
  word-break: break-word;
  white-space: normal;
}

/* Media Playback Card Specific Styles */
.media-playback-card {
  grid-column: span 2 / span 2 !important;
  width: 100%;
  margin-bottom: 20px;
  z-index: 10;
  overflow: visible !important;
}

.media-playback-body {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
  overflow: visible !important;
}

.media-playback-item {
  flex: 1;
  min-width: 250px;
  width: 100%;
  overflow: visible !important;
}

.media-playback-label {
  font-weight: 600;
}

.media-playback-value {
  font-size: 14px;
  margin-top: 5px;
}

.device-info-not-available {
  color: rgba(180, 180, 180, 0.7); /* Slightly brighter grayish tone */
  font-style: italic;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

/* Add space between sections */
.device-info-table thead:not(:first-child) {
  padding-top: 15px;
}

.device-info-table thead:not(:first-child) th {
  padding-top: 20px;
}

/* Style the scrollbar for the device info panel */
.device-info-container::-webkit-scrollbar {
  width: 6px;
}

.device-info-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.device-info-container::-webkit-scrollbar-thumb {
  background-color: rgba(100, 150, 255, 0.3);
  border-radius: 4px;
}

.device-info-container::-webkit-scrollbar-thumb:hover {
  background-color: rgba(100, 170, 255, 0.5);
}

/* Slide down animation for closing */
@keyframes modalSlideDown {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(100%);
  }
}

/* Class applied when closing the modal */
.device-info.closing {
  animation: modalSlideDown 0.4s ease-in forwards;
}

/* Legacy rule - maintained for backwards compatibility */
.device-info > p {
  margin: 0.5rem 0;
}

#usp {
  margin-bottom: 90px;
  padding-left: 20px;
  padding-right: 20px;
}

#usp p {
  margin: 0;
  font-size: 1.5em;
}

#usp h2 {
  font-size: 4.5em;
  margin: 0;
  margin-bottom: 0.185em;
  color: #c293d0
}

.media-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

/* Maintain backwards compatibility with old classes */
.media-container.visible {
  display: flex;
  opacity: 1;
}

/* Support for new utility classes */
.media-container.flex {
  display: flex;
}

.media-container.opacity-100 {
  opacity: 1;
}

.media-player {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
}

/* Main media content */
.media-player video,
.media-player img.main-media {
  position: absolute;
  z-index: 10;
  height: 100vh;
  width: 100vw;
  object-fit: contain;
}

/* Background blur */
.media-player .background {
  position: absolute;
  z-index: 1;
  height: 100%;
  width: 100%;
  object-fit: cover;
  filter: blur(8px);
}

#qrcode {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: white;
  border-radius: 20px;
  box-shadow: 0 8px 12px rgb(0 0 0 / 20%);
  border: 5px solid #c293d0;
  padding: 20px;
  z-index: 20;
}

#qr-text {
  text-align: center;
  z-index: 20;
}

#logo {
  position: fixed;
  top: 50px;
  left: 50px;
  width: 150px;
  z-index: 20;
}

#loading-modal {
  position: fixed;
  inset: 0;
  background-color: rgb(0 0 0 / 80%);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 30;
  width: 100%;
  height: 100%;
}

.text-center {
  text-align: center;
  color: white;
  font-size: 2rem;
  padding: 2rem;
}

.animate-spin {
  animation: spin 1s linear infinite;
  display: inline-block;
  width: 4rem;
  height: 4rem;
  border: 4px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.fade-in {
  animation: fade-in 0.5s ease-in;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

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

/* Utility classes based on Tailwind naming conventions */

/* Display */
.hidden {
  display: none !important; /* Ensure this overrides other display styles */
}

.block {
  display: block !important;
}

.flex {
  display: flex !important;
}

/* Visibility */
.invisible {
  visibility: hidden !important;
}

.visible {
  visibility: visible !important;
}

/* Opacity */
.opacity-0 {
  opacity: 0;
}

.opacity-100 {
  opacity: 1;
}

/* Text colors */
.text-green {
  color: #008000;
}

.text-white {
  color: #fff;
}

.text-red {
  color: #ff0000;
}

/* Position and layout */
.fixed {
  position: fixed;
}

.top-5 {
  top: 20px;
}

.right-5 {
  right: 20px;
}

.z-50 {
  z-index: 50;
}

.z-max {
  z-index: 9999;
}

/* Padding and spacing */
.p-5 {
  padding: 20px;
}

.px-5 {
  padding-left: 20px;
  padding-right: 20px;
}

.py-3 {
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Background */
.bg-black-75 {
  background-color: rgb(0 0 0 / 75%);
}

.bg-green-600 { background-color: #16a34a; }
.bg-yellow-600 { background-color: #ca8a04; }
.bg-red-600 { background-color: #dc2626; }

/* Border radius */
.rounded {
  border-radius: 5px;
}

/* Transitions - Tailwind-like naming */
.transition {
  transition-property: opacity, transform;
  transition-timing-function: ease;
}

/* Transition timing variations */
.duration-300 {
  transition-duration: 0.3s;
}

.duration-400 {
  transition-duration: 0.4s;
}

.duration-500 {
  transition-duration: 0.5s;
}

/* Transition property variations */
.transition-opacity {
  transition-property: opacity;
  transition-timing-function: ease;
}

.transition-transform {
  transition-property: transform;
  transition-timing-function: ease;
}

/* Timing function variations */
.ease {
  transition-timing-function: ease;
}

.ease-in {
  transition-timing-function: ease-in;
}

.ease-out {
  transition-timing-function: ease-out;
}

.ease-in-out {
  transition-timing-function: ease-in-out;
}

.fullscreen-interaction {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: rgb(0 0 0 / 75%);
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  z-index: 9999;
  opacity: 0;
  cursor: pointer;
}

.fullscreen-interaction:hover {
  opacity: 1;
}

.fullscreen-interaction:focus {
  opacity: 1;
}

.fullscreen-interaction:focus-within {
  opacity: 1;
}

body:hover .fullscreen-interaction {
  animation: pulse 2s 1;
}

@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7);
  }

  50% {
    opacity: 1;
    transform: scale(1.3);
    box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
  }

  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
}

.fullscreen-interaction .medium {
  height: 5.2rem;
  width: 5.2rem;
}

.fullscreen-interaction .control-medium {
  height: 4.4rem;
  width: 4.4rem;

}

.fullscreen-interaction button {
  background-color: transparent;
  border-radius: 0.2rem;
  border: none;
  box-sizing: border-box;
  color: rgb(255, 255, 255);
  cursor: pointer;
  margin: 0px;
  padding: 0px;
  position: relative;
  transition: transform 150ms;
  will-change: height, width;
}

.fullscreen-interaction button:hover {
  transform: scale(1.3);
}

.fullscreen-interaction button:focus {
  transform: scale(1.3);
}

.fullscreen-interaction svg {
  height: 100%;
  width: 100%;
}

.fullscreen-interaction .control-fullscreen-enter {
  display: block;
}

.fullscreen-interaction .control-fullscreen-exit {
  display: none;
}

:fullscreen .fullscreen-interaction .control-fullscreen-enter {
  display: none;
}

:fullscreen .fullscreen-interaction .control-fullscreen-exit {
  display: block;
}


/* Composed utility classes - explicit declarations */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: rgb(0 0 0 / 75%);
  color: #fff;
  padding-top: 10px;
  padding-bottom: 10px;
  padding-left: 20px;
  padding-right: 20px;
  border-radius: 5px;
  z-index: 9999;
}

.notification-visible {
  opacity: 1;
  transition-property: opacity, transform;
  transition-timing-function: ease;
  transition-duration: 0.3s;
}

.notification-hidden {
  opacity: 0;
  transition-property: opacity, transform;
  transition-timing-function: ease;
  transition-duration: 0.3s;
}

.modal-base {
  transition-property: opacity, transform;
  transition-timing-function: ease;
  transition-duration: 0.3s;
}

.modal-hidden {
  display: none !important;
}

.modal-visible {
  display: flex !important;
  opacity: 1;
  transition-property: opacity, transform;
  transition-timing-function: ease;
  transition-duration: 0.3s;
}

.modal-fade-in {
  opacity: 1;
}

.modal-fade-out {
  opacity: 0;
}
