@font-face {
    font-family: 'Roboto-Bold';
    src: url(f80816a5455d171f948d.ttf) format('truetype');
}

:root {
    --primary-font: 'Roboto-Bold', "sans-serif";
    --secondary-font: "Arial", "monospace";
    --background-color: rgba(0, 0, 0, 0.8);
    --backdrop-color: rgba(255, 255, 255, 0.403);
    --loading-background-color: #000000;
    --title-color: #ffffff;
    --text-color: #ffffff;
    --fog-color: #668daa;
    --scrollbar-color: #ffffff17;
    --submit-area-color: #000000ab;
    --trans-text-light: rgba(162, 162, 162, 0.5);
    --trans-text-strong: rgba(162, 162, 162, 0.8);
    --button-alt-color: #25a7ed;
    --button-alt-hover-color: #1d8dbf;
    --button-color: #4CAF50;
    --button-hover-color: #3c8c3e;
    --button-remove-color: #c94940;
    --button-remove-hover-color: #c23f36;
    --XRButton-hover-color: #9c2d7e;
}

body, html {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: var(--primary-font);
}

#scene-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}
#dot-cursor {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background-color: var(--title-color);;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 100;
} 
#startExperienceButton {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px 40px;
    background-color: var(--button-color);
    color: var(--title-color);
    border: none;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    font-family: var(--primary-font);
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    z-index: 99999;
    overflow: hidden;
}

#startExperienceButton::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: all 0.5s;
}

#startExperienceButton:hover {
    background-color: var(--button-hover-color);
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

#startExperienceButton:hover::before {
    left: 100%;
}

#startExperienceButton {
    display: none; /* Initially hidden */
    opacity: 0;
    animation: fadeInScale 0.3s forwards; /* Fade-in and scale animation */
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.0);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}


.cog-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

#cog-icon {
    background: none;
    border: none;
    cursor: pointer;
    animation: float 3s ease-in-out infinite;
}

.esc-container {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 100;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    display: flex;
    align-items: center;
}

#esc-icon {
    background: none;
    width: 35px;
    height: 35px;
    border: none;
    display: inline-block;
    vertical-align: middle;
    background-color: transparent;
    border: none;
}

#esc-text {
    font-family: var(--primary-font);
    font-size: 12px;
    color: var(--title-color);
    margin-left: 8px;
    display: inline-block;
    vertical-align: middle; 
}

.tooltip-icon {
    cursor: pointer;
    display: inline-block;
    position: relative;
    transform: translateY(-2px);
    font-size: 12px;    
    margin-left: 5px;
}

.tooltip-text {
    visibility: hidden;
    width: 200px;
    max-width: 200px; 
    background-color: black;
    font-size: 12px;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 100;
    white-space: normal;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.tooltip-icon:hover .tooltip-text,
.tooltip-icon:focus .tooltip-text {
    visibility: visible;
    opacity: 1;
}

@keyframes float {
    0%, 100% {
        transform: translateY(-5px);
    }
    50% {
        transform: translateY(5px);
    }
}
/* Base Container Styles */
.loading-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
    z-index: 2000;
    opacity: 0;
    transition: opacity 2s;
}

.loading-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2001;
    text-align: center;
    width: min(90vw, 600px);
    padding: 2rem;
}

/* Logo Styles */
.loading-logo {
    width: clamp(160px, 30vw, 220px);
    height: auto;
    margin-bottom: 2rem;
    animation: logoFloat 3s infinite cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
    will-change: transform;
}

/* Loading Text Styles */
.loading-text {
    color: var(--title-color);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin: 1.5rem 0;
    font-family: var(--primary-font);
    text-transform: uppercase;
    letter-spacing: 0.5em;
    opacity: 0.9;
    transform: translateX(0.25em); /* Offset for letter-spacing */
    animation: textPulse 3s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

/* Progress Bar Styles */
.loading-progress-container {
    width: 100%;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    margin: 2rem 0;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.loading-progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(
        90deg,
        var(--button-color) 0%,
        var(--button-color-hover, var(--button-color)) 100%
    );
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.loading-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    animation: progressShimmer 2s infinite;
}

/* Percentage Text Styles */
.loading-percentage {
    color: var(--text-color);
    font-size: 1.1rem;
    font-family: var(--primary-font);
    margin-top: 1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

/* Animations */
@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.02);
    }
}

@keyframes textPulse {
    0%, 100% {
        opacity: 0.9;
        transform: translateX(0.25em) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateX(0.25em) scale(1.02);
    }
}

@keyframes progressShimmer {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(200%);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .loading-container {
        padding: 1.5rem;
    }

    .loading-text {
        font-size: clamp(1.5rem, 4vw, 2rem);
        letter-spacing: 0.3em;
    }

    .loading-progress-container {
        height: 5px;
        margin: 1.5rem 0;
    }

    .loading-percentage {
        font-size: 1rem;
    }
}

.loading-spinner {
    border: 5px solid var(--button-color);
    border-top: 5px solid var(--button-hover-color);
    border-radius: 50%;
    width: 100px; 
    height: 100px; 
    animation: spin 1s linear infinite;

    position: fixed;
    z-index: 9999;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
/* Base Variables */
:root {
    --popup-z-index: 999;
    --popup-padding: 30px;
    --popup-border-radius: 12px;
    --popup-transition-duration: 0.5s;
    --popup-max-width: 90vh;
    --popup-max-height: 90vh;
    
    /* Colors from original system */
    --popup-bg-color: rgba(16, 16, 16, 0.9);
    --popup-overlay-color: rgba(0, 0, 0, 0.2);
    --popup-border-color: var(--trans-text-light);
    --popup-header-bg: rgba(0, 0, 0, 0.603);
  }
  
  /* Base Popup Container */
  .popup-base {
    display: none;
    position: fixed;
    inset: 0;
    z-index: var(--popup-z-index);
    justify-content: center;
    align-items: center;
    font-family: var(--primary-font);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--popup-transition-duration) ease,
                visibility var(--popup-transition-duration) ease;
  }
  
  .popup-base.active {
    opacity: 1;
    visibility: visible;
    display: flex;
  }
  
  /* Popup Overlay */
  .popup-overlay {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    background-color: var(--popup-overlay-color);
    z-index: 2;
  }
  
  /* Popup Content Container */
  .popup-content {
    position: relative;
    z-index: 2;
    background-color: var(--popup-bg-color);
    border-radius: var(--popup-border-radius);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: var(--popup-max-width);
    max-height: var(--popup-max-height);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--text-color);
    transform: scale(0.1);
    transition: transform var(--popup-transition-duration) cubic-bezier(0.175, 0.885, 0.32, 1.275),
                opacity var(--popup-transition-duration) ease;
  }
  
  .popup-base.active .popup-content {
    transform: scale(1);
  }
  
  /* Popup Header */
  .popup-header {
    padding: calc(var(--popup-padding) * 0.4);
    border-bottom: 1px solid var(--popup-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--popup-header-bg);
  }
  
  .popup-header h2 {
    margin: 0;
    color: var(--text-color);
    font-size: 20px;
    font-weight: 600;
  }

  .header-buttons {
    display: flex;
    gap: 10px;
  }
  
  /* Close Button */
  .close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.3s ease, transform 0.3s ease;
    padding: 8px;
    border-radius: 50%;
  }

  .close-btn:hover {
      color: var(--button-color);
      transform: rotate(90deg);
  }

  .close-btn svg {
      display: block;
      width: 24px;
      height: 24px;
  }
  
  .popup-body {
    padding: var(--popup-padding);
    background-color: transparent;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }
  
  /* Form Elements */
  .popup-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--trans-text-light);
    border-radius: 6px;
    background-color: var(--submit-area-color);
    color: var(--text-color);
    margin-bottom: 15px;
    transition: border-color var(--popup-transition-duration) ease;
  }
  
  .popup-input:focus {
    outline: none;
    border-color: var(--button-color);
  }
  
  /* Buttons */
  .popup-button {
    padding: 12px 24px;
    background-color: var(--button-color);
    color: var(--title-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color var(--popup-transition-duration) ease,
                transform 0.2s ease;
  }
  
  .popup-button:hover:not(:disabled) {
    background-color: var(--button-hover-color);
    transform: translateY(-2px);
  }
  
  .popup-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  /* Minimal Style Variant */
  /* Used for e-learning content - providing space for a content table to the right while keeping the popup minimalistic */

  .popup-base.style-minimal {
    
    /* no rounded corners */
    pointer-events: none;
    margin: 10px;
  }

  .popup-base.style-minimal .popup-content {
    background-color: transparent;
    box-shadow: none;
    max-width: 73%;
    max-height: 100%;
    height: 100%;
    pointer-events: auto;
  }

  .popup-base.style-minimal .popup-overlay {
    background-color: rgba(0, 0, 0, 0);
    /* no backdrop filter */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  
  .popup-base.style-minimal .popup-header {
    background-color: transparent;
    border-bottom: none;
    padding: 0;
  }

  .popup-base.style-minimal .popup-button {
    width: 100px;
  }

  .popup-base.style-minimal .close-btn {
    padding: 0;
  }

  .popup-base.style-minimal .close-btn svg {
    width: 15px;
    height: 15px;
  }

  /* Close Button not visible in minimal style */
  .popup-base.style-minimal .close-btn {
    display: none;
  }
  
  /* Scrollbar Styling */
  .popup-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }

  .popup-content::-webkit-scrollbar-track {
    background-color: var(--submit-area-color);
    border-radius: 4px;
  }

  .popup-content::-webkit-scrollbar-thumb {
    background-color:rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border: 2px solid var(--background-color);
  }

  .popup-content::-webkit-scrollbar-thumb:hover {
    background-color:rgba(0, 0, 0, 0.4);
  }

  .popup-body::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  
  .popup-body::-webkit-scrollbar-track {
    background-color: var(--submit-area-color);
    border-radius: 4px;
  }
  
  .popup-body::-webkit-scrollbar-thumb {
    background-color: var(--trans-text-light);
    border-radius: 4px;
    border: 2px solid var(--background-color);
  }
  
  .popup-body::-webkit-scrollbar-thumb:hover {
    background-color: var(--trans-text-strong);
  }

  
  @media (max-width: 768px) {

    .popup-content {
      max-width: 95%;
      max-height: 95%;
    }

    .popup-header {
      padding: 15px;
    }
  
    .popup-header h2 {
      font-size: 16px;
    }

    .popup-body {
      margin: 2%;
    }
  
    .popup-button {
      width: 100%;
      margin-bottom: 10px;
    }

    .popup-base.style-minimal .popup-body {
      margin: 0;
    }

    .popup-base.style-minimal .text-content {
      margin: 0;
    }
  }
  


/* Cog Container Styles */
.cog-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100000;
    border-radius: 10%;
}

.cog-icon {
    width: 48px;
    height: 48px;
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cog-icon img {

    transition: filter 0.3s ease;
}

.cog-icon:hover {
    transform: rotate(90deg);
    background-color: var(--button-color);
}

.cog-icon:hover img {
    filter: brightness(5);
}

/* Dropdown Menu Styles */
.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 15px);
    background-color: var(--background-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    font-family: var(--primary-font);
    width: 220px;
    z-index: 1001;
    border: none;
    transform: translateY(-20px);
    opacity: 0;
}

.dropdown-menu.show {
    display: block;
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

/* Dropdown Arrow */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    right: 30px;
    width: 20px;
    height: 20px;
    background-color: var(--background-color);
    transform: rotate(45deg);
    box-shadow: -3px -3px 7px rgba(0, 0, 0, 0.05);
}

/* Dropdown Items */
.dropdown-item {
    padding: 15px 20px;
    width: 100%;
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    background-color: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

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

.dropdown-item:hover {
    background-color: var(--button-color);
    color: #fff;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .cog-container {
        top: 10px;
        right: 10px;
    }

    .cog-icon {
        width: 40px;
        height: 40px;
        padding: 8px;
    }

    .cog-icon img {
        width: 40px;
        height: 40px;
    }

    .dropdown-menu {
        width: 180px;
    }
    
    .dropdown-item {
        padding: 12px 16px;
        font-size: 14px;
    }
}


.info-popup-container {
    display: flex;
    background-color: var(--background-color);
    flex-direction: column;
    align-items: center;
    padding: 10%;
    gap: 1.5rem;
}

.info-popup-text {
    width: 100%;
    text-align: center;
}

.info-popup-text h3 {
    color: var(--title-color);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.info-popup-text p {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0.75rem 0;
    opacity: 0.9;
}

.info-popup-text img {
    width: auto;
    height: clamp(30px, 8vw, 50px);
    margin: 1rem auto;
    transition: transform 0.2s ease;
}

.info-popup-text img:hover {
    transform: scale(1.1);
}

.multiplayer-popup-body {
    padding: var(--popup-padding);
    display: flex;
    flex: 1;
    flex-direction: column;
    overflow: auto;
}

.multiplayer-description {
    margin-bottom: 20px;
    color: var(--trans-text-strong);
    font-size: 16px;
}

.multiplayer-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.multiplayer-input-group {
    position: relative;
    margin-bottom: 5px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.multiplayer-input-group label {
    color: var(--text-color);
    font-size: 16px;
    font-weight: 500;
}

.multiplayer-input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--trans-text-light);
    border-radius: 6px;
    font-size: 16px;
    background-color: var(--submit-area-color);
    color: var(--text-color);
    transition: border-color 0.3s ease;
}

.multiplayer-input-group input::placeholder {
    color: rgb(71, 71, 71);
    font-size: 12px;
}
  

.multiplayer-input-group input:focus {
    outline: none;
    border-color: var(--button-color);
}

.multiplayer-room-info {
    background-color: var(--submit-area-color);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.multiplayer-room-id {
    display: block;
    color: var(--text-color);
    font-size: 16px;
    margin-bottom: 10px;
    word-break: break-all;
}

/* Session container specific styles */
#multiplayer-session-container .multiplayer-room-info {
    text-align: center;
}

/* Copy link button specific styles */
#copy-invite-link-btn {
    position: relative;
    overflow: hidden;
}

#copy-invite-link-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

#copy-invite-link-btn:active::before {
    width: 200%;
    height: 200%;
}

/* Scrollbar styling */
.multiplayer-popup ::-webkit-scrollbar,
.multiplayer-invitation-popup ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.multiplayer-popup ::-webkit-scrollbar-track,
.multiplayer-invitation-popup ::-webkit-scrollbar-track {
    background-color: rgba(var(--rgb-text-color), 0.1);
    border-radius: 5px;
}

.multiplayer-popup ::-webkit-scrollbar-thumb,
.multiplayer-invitation-popup ::-webkit-scrollbar-thumb {
    background-color: rgba(var(--rgb-text-color), 0.3);
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.multiplayer-popup ::-webkit-scrollbar-thumb:hover,
.multiplayer-invitation-popup ::-webkit-scrollbar-thumb:hover {
    background-color: rgba(var(--rgb-text-color), 0.5);
}

/* Error state styles */
.multiplayer-input-group.error input {
    border-color: var(--error-color);
}

.multiplayer-input-group.error .error-message {
    color: var(--error-color);
    font-size: 14px;
    margin-top: 5px;
}

/* Success state styles */
.multiplayer-input-group.success input {
    border-color: var(--success-color);
}

/* Room list specific styles */
.room-list-container {
    margin-top: 1.5rem;
    border: 1px solid var(--trans-text-light);
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: var(--submit-area-color);
}

.room-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.room-list-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.refresh-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    color: var(--text-color);
}

.refresh-button:hover {
    background-color: var(--trans-text-light);
}

.refresh-button.refreshing svg {
    animation: spin 1s linear infinite;
}

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

.room-list {

    overflow-y: auto;
    gap: 0.5rem;
    display: flex;
    flex-direction: column;
}

/* Scrollbar Styling */
.room-list::-webkit-scrollbar {
width: 8px;
height: 8px;
}

.room-list::-webkit-scrollbar-track {
background-color: var(--submit-area-color);
border-radius: 4px;
}

.room-list::-webkit-scrollbar-thumb {
background-color: var(--trans-text-light);
border-radius: 4px;
border: 2px solid var(--background-color);
}

.room-list::-webkit-scrollbar-thumb:hover {
background-color: var(--trans-text-strong);
}

.room-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background-color: var(--submit-area-color);
    border: 1px solid var(--trans-text-light);
    border-radius: 0.25rem;
    transition: background-color 0.2s, transform 0.2s;
}

.room-item:hover {
    background-color: var(--trans-text-light);
    transform: translateY(-1px);
}

.room-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.room-id {
    font-weight: 500;
    color: var(--text-color);
}

.player-count {
    font-size: 0.9rem;
    color: var(--trans-text-strong);
}

.join-room-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.25rem;
    background-color: var(--button-color);
    color: var(--button-text-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.join-room-btn:hover:not(:disabled) {
    background-color: var(--button-hover-color);
}

.join-room-btn:disabled {
    background-color: var(--trans-text-light);
    cursor: not-allowed;
}

.join-room-btn:not(:disabled):hover {
    transform: scale(1.05);
}

.no-rooms-message {
    text-align: center;
    padding: 1rem;
    color: var(--trans-text-strong);
    font-style: italic;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.button-group button {
    flex: 1;
}

.room-count {
    padding: 8px;
    color: var(--trans-text-strong);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--trans-text-light);
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.room-status {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
}

.room-status.available {
    background-color: var(--success-color);
    color: white;
}

.room-status.full {
    background-color: var(--trans-text-light);
    color: var(--trans-text-strong);
}

.player-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.player-avatars {
    display: flex;
    gap: -8px;
}

.player-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--button-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 500;
    border: 2px solid var(--submit-area-color);
}

.player-avatar.more {
    background-color: var(--trans-text-light);
    font-size: 0.7rem;
}

.no-rooms-message {
    text-align: center;
    padding: 2rem;
    color: var(--trans-text-strong);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.create-now-btn {
    background: none;
    border: none;
    color: var(--button-color);
    cursor: pointer;
    text-decoration: underline;
    padding: 4px 8px;
}

.create-now-btn:hover {
    color: var(--button-hover-color);
}

/* Session players section styling */
.scene-group {
    margin-bottom: 1rem;
}

.scene-group:last-child {
    margin-bottom: 0;
}

.scene-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background-color: var(--trans-text-light);
    border-radius: 0.25rem;
}

.scene-name {
    font-weight: 500;
    color: var(--text-color);
}

.scene-count {
    font-size: 0.8rem;
    color: var(--trans-text-strong);
    padding: 2px 8px;
    background-color: var(--submit-area-color);
    border-radius: 12px;
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.player-name {
    color: var(--text-color);
    font-weight: 500;
}

.player-id {
    font-size: 0.8rem;
    color: var(--trans-text-strong);
    opacity: 0.8;
}

.session-players {
    margin-top: 1.5rem;
    border: 1px solid var(--trans-text-light);
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: var(--submit-area-color);
}

.session-players-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--trans-text-light);
}

.session-players-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.session-players .player-count {
    font-size: 0.9rem;
    color: var(--trans-text-strong);
    background-color: var(--trans-text-light);
    padding: 2px 8px;
    border-radius: 12px;
}

.player-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.player-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: var(--submit-area-color);
    border: 1px solid var(--trans-text-light);
    border-radius: 0.25rem;
    transition: background-color 0.2s, transform 0.2s;
}

.player-item:hover {
    background-color: var(--trans-text-light);
}

.player-item .player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--button-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 500;
    border: 2px solid var(--submit-area-color);
}

.player-item .player-name {
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Scrollbar styling for player list */
.player-list::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.player-list::-webkit-scrollbar-track {
    background-color: var(--submit-area-color);
    border-radius: 4px;
}

.player-list::-webkit-scrollbar-thumb {
    background-color: var(--trans-text-light);
    border-radius: 4px;
    border: 2px solid var(--background-color);
}

.player-list::-webkit-scrollbar-thumb:hover {
    background-color: var(--trans-text-strong);
}

/* Media Queries */
@media (max-width: 768px) {

    .multiplayer-form {
        gap: 15px;
    }

    .multiplayer-input-group input {
        padding: 10px 12px;
        font-size: 15px;
    }

    .multiplayer-description {
        font-size: 14px;
    }

    .room-item {
        flex-direction: column;
    }

    .session-players {
        margin-top: 1rem;
        padding: 0.75rem;
    }

    .player-item {
        padding: 0.5rem;
    }

    .player-item .player-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
}

/* User Management Popup Content */
.um-popup-content {
    position: relative;
    z-index: 2;
    background-color: var(--popup-bg-color);
    border-radius: var(--popup-border-radius);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-height: var(--popup-max-height);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--text-color);
}

.um-popup-body {
    padding: var(--popup-padding);
    display: flex;
    flex: 1;
    overflow: auto;
}

.um-create-user-section,
.um-user-list-section {
    flex: 1;
    padding: 30px;
}

.um-create-user-section {
    border-right: 1px solid var(--trans-text-light);
}

/* Headings */
.um-popup h3 {
    margin-top: 0;
    color: var(--title-color);
    font-size: 22px;
    margin-bottom: 20px;
}

/* Form Elements */
.um-form {
    display: flex;
    flex-direction: column;
}

.um-input,
.um-select {
    margin-bottom: 20px;
    padding: 12px 15px;
    border: 1px solid var(--trans-text-light);
    border-radius: 6px;
    font-size: 16px;
    background-color: var(--submit-area-color);
    color: var(--text-color);
    transition: border-color 0.3s ease;
}

.um-input:focus,
.um-select:focus {
    outline: none;
    border-color: var(--button-color);
}

/* Buttons */
.um-button,
.popup-button.edit-user-btn {
    padding: 12px 20px;
    background-color: var(--button-color);
    color: var(--title-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.um-button:hover,
.popup-button.edit-user-btn:hover {
    background-color: var(--button-hover-color);
}

/* User List Section */
.um-user-list-container {
    max-height: calc(100vh - 400px);
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 8px;
    background: var(--submit-area-color);
    margin-top: 15px;
}

/* Column Headers */
.um-list-headers {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 15px;
    padding: 12px 15px;
    background: var(--background-color);
    border-bottom: 2px solid var(--trans-text-light);
    font-weight: 600;
    color: var(--trans-text-strong);
    font-size: 14px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.um-list-headers span {
    white-space: nowrap;
}

.um-user-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.um-user-list li {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 15px;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid var(--trans-text-light);
    transition: background-color 0.2s ease;
}

.um-user-list li:last-child {
    border-bottom: none;
}

.um-user-list li:hover {
    background-color: rgba(var(--rgb-text-color), 0.05);
}

/* Email and Role Styling */
.user-email {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-role {
    color: var(--trans-text-strong);
    font-size: 14px;
    padding: 4px 8px;
    background: rgba(var(--rgb-text-color), 0.1);
    border-radius: 4px;
    white-space: nowrap;
}

/* Edit Button */
.popup-button.edit-user-btn {
    padding: 6px 12px;
    font-size: 14px;
    background-color: var(--button-alt-color);
}

.popup-button.edit-user-btn:hover {
    background-color: var(--button-alt-hover-color);
}

/* Modal Styles */
.um-modal {
    display: none;
    position: fixed;
    z-index: 1002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.um-modal-content {
    background-color: var(--background-color);
    margin: 10% auto;
    padding: 30px;
    border: 1px solid var(--trans-text-light);
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.um-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.um-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

.um-delete-user-btn {
    background-color: var(--button-remove-color);
}

.um-delete-user-btn:hover {
    background-color: var(--button-remove-hover-color);
}

/* Search Input */
#user-search {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--trans-text-light);
    border-radius: 6px;
    font-size: 14px;
    background-color: var(--submit-area-color);
    color: var(--text-color);
    transition: border-color 0.2s ease;
}

#user-search:focus {
    outline: none;
    border-color: var(--button-color);
}

/* Scrollbar Styling */
.um-user-list-container::-webkit-scrollbar {
    width: 6px;
}

.um-user-list-container::-webkit-scrollbar-track {
    background: transparent;
}

.um-user-list-container::-webkit-scrollbar-thumb {
    background-color: rgba(var(--rgb-text-color), 0.2);
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.um-user-list-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(var(--rgb-text-color), 0.3);
}

/* Close button for modal */
.um-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-color);
    cursor: pointer;
    padding: 0 8px;
    transition: color 0.2s ease;
}

.um-close-btn:hover {
    color: var(--button-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .um-popup-body {
        flex-direction: column;
    }

    .um-create-user-section {
        border-right: none;
        border-bottom: 1px solid var(--trans-text-light);
    }

    .um-user-list li {
        grid-template-columns: 1fr auto;
    }

    .user-role {
        font-size: 12px;
    }

    .um-list-headers {
        grid-template-columns: 1fr auto;
    }

    .um-list-headers span:last-child {
        display: none;
    }
}
.settings-description {
    color: var(--trans-text-strong);
    font-size: 1rem;
    margin: 0;
    padding-bottom: 1rem;
}

/* Control Groups */
.settings-control {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--trans-text-light);
}

.settings-control:last-child {
    border-bottom: none;
}

.settings-label {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
}

/* Volume Slider */
.settings-slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.settings-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: linear-gradient(
        to right,
        var(--button-color) 0%,
        var(--button-color) var(--volume-percentage, 50%),
        var(--trans-text-light) var(--volume-percentage, 50%),
        var(--trans-text-light) 100%
    );
    border-radius: 3px;
    outline: none;
}

.settings-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--button-color);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.settings-slider::-webkit-slider-thumb:hover,
.settings-slider.settings-slider-active::-webkit-slider-thumb {
    transform: scale(1.2);
    background: var(--button-hover-color);
}

.settings-value {
    min-width: 45px;
    color: var(--text-color);
    font-size: 0.875rem;
}

/* Toggle Switch */
.settings-toggle-wrapper {
    position: relative;
    width: 60px;
    height: 30px;
    flex-shrink: 0; 
}

.settings-toggle-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
    z-index: -1; 
}

.settings-toggle-label {
    position: absolute;
    inset: 0;
    background-color: var(--trans-text-light);
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.settings-toggle-label:before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: var(--background-color);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

input[type="checkbox"]:checked + .settings-toggle-label {
    background-color: var(--button-color);
}

input[type="checkbox"]:checked + .settings-toggle-label:before {
    transform: translateX(30px);
}

input[type="checkbox"]:disabled + .settings-toggle-label {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Buttons */
.settings-ar-button,
.settings-reset-button {
    width: 100%;
    padding: 0.75rem 1.25rem;
    background-color: var(--button-color);
    color: var(--title-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
}

.settings-reset-button {
    background-color: var(--button-alt-color);
}

.settings-ar-button:hover:not(:disabled),
.settings-reset-button:hover {
    background-color: var(--button-hover-color);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.settings-reset-button:hover {
    background-color: var(--button-alt-hover-color);
}

.settings-ar-button:disabled {
    background-color: var(--trans-text-light);
    cursor: not-allowed;
    transform: none;
}

/* Loading State */
.settings-ar-button.loading {
    color: transparent;
    position: relative;
}

.settings-ar-button.loading::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--title-color);
    border-radius: 50%;
    border-right-color: transparent;
    animation: button-loading 0.8s linear infinite;
}

@keyframes button-loading {
    to { transform: rotate(360deg); }
}

/* Focus States */
.settings-ar-button:focus-visible,
.settings-reset-button:focus-visible,
.settings-close-btn:focus-visible,
.settings-slider:focus-visible {
    outline: 2px solid var(--button-color);
    outline-offset: 2px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {

    .settings-ar-button,
    .settings-reset-button {
        padding: 0.625rem 1rem;
        font-size: 0.9375rem;
    }
}
#cpm-media-container {
    margin-bottom: 24px;
    background-color: var(--submit-area-color);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(172, 65, 65, 0.1);
    transition: flex 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; 
    max-height: 100%; 
}

#cpm-media-container img {
    width: 100%;
    height: 40vh;
    object-fit: contain;
    border-radius: 8px 8px 0 0;
    background-color: transparent;
}

#cpm-media-container video {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/*/ subtitles */
#cpm-media-container video::cue {
    color: #fff;
    background-color: rgba(0, 0, 0, 0.8);
    font-size: 22px;
    font-weight: 600;
}

#cpm-media-container iframe {
    width: 100%;
    height: 60vh;
    border-radius: 8px 8px 0 0;
}

#cpm-text-content {
    margin-bottom: 0px;
    font-size: 16px;
    line-height: 1.6;
    flex: 1 1 auto;}

#cpm-text-content p {
    margin-bottom: 16px;
}

#cpm-text-content ul, #cpm-text-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

#cpm-text-content li {
    margin-bottom: 8px;
}

/* Scrollbar Styling */
#cpm-text-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  
#cpm-text-content::-webkit-scrollbar-track {
background-color: var(--submit-area-color);
border-radius: 4px;
}

#cpm-text-content::-webkit-scrollbar-thumb {
background-color: var(--trans-text-light);
border-radius: 4px;
border: 2px solid var(--background-color);
}

#cpm-text-content::-webkit-scrollbar-thumb:hover {
background-color: var(--trans-text-strong);
}

.cpm-button-container {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: flex-start;
    align-items: center;
}

.cpm-button {
    padding: 12px 24px;
    background-color: var(--button-color);
    color: var(--title-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: inline-block;
    width: 40%;
    word-wrap: break-word;
}

.cpm-button:hover {
    background-color: var(--button-hover-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.cpm-button-alt {
    background-color: var(--button-alt-color);
}

.cpm-button-alt:hover {
    background-color: var(--button-alt-hover-color);
}

/* Input textarea styling */
.cpm-textarea-container {
    position: relative;
    width: 100%;
    margin: 1rem 0;
}

.cpm-textarea-field {
    width: 100%;
    min-height: 20vh;
    padding: 12px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background-color: #fff;
    resize: vertical;
    transition: all 0.2s ease-in-out;
}

.cpm-textarea-field:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.cpm-textarea-field::placeholder {
    color: #94a3b8;
}

.cpm-textarea-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 14px;
    font-weight: 500;
    color: #b7b7b7;
}

.cpm-char-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 12px;
    color: #64748b;
}

/* =========================================
   MEDIA-ONLY OVERRIDES
   ========================================= */

/* When the popup has 'style-media-only', it means there's only media and no text/headline/buttons. 
   We expand the popup to nearly fill the screen, letting media occupy all the space. */

   /* Hide the header */
  .popup-base.style-media-only .popup-header {
    display: none;
  }

   .popup-base.style-media-only .popup-content {
    /* Expand the popup to a large portion of the screen */
    border-radius: 0; /* remove if you don't want corners squared off */
    max-height: 100%; /* fill the screen */
  }

  .popup-base.style-media-only #close-content-popup {
    /* Hide the close button */
    display: none;
  }

  /* Hide scrollbar in media-only mode */
  .popup-base.style-media-only #cpm-media-container {
    overflow: hidden;
}

  
  /* Hide the headline if it's "media only" */
  .popup-base.style-media-only .popup-header h2 {
    display: none !important;
  }
  
  /* We still keep the close button visible, but you can float it if desired */
  .popup-base.style-media-only .popup-header {
    background-color: transparent;
    border-bottom: none;
    display: flex;
    justify-content: flex-end;
  }
  
  /* Remove padding from the body so media can occupy full height */
  .popup-base.style-media-only .popup-body {
    padding: 0 !important;
    display: flex;
    flex: 1 1 auto;
  }
  
  /* Make the media container fill the rest */
  .popup-base.style-media-only #cpm-media-container {
    flex: 1 1 auto;
    margin: 0;
    width: 100%;
    height: 100%;
  }
  
  /* Force the media elements to fill their container (with object-fit as needed) */
  .popup-base.style-media-only #cpm-media-container img,
  .popup-base.style-media-only #cpm-media-container video,
  .popup-base.style-media-only #cpm-media-container iframe {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain; /* or cover, if you prefer cropping */
  }
  
  /* Hide text content container entirely in media-only mode */
  .popup-base.style-media-only #cpm-text-content {
    display: none !important;
  }
  
  .popup-base.style-media-only #cpm-button-container {
    display: none !important;
  }


  /* =========================================
   MOBILE STYLES
   ========================================= */

   @media screen and (max-width: 768px) {
    /* Buttons */
    .cpm-button {
        padding: 12px 16px;
        font-size: 14px;
        width: 90%;
        word-wrap: break-word;
    }

    /* Text content */
    .popup-base.style-minimal #cpm-text-content {
        font-size: 12px
    }

    /* Subtitles */
    #cpm-media-container video::cue {
        font-size: 14px;
    }
  }
  



  

/* EditContentPopupManager.css */

/* --------------------------------------------------
   Universal box-sizing & smooth fonts
-------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  font-smooth: always;
}

/* --------------------------------------------------
   SUBMIT BUTTON
-------------------------------------------------- */
.ecpm-submit-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  padding: 12px 24px;
  background-color: #28a745;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.ecpm-submit-btn:hover {
  background-color: #218838;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}
.ecpm-submit-btn:active {
  background-color: #1e7e34;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transform: translateY(1px);
}
.ecpm-submit-btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.ecpm-save-icon {
  stroke: #ffffff;
  width: 20px;
  height: 20px;
}

/* --------------------------------------------------
   POPUP BODY & FORM
-------------------------------------------------- */
.ecpm-popup-body {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background-color: transparent;
  padding: 0;
  animation: fadeInPopup 0.3s ease;
}
@keyframes fadeInPopup {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

#edit-content-form {
  width: 100%;
  margin: 0;
  padding: 24px;
}

/* --------------------------------------------------
   FORM GROUPS & INPUTS
-------------------------------------------------- */
.ecpm-form-group {
  margin-bottom: 12px;
}
.ecpm-form-group label {
  display: block;
  margin-bottom: 8px;
  color: #bbbbbb;
  font-size: 14px;
  font-weight: 500;
}
.ecpm-form-group input[type="text"],
.ecpm-form-group input[type="url"],
.ecpm-form-group textarea,
.ecpm-form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid #444;
  border-radius: 6px;
  background-color: #000000a9;
  color: #ffffff;
  font-size: 14px;
  transition: background-color 0.2s, border-color 0.2s;
}
.ecpm-form-group input[type="text"]:focus,
.ecpm-form-group input[type="url"]:focus,
.ecpm-form-group textarea:focus,
.ecpm-form-group select:focus {
  outline: none;
  background-color: #1a1a1a;
  border-color: #666;
}
.ecpm-form-group textarea {
  resize: vertical;
  min-height: 100px;
  /* For Firefox custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: #555 #1e1e1e;
}
/* Scrollbar for textarea (Chrome, etc.) */
.ecpm-form-group textarea::-webkit-scrollbar {
  width: 10px;
}
.ecpm-form-group textarea::-webkit-scrollbar-track {
  background-color: #1e1e1e;
}
.ecpm-form-group textarea::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 5px;
}
.ecpm-form-group textarea::-webkit-scrollbar-thumb:hover {
  background-color: #666;
}

/* --------------------------------------------------
   DROPZONE STYLES
-------------------------------------------------- */
.ecpm-dropzone {
  margin-bottom: 25px;
}
.ecpm-dropzone label {
  display: block;
  margin-bottom: 8px;
  color: #bbbbbb;
  font-size: 14px;
  font-weight: 500;
}
.ecpm-dropzone-area {
  border: 2px dashed #555;
  border-radius: 6px;
  padding: 10px;
  text-align: center;
  background-color: #000000a9;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  cursor: pointer;
}
.ecpm-dropzone-area:hover {
  background-color: #111111;
}
.ecpm-dropzone-area.highlight {
  background-color: #333;
  border-color: #3f51b5;
}
.ecpm-dropzone-content {
  margin-bottom: 10px;
}
.ecpm-dropzone-area .ecpm-upload-icon {
  font-size: 48px;
  color: #666666;
  margin-bottom: 10px;
}
.ecpm-dropzone-area p {
  margin: 0;
  color: #bbbbbb;
  font-size: 16px;
}
.ecpm-upload-link {
  color: #3f51b5;
  text-decoration: underline;
  cursor: pointer;
}
.ecpm-file-label {
  margin-top: 10px;
  font-size: 14px;
  color: #888888;
}
.ecpm-dropzone-area input[type="file"] {
  display: none;
}
/* Dropzone actions: side by side or stacked in mobile */
.ecpm-dropzone-actions {
  margin: 0 -5px;
  display: flex;
  justify-content: space-between;
}
.ecpm-dropzone-actions button {
  padding: 10px 20px;
  background-color: transparent;
  width: calc(50% - 10px);
  margin: 0 5px;
  color: #ffffff;
  border: 1px solid #666;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
.ecpm-dropzone-actions button:hover {
  background-color: #444;
  transform: translateY(-2px);
}
.ecpm-dropzone-actions .ecpm-clear-btn:hover {
  background-color: #d32f2f;
}

/* --------------------------------------------------
   SCROLLBAR FOR POPUP BODY
-------------------------------------------------- */
.ecpm-popup-body::-webkit-scrollbar {
  width: 10px;
}
.ecpm-popup-body::-webkit-scrollbar-track {
  background-color: #1e1e1e;
}
.ecpm-popup-body::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 5px;
}
.ecpm-popup-body::-webkit-scrollbar-thumb:hover {
  background-color: #666;
}

/* --------------------------------------------------
   BUTTONS SECTION (ecpm-buttons-list, etc.)
-------------------------------------------------- */
/* Container for each button row */
.ecpm-button-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background-color: #181818; /* Darker background for contrast */
  padding: 16px;
  margin-bottom: 16px;
  border-radius: 8px;
  gap: 12px;
  position: relative;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Used for the button-name-label and the remove button row */
.ecpm-button-row-first {
  display: flex;
  justify-content: space-between;
}

/* Button Labels */
.ecpm-button-name-label,
.ecpm-button-event-label {
  font-size: 14px;
  color: #d1d1d1;
  font-weight: bold;
}

/* Text Inputs */
.ecpm-button-row input[type="text"] {
  width: 100%;
  background-color: #222;
  border: 1px solid #444;
  color: #fff;
  border-radius: 6px;
  padding: 10px;
  font-size: 14px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.ecpm-button-row input[type="text"]:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* Remove Button */
.ecpm-remove-button {
  background-color: #333;
  border: 1px solid #555;
  color: #ff4d4d;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  align-self: flex-end;
}

.ecpm-remove-button:hover {
  background-color: #ff4d4d;
  border-color: #ff4d4d;
  color: #fff;
  transform: scale(1.1);
}

/* "Edit Events" Button */
.ecpm-chain-btn {
  padding: 10px 20px;
  background-color: transparent;
  width: 100%;
  color: #ffffff;
  border: 1px solid #666;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
.ecpm-chain-btn:hover {
  background-color: #444;
  transform: translateY(-2px);
}

.ecpm-add-button {
  background-color: #28a745;
  border: none;
  color: white;
  padding: 10px 14px;
  cursor: pointer;
  border-radius: 6px;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.3s ease;
  margin: 20px;
}

.ecpm-add-button:hover {
  background-color: #218838;
  transform: translateY(-2px);
}

/* Collapsible Event Chain Editor */
.ecpm-eventchain-editor {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  background-color: #222;
  border: 1px solid #444;
  border-radius: 6px;
  display: block; /* Ensure it's block by default */
}

.hidden {
  display: none !important;
}

.ecpm-eventchain-editor.hidden {
  display: none !important;
}

/* Responsive Improvements */
@media (max-width: 480px) {
  .ecpm-button-row {
    flex-direction: column;
    align-items: stretch;
  }

  .ecpm-button-row input[type="text"] {
    width: 100%;
  }

  .ecpm-remove-button {
    width: 100%;
    margin-top: 8px;
  }

  .ecpm-chain-btn {
    width: 100%;
  }
}

/* loginPopupManager.css */

.lp-login-section {
    display: none; /* Hide all sections by default */
    margin-bottom: 20px;
}

.lp-description {
    margin-bottom: 20px;
    color: var(--trans-text-strong);
    font-size: 16px;
}

.lp-input-group {
    position: relative;
    margin-bottom: 25px;
    display: flex;
}

.lp-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--trans-text-light);
    border-radius: 6px;
    font-size: 16px;
    background-color: var(--submit-area-color);
    color: var(--text-color);
    transition: border-color 0.3s ease;
}

.lp-input:focus {
    outline: none;
    border-color: var(--button-color);
}

.lp-input-label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--trans-text-strong);
    pointer-events: none;
    transition: all 0.3s ease;
}

.lp-input:focus + .lp-input-label,
.lp-input:not(:placeholder-shown) + .lp-input-label {
    top: -10px;
    left: 10px;
    font-size: 14px;
    background-color: var(--background-color);
    padding: 0 5px;
    color: var(--button-color);
}

.lp-button {
    width: 100%;
    padding: 12px 20px;
    background-color: var(--button-color);
    color: var(--title-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.lp-button:hover {
    background-color: var(--button-hover-color);
    transform: translateY(-2px);
}

.lp-button-secondary {
    background-color: var(--button-alt-color);
    margin-top: 15px;
}

.lp-button-secondary:hover {
    background-color: var(--button-alt-hover-color);
}

#logged-in-username {
    font-weight: bold;
    color: var(--button-color);
}

#admin-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--title-color);
    font-size: 22px;
}

.avatar-description {
    margin-bottom: 25px;
    color: var(--trans-text-strong);
    font-size: 16px;
    text-align: center;
    max-width: 400px;
    align-self: center;
}

.avatar-selection-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 5px;
    width: 100%;
    max-width: 500px;
    padding: 10px;
    align-self: center;
}

.avatar-button {
    position: relative;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.3s ease;
    aspect-ratio: 1;
    background: none;
}

.avatar-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Hover Effects */
.avatar-button:hover {
    transform: translateY(-2px);
    border-color: var(--button-color);
}

.avatar-button:hover img {
    transform: scale(1.05);
}

/* Focus States */
.avatar-button:focus {
    outline: none;
    border-color: var(--button-color);
    box-shadow: 0 0 0 3px var(--button-color-transparent);
}

.avatar-button:focus:not(:focus-visible) {
    box-shadow: none;
}

/* Active/Selected State */
.avatar-button:active {
    transform: translateY(1px);
}

/* Selection Indicator */
.avatar-button::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--button-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.avatar-button:hover::after {
    opacity: 0.1;
}

.avatar-button.selected::after {
    opacity: 0.2;
}

/* Loading State */
.avatar-button.loading {
    cursor: wait;
    opacity: 0.7;
}


/* Animation Keyframes */
@keyframes avatarAppear {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .avatar-popup-body {
        padding: 20px;
    }

    .avatar-selection-container {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 15px;
    }

    .avatar-description {
        font-size: 14px;
        margin-bottom: 20px;
    }
}
/* sceneSelectorStyle.css */

.scene-selector-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scene-selector-header {
    color: white;
    margin-bottom: 2rem;
    font-size: 2rem;
    text-align: center;
}

.scene-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 1200px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 1rem;
}

.scene-button {
    background-color: #2a2a2a;
    color: white;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 1.5rem;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.scene-button:hover {
    background-color: #3a3a3a;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.scene-button-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.scene-button-description {
    font-size: 0.9rem;
    opacity: 0.8;
}

.scene-button-thumbnail {
    width: 100%;
    height: 100px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Styles for empty state */
.empty-state {
    color: #aaa;
    text-align: center;
    padding: 2rem;
    width: 100%;
}

.scene-error {
    color: #ff4d4d;
    background-color: rgba(255, 0, 0, 0.1);
    border-radius: 4px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    max-width: 100%;
    text-align: center;
}

/* Loading indicator when fetching scene config */
.scene-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    z-index: 1;
}

.scene-loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid #fff;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .scene-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .scene-button {
        min-height: 120px;
        padding: 1rem;
    }
    
    .scene-selector-header {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .scene-grid {
        grid-template-columns: 1fr;
    }
    
    .scene-selector-container {
        padding: 1rem;
    }
}
.notification {
    padding: 5px 10px;
    font-family: var(--primary-font);
    border-radius: 4px;
    color: white;
    background-color: #333;
    position: fixed;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.notification-flex-container {
    display: inline-flex;
    align-items: center; /* Aligns items vertically */
    justify-content: space-between; /* Distributes space between items */
    width: 100%; /* Ensure the container fills the notification width */
}

.notification-text {
    margin-right: 10px; /* Space between text and button */
}
/* Debug Menu Styles - Updated to Match Main App's Aesthetics */
@font-face {
  font-family: 'Roboto-Bold';
  src: url(f80816a5455d171f948d.ttf) format('truetype');
}


:root {
  --debug-primary-font: 'Roboto-Bold', "sans-serif";
  --debug-secondary-font: "Arial", "monospace";
  --debug-background-color: rgba(0, 0, 0, 0.8);
  --debug-backdrop-color: rgba(255, 255, 255, 0.403);
  --debug-loading-background-color: #000000;
  --debug-title-color: #ffffff;
  --debug-item-background-color: #00000094; /* Slightly different shade for item backgrounds */
  --debug-text-color: #d7d6d4;
  --debug-fog-color: #668daa;
  --debug-submit-area-color: #000000ab;
  --debug-border-color: #ffffff71; /* set0 --title-color, used for borders to add contrast */
  --debug-trans-text-light: rgba(162, 162, 162, 0.5);
  --debug-trans-text-strong: rgba(162, 162, 162, 0.8);
  --debug-button-color: #4CAF50;;
  --debug-button-hover-color: #3c8c3e;;
  --debug-button-remove-color: #c94940;
  --debug-XRButton-hover-color: #9c2d7e;
}

#debugContent {
  background: var(--debug-item-background-color); /* Using a slightly transparent black for contrast */
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Slight shadow for depth */
  text-align: center;
  max-height: 80%; /* Limiting the height to ensure it doesn't fill the entire screen */
  overflow-y: auto; /* Enabling vertical scroll */
  width: 60%; /* Adjust the width as needed, narrower content area */
  margin: auto; /* Centering the content area */
  color: var(--debug-text-color); /* Consistent text color for readability */
}

#debugMenu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--debug-background-color); /* Semi-transparent background */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  font-family: var(--debug-primary-font), sans-serif;
  color: var(--debug-text-color);
}

#debugContent button {
  display: block; /* Make buttons block to fill the container width */
  width: 80%; /* Adjust the width as needed */
  margin: 20px auto; /* Center buttons horizontally and add more space between them */
  padding: 15px 10px; /* Increase padding for a larger click area */
  border: 2px solid var(--debug-border-color); /* Make borders thicker for visibility */
  border-radius: 8px; /* Slightly larger radius for a modern look */
  cursor: pointer;
  background-color: var(--debug-button-color);
  color: var(--debug-text-color);
  font-size: 18px; /* Increase font size for readability */
  text-transform: uppercase; /* Optional: make the text uppercase for emphasis */
  transition: background-color 0.3s, transform 0.2s; /* Smooth transition for hover effect */
  text-align: center; /* Ensure text is centered */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Add a subtle shadow for depth */
}

#debugContent button:hover {
  background-color: var(--debug-button-hover-color);
  color: var(--debug-title-color); /* Change text color on hover */
  transform: translateY(-2px); /* Slight raise effect on hover */
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3); /* Enhanced shadow effect on hover */
}


#debugContent button:hover {
  background-color: var(--debug-button-hover-color);
  color: var(--debug-title-color); /* Change text color on hover for better visibility */
}

.player-info, .connection-info, .inventory-item {
  border: 1px solid var(--debug-border-color);
  background-color: var(--debug-item-background-color); /* Lighter or darker based on preference */
  color: var(--debug-text-color);
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 5px;
  text-align: left; /* Align text to the left for readability */
}

.player-info h3, .connection-info h3, .inventory-item h3 {
  color: var(--debug-title-color);
}

.player-info p, .connection-info p, .inventory-item p {
  margin: 5px 0;
}

.inventory-item {
  border: 1px solid var(--debug-border-color);
}

.inventory-item h3 {
  font-size: 18px;
}

.inventory-item p {
  font-size: 14px;
}

/* micModalStyles.css */

/* Base Variables */
:root {
    --mic-modal-z-index: 9999;
    --mic-modal-padding: 30px;
    --mic-modal-border-radius: 12px;
    --mic-modal-transition-duration: 0.3s;
    --mic-modal-max-width: 500px;
    --mic-modal-bg-color: rgba(16, 16, 16, 0.95);
    --mic-modal-overlay-color: rgba(0, 0, 0, 0.5);
    --mic-modal-border-color: #cccccc;
    --mic-modal-header-bg: rgba(0, 0, 0, 0.6);
    --mic-modal-text-color: #ffffff;
    --mic-modal-button-bg: #007bff;
    --mic-modal-button-hover-bg: #0056b3;
    --mic-modal-button-text-color: #ffffff;
    --mic-modal-secondary-button-bg: #6c757d;
    --mic-modal-secondary-button-hover-bg: #5a6268;
}

/* Base Modal Container */
.mic-modal-base {
    display: none;
    position: fixed;
    inset: 0;
    z-index: var(--mic-modal-z-index);
    justify-content: center;
    align-items: center;
    font-family: Arial, sans-serif;
    color: var(--mic-modal-text-color);
}

/* Modal Overlay */
.mic-modal-overlay {
    position: absolute;
    inset: 0;
    background-color: var(--mic-modal-overlay-color);
}

/* Modal Content Container */
.mic-modal-content {
    position: relative;
    z-index: 2;
    background-color: var(--mic-modal-bg-color);
    border-radius: var(--mic-modal-border-radius);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: var(--mic-modal-max-width);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform var(--mic-modal-transition-duration) ease-in-out;
}

.mic-modal-base .mic-modal-content {
    transform: scale(1);
}

/* Modal Header */
.mic-modal-header {
    padding: var(--mic-modal-padding);
    background-color: var(--mic-modal-header-bg);
    text-align: center;
    border-bottom: 1px solid var(--mic-modal-border-color);
}

.mic-modal-header h3 {
    margin: 0;
    font-size: 24px;
    color: var(--mic-modal-text-color);
}

/* Modal Body */
.mic-modal-body {
    padding: var(--mic-modal-padding);
    background-color: transparent;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mic-modal-context {
    font-size: 16px;
    margin-bottom: 20px;
}

.mic-modal-privacy-container {
    margin-bottom: 20px;
}

.mic-modal-privacy-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.mic-modal-privacy-header svg {
    margin-right: 8px;
}

.mic-modal-privacy-header span {
    font-weight: bold;
    font-size: 18px;
}

.mic-modal-privacy-list {
    list-style: disc;
    margin-left: 20px;
}

.mic-modal-privacy-list li {
    margin-bottom: 8px;
}

/* Button Group */
.mic-modal-button-group {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.mic-modal-primary-button,
.mic-modal-secondary-button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: var(--mic-modal-button-text-color);
    transition: background-color var(--mic-modal-transition-duration) ease;
}

.mic-modal-primary-button {
    background-color: var(--mic-modal-button-bg);
}

.mic-modal-primary-button:hover {
    background-color: var(--mic-modal-button-hover-bg);
}

.mic-modal-secondary-button {
    background-color: var(--mic-modal-secondary-button-bg);
}

.mic-modal-secondary-button:hover {
    background-color: var(--mic-modal-secondary-button-hover-bg);
}

/* Loader inside the button */
.mic-modal-button-loader {
    display: none;
    margin-left: 10px;
    border: 2px solid var(--mic-modal-button-text-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: mic-modal-spinner 0.6s linear infinite;
}

.mic-modal-primary-button.loading .mic-modal-button-text {
    visibility: hidden;
}

.mic-modal-primary-button.loading .mic-modal-button-loader {
    display: inline-block;
}

@keyframes mic-modal-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .mic-modal-content {
        width: 95%;
    }

    .mic-modal-header h3 {
        font-size: 20px;
    }

    .mic-modal-context {
        font-size: 14px;
    }

    .mic-modal-privacy-header span {
        font-size: 16px;
    }
}

/* iframePopup.css */
.iframePopup-content-container {
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 1000; /* Ensure this is higher than other elements */
    overflow: hidden;
    position: fixed; /* Ensure it's positioned correctly */
    top: 10px;
    right: 10px;
    width: 48%; /* Adjust width as needed */
    height: 95%; /* Adjust height as needed */
    animation: fadeInIframe 0.5s ease-in-out; /* Add the animation */
}

@keyframes fadeInIframe {
    from {
        opacity: 0;
        transform: scale(0.0); /* Include the scale transformation */
    }
    to {
        opacity: 1;
        transform: scale(1); /* Restore the size */
    }
}

.iframePopup-buttons {
    position: absolute;
    top: 5px; /* Adjust as needed to hover above the iframe */
    left: 5px;
    display: flex;
    gap: 5px;
    z-index: 1001; /* Ensure buttons are above other content */
}

.iframePopup-buttons button {
    background-color: transparent;
    color: #000;
    border: 1px solid #ccc;
    padding: 5px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 3px;
    transition: background-color 0.3s, transform 0.3s;
}

.iframePopup-buttons button:hover {
    background-color: rgba(255, 255, 255, 0.623);
}

/* Expanded state */
.iframePopup-content-container.expanded {
    width: 95%;
    height: 95%;
    top: 10px;
    right: 10px;
}

/* Custom scrollbar styles */
.iframePopup-content-container iframe {
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #ccc transparent; /* Firefox */
}

.iframePopup-content-container iframe::-webkit-scrollbar {
    width: 8px; /* Chrome, Safari, and Opera */
}

.iframePopup-content-container iframe::-webkit-scrollbar-thumb {
    background-color: #ccc; /* Chrome, Safari, and Opera */
    border-radius: 10px; /* Make the scrollbar thumb rounded */
}

.iframePopup-content-container iframe::-webkit-scrollbar-track {
    background-color: transparent; /* Chrome, Safari, and Opera */
}

/* Mobile view */
@media (max-width: 768px) {
    .iframePopup-content-container {
        top: auto;
        bottom: 0;
        right: 0;
        width: 100%;
        height: 50%; /* Adjust height to fit the lower half of the screen */
    }

    .iframePopup-buttons {
        top: 5px; /* Adjust as needed for mobile view */
        left: 5px;
    }
}

.fs-popup-content {
    z-index: 3;
    background-color: var(--popup-bg-color);
    border-radius: var(--popup-border-radius);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: var(--popup-max-width);
    max-height: var(--popup-max-height);
    overflow-y: auto;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
    color: var(--text-color);
    transform: scale(0.9);
    transition: transform var(--popup-transition-duration) cubic-bezier(0.175, 0.885, 0.32, 1.275),
                opacity var(--popup-transition-duration) ease;
}

.fs-description {
    margin: 20px;
    font-size: 14px;
}

.fs-list {
    list-style-type: none;
    padding: 0;
    margin: 0px;
}

.fs-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
}

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

.fs-file-name {
    flex-grow: 1;
    margin-right: 15px;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fs-select-button,
.fs-delete-button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.fs-select-button {
    background-color: var(--button-color);
    color: var(--title-color);
    margin-right: 10px;
}

.fs-select-button:hover {
    background-color: var(--button-hover-color);
    transform: translateY(-2px);
}

.fs-delete-button {
    background-color: var(--delete-button-color);
    color: var(--delete-button-text-color);
}

.fs-delete-button:hover {
    background-color: var(--delete-button-hover-color);
    transform: translateY(-2px);
}

/* For WebKit browsers (Chrome, Safari, etc.) */
.fs-popup-content::-webkit-scrollbar {
    width: 8px;
}

.fs-popup-content::-webkit-scrollbar-track {
    background: rgba(22, 21, 21, 0.693);
    border-radius: 4px;
    margin: 4px;
}

.fs-popup-content::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.fs-popup-content::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Optional: Style for when scrollbar is in a corner */
.fs-popup-content::-webkit-scrollbar-corner {
    background: transparent;
}


@media screen and (max-width: 600px) {
    
    .fs-list-item {
        flex-direction: column;
        align-items: stretch;
    }

    .fs-file-name {
        margin-bottom: 10px;
    }

    .fs-select-button,
    .fs-delete-button {
        width: 100%;
        margin: 5px 0;
    }

    
}

/* Animations */
@keyframes slideUpAchievement {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeOutAchievement {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Achievement Container */
#achievement-container {
    position: fixed;
    top: calc(6.3% + 40px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    font-family: var(--primary-font);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60%;
    max-width: 800px;
}

/* Achievement Notification */
.achievement-notification {
    background: linear-gradient(135deg, var(--background-color), var(--submit-area-color));
    color: var(--text-color);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 15px;
    width: 80%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideUpAchievement 0.5s ease-out, fadeOutAchievement 0.5s ease-in 4.5s;
    backdrop-filter: blur(10px);
    border: 1px solid var(--trans-text-light);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.achievement-notification:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.achievement-notification h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--title-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.achievement-notification p {
    margin: 0;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.6;
}

.achievement-notification.completed {
    background: linear-gradient(135deg, var(--button-color), var(--button-hover-color), var(--button-color));
    background-size: 200% 200%;
    color: var(--title-color);
    border: 2px solid var(--title-color);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
    animation: 
        slideUpAchievement 0.5s ease-out,
        fadeOutAchievement 0.5s ease-in 4.5s,
        pulseCompletedAchievement 2s ease-in-out infinite,
        gradientShift 3s ease infinite;
}

.achievement-notification.completed h3 {
    color: var(--title-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.achievement-notification.completed p {
    color: var(--title-color);
    opacity: 0.9;
}

@keyframes pulseCompletedAchievement {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#timeline-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60%;
    height: 6.3%;
    max-width: 800px;
    background-color: transparent;
}

.achievement-container {
    width: 100%;
    margin-bottom: 20px;
}

.achievement-label {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 8px;
    background-color: rgba(0, 0, 0, 0.4);
    font-size: 16px;
    font-weight: 400;
    padding: 5px;
    border-radius: 4px;
}

.achievement-tooltip {
    background-color: var(--background-color);
    color: var(--title-color);
    padding: 5px 10px;
    border-radius: 4px;
    width: 50%;
    font-size: 14px;
    pointer-events: none;
    z-index: 1001;
    position: absolute;
    white-space: normal;
}

.achievement-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent var(--background-color) transparent;
}

.achievement-timeline {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    position: relative;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.371);
    overflow: visible;
    transition: all 0.3s ease;
}

.achievement-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    position: absolute;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.milestone-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-color);
    border: 2px solid transparent;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.518);
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    z-index: 1;
    cursor: pointer;
}

.milestone-dot.reached {
    background-color:  #2ecc71;
    border-color: var(--text-color);
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 0 10px  #2ecc71;
}

.milestone-dot:hover {
    transform: translate(-50%, -50%) scale(1.4);
    box-shadow: 0 0 15px var(--button-hover-color);
}

@media (max-width: 768px) {
    #timeline-container, #achievement-container {
        width: 90%;
    }

    .achievement-label {
        font-size: 14px;
    }

    .milestone-dot {
        width: 6px;
        height: 6px;
    }

    .achievement-tooltip {
        width: 70%;
        font-size: 12px;
    }

    .achievement-notification {
        width: 90%;
    }
}

#quiz-container .popup-header {
  padding: 15px 20px; 
  border-bottom: none; 
  min-height: auto;   
  background-color: #9c9c9c00;
}

#quiz-container.popup-base.style-minimal .popup-header {
}

#quiz-container .popup-base:not(.style-minimal) .popup-content {
  background: linear-gradient(135deg, rgba(156, 156, 156, 0.316) 0%, rgba(110, 110, 110, 0.382) 100%);
}


#quiz-container.popup-base.style-minimal .popup-content {
  background: transparent;
}

#quiz-container .popup-body {
  background-color: #9c9c9c00;
}

#quiz-container .popup-header h2 {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.quiz-question-wrapper {
  flex: 1 1 auto;
  overflow-y: none;
  padding: 2%;
  background-color: rgba(35, 35, 35, 0);
  border-radius: 12px;
  width: auto;
  margin-bottom: 1px;
}

.quiz-answers-wrapper {
  flex: 0 1 auto;
  overflow-y: auto; 
  height: 45vh;
  background-color: transparent;
  margin-bottom: 20px;
  border-radius: 12px;
  width: auto;
  display: flex;
  flex-direction: column;
}

.quiz-answer.selected {
  background-color: var(--button-color);
  color: var(--title-color);
}

.quiz-question {
  display: flex;
  align-items: center;
  flex-direction: column;
  font-size: 30px;
  font-weight: 300;
  width: 100%;
  line-height: 1.1;
  padding: 5px;
}

.quiz-question p {
  font: 0.7em sans-serif;
}

.quiz-question img {
  max-width: 100%;
  height: auto;
  margin-top: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.quiz-answers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  border-radius: 12px;
  align-items: center;
}

/* Quiz answer default state */
.quiz-answer {
  background-color: rgb(0, 0, 0); 
  color: var(--text-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 
  inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 6px;
  padding: 15px 20px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  font-size: 22px;
  font-style: italic;

  line-height: 1.1;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#quiz-container.style-minimal .quiz-answer {
  background-color: transparent;
  width: 50%;
  box-shadow: none;
  border: solid 2px rgba(255, 255, 255, 0.2);
}

/* Hover state */
.quiz-answer:hover {
  background-color: rgba(131, 131, 131, 0.95); 
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15),
             inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Selected state (before submission) */
.quiz-answer.selected {
  background-color: rgba(156, 156, 156, 0.316);
  border: 3px solid rgb(255, 255, 255);
  box-shadow: 0 4px 6px rgba(66, 153, 225, 0.3),
             inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Correct answer state */
.quiz-answer.correct {
  background: linear-gradient(
    135deg, 
    rgba(72, 187, 120, 0.95) 0%,
    rgba(56, 161, 105, 0.95) 100%
  );
  color: white;
  border: 1px solid rgba(72, 187, 120, 0.3);
  box-shadow: 0 4px 6px rgba(72, 187, 120, 0.3),
             inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Incorrect answer state */
.quiz-answer.incorrect {
  background: linear-gradient(
    135deg,
    rgba(245, 101, 101, 0.95) 0%,
    rgba(229, 62, 62, 0.95) 100%
  );
  color: white;
  border: 1px solid rgba(245, 101, 101, 0.3);
  box-shadow: 0 4px 6px rgba(245, 101, 101, 0.3),
             inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Correct and incorrect states hover */
.quiz-answer.correct:hover,
.quiz-answer.incorrect:hover {
  transform: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15),
             inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.quiz-answer img {
  display: flex;
  align-self: center;
  max-width: 30%;
  width: 20%;
  height: auto;
  border-radius: 12px;
  margin: 2%;
}

/* Common scrollbar styles for both elements */
.quiz-question-wrapper,
.quiz-answers-wrapper {
  scrollbar-width: thin; /* For Firefox */
  scrollbar-color: rgb(255, 255, 255) var(--scrollbar-color); /* For Firefox */
}



/* WebKit scrollbar styles for both elements */
.quiz-question-wrapper::-webkit-scrollbar,
.quiz-answers-wrapper::-webkit-scrollbar {
  width: 8px;
}

.quiz-question-wrapper::-webkit-scrollbar-track,
.quiz-answers-wrapper::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.quiz-question-wrapper::-webkit-scrollbar-thumb,
.quiz-answers-wrapper::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-color);
  border-radius: 10px;
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.quiz-submit {
  margin-top: 10px;
  padding: 10px 10px;
  width: 50%;
  background-color: rgb(80, 80, 80);
  color: var(--title-color);
  border:rgb(164, 164, 164) 2px solid;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  align-self: center;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quiz-submit:hover:not(:disabled) {
  background-color: var(--button-hover-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.quiz-submit:disabled {
  cursor: not-allowed;
}

/* Quiz Feedback Styles */
.quiz-feedback {
  display: none;
}

.quiz-feedback.show {
  opacity: 1;
  transform: translateY(0);
}

.quiz-feedback.correct {
  background-color: var(--button-color);
  color: var(--title-color);
}

.quiz-feedback.incorrect {
  background-color: var(--button-remove-color);
  color: var(--title-color);
}

/* Quiz Results Styles */
.quiz-results {
  text-align: center;
  padding: 40px 30px;
}

.quiz-results h2 {
  color: var(--title-color);
  font-size: 2.2em;
  margin-bottom: 25px;
}

.quiz-results p {
  font-size: 1.4em;
  color: var(--text-color);
  margin-bottom: 25px;
  line-height: 1.6;
}

/* Quiz Progress Bar Styles */
.quiz-progress-bar {
  width: 100%;
  height: 10px;
  background-color: rgba(0, 0, 0, 0.02);
  border-radius: 15px;
  overflow: hidden;
  display: flex;
  margin-top: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);

}

.quiz-progress-segment {
  flex: 1;
  height: 50%;
  position: relative;
  align-self: center;
  transition: background-color 0.3s ease;
}

.quiz-progress-segment::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: inherit;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease-out;
}

.quiz-progress-segment.filled::before {
  transform: scaleX(1);
}

/* Progress bar segments updated to match */
.quiz-progress-segment.correct {
  background: linear-gradient(
    to right,
    rgba(72, 187, 120, 0.95),
    rgba(56, 161, 105, 0.95)
  );
}

.quiz-progress-segment.incorrect {
  background: linear-gradient(
    to right,
    rgba(245, 101, 101, 0.95),
    rgba(229, 62, 62, 0.95)
  );
}
.question-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1;
}

.quiz-progress-segment.show-number .question-number {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Animation for question numbers */
@keyframes popIn {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  70% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.quiz-progress-segment.show-number .question-number {
  animation: popIn 0.5s forwards;
}

/* Quiz Score Circle */
.quiz-score-circle {
  width: 150px;
  height: 150px;
  margin: 0 auto;
}

.circular-chart {
  display: block;
  margin: 10px auto;
  max-width: 80%;
  max-height: 250px;
}

.circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 3.8;
}

.circle {
  fill: none;
  stroke: #fff;
  stroke-width: 2.8;
  stroke-linecap: round;
  transition: stroke-dasharray 0.8s ease;
}

.quiz-percentage {
  fill: #fff;
  font-family: sans-serif;
  font-size: 0.5em;
  text-anchor: middle;
}

@media (max-width: 768px) {
  /* Container and Layout */
  #quiz-container .popup-content {
    padding: 12px;
    max-height: 95vh;
  }

  #quiz-container .popup-header {
    padding: 8px 12px;
    margin-bottom: 8px;
  }

  

  #quiz-container .popup-header h2 {
    font-size: 14px;
    letter-spacing: 0.3px;
  }

  /* Question Section */
  .quiz-question-wrapper {
    padding: 12px 8px;
    margin-bottom: 12px;
  }

  .quiz-question {
    font-size: 20px;
    padding: 0;
    margin-bottom: 16px;
    text-align: center;
    line-height: 1.4;
  }

  .quiz-question img {
    margin-top: 12px;
    border-radius: 8px;
    max-height: 200px;
    object-fit: cover;
  }

  /* Answers Section */
  .quiz-answers-wrapper {
    height: auto;
    max-height: 60vh;
    padding: 0 4px;
    margin-bottom: 12px;
  }

  .quiz-answers {
    gap: 10px;
    padding: 4px 0;
  }

  .quiz-answer {
    padding: 12px 16px;
    font-size: 16px;
    min-height: 44px;
    border-radius: 8px;
    font-style: normal;
  }

  .quiz-answer img {
    max-width: 40%;
    margin: 8px 0;
  }

  /* Better touch targets */
  .quiz-answer:hover {
    transform: translateY(-1px);
  }

  .quiz-answer.selected {
    transform: scale(0.98);
    border-width: 2px;
  }

  /* Progress Bar */
  .quiz-progress-bar {
    height: 6px;
    margin-top: 12px;
    border-radius: 8px;
  }

  .quiz-progress-segment {
    height: 100%;
  }

  .question-number {
    font-size: 11px;
  }

  /* Submit Button */
  .quiz-submit {
    width: 80%;
    padding: 12px;
    font-size: 16px;
    margin-top: 16px;
    height: 44px;
  }

  /* Results View */
  .quiz-results {
    padding: 20px 16px;
  }

  .quiz-results h2 {
    font-size: 1.8em;
    margin-bottom: 16px;
  }

  .quiz-results p {
    font-size: 1.1em;
    line-height: 1.4;
  }

  /* Score Circle */
  .quiz-score-circle {
    width: 120px;
    height: 120px;
  }

  .circular-chart {
    max-width: 70%;
    max-height: 200px;
  }

  /* Scrollbar */
  .quiz-answers-wrapper::-webkit-scrollbar {
    width: 4px;
  }

  /* Close Button */
  #quiz-close-btn {
    padding: 6px;
  }

  #quiz-close-btn svg {
    width: 20px;
    height: 20px;
  }
}

/* Additional breakpoint for very small devices */
@media (max-width: 380px) {
  .quiz-question {
    font-size: 18px;
  }

  .quiz-answer {
    font-size: 14px;
    padding: 10px 12px;
  }

  .quiz-submit {
    width: 90%;
    font-size: 14px;
  }

  .quiz-results h2 {
    font-size: 1.5em;
  }

  .quiz-score-circle {
    width: 100px;
    height: 100px;
  }
}

/* Base container */
.ui-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  font-family: 'Arial', sans-serif;
}

/* Frame - Default Style */
.ui-frame {
  position: absolute;
  background-color: transparent;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0);
  overflow: hidden;
  color: #333;
  pointer-events: auto;
  transition: all 0.3s ease;
  overflow-y: auto;
}

/* Frame - Chalkboard Style */
.ui-frame.chalkboard {
  padding: 10px;
  background-color: transparent;
  position: relative;
  font-family: 'Architects Daughter', 'Gloria Hallelujah', 'Kalam', cursive;
  border: 2px dashed #e8e8e895;
  border-style: dashed;

}

/* Frame subtitle */
.ui-frame.ui-subtitle-frame {
  font-size: 1.5vw;
  font-family: 'Arial', sans-serif;
  color: white;
  text-align: center;
  overflow: hidden;
}

/* Frame List styles */
.ui-frame.frame-list > * {
  position: relative !important;
  margin: 10px 0;
  left: 0 !important;
  top: 0 !important;
  transform: none !important;
}

@media (max-width: 1024px) {
  .ui-frame {
    width: 100%;
    max-width: auto;
    max-height: auto;
    padding: 0px;
    border-radius: 7px;
  }

  .ui-frame.chalkboard {
    padding: 2px;
    border-width:0px;
  }

  .ui-frame.ui-subtitle-frame {
    font-size: 16px;
  }
}

/* Base Button */
.ui-button {
  position: absolute;
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: 0.3rem;
  cursor: pointer;
  font-size: 20px;
  font-weight: 400;
  transition: all 0.3s ease;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--primary-font);
}

/* Base Button Blink effect */
.ui-button.blink {
  animation: blink 1s infinite;
}

/* Default Style */
.ui-button.default {
  background-color: #f0f0f0;
  text-align: start;
  color: #333;
}

.ui-button.default:hover {
  background-color: #e0e0e0;
  transform: translateY(-px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Chalkboard Style */
.ui-button.chalkboard {
  background-color: transparent;
  min-height: fit-content;
  color: rgb(255, 255, 255);
  font-family: 'Helvetica Neue', sans-serif;
  text-transform: uppercase;
  font-size: 14px;
  justify-content: flex-start !important;
  text-align: left !important;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.25);
}

.ui-button.chalkboard:hover {
  background-color: rgb(255, 255, 255);
  transform: scale(1.02);
  box-shadow: none;
}

.ui-button.chalkboard:active {
  transform: scale(0.98);
}

/* Special Buttons - Base Styles */
.ui-button.replay,
.ui-button.proceed,
.ui-button.goBack {
  background-color: transparent;
  border: 2px solid #ffffff89;
  color: #ffffff;
  width: auto;
  height: auto;
  border-radius: 28px;
  position: relative;
  overflow: visible;
  transition: all 0.3s ease;
  font-size: 12px;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

/* Replay Button */
.ui-button.replay {
  padding: 5px 15px 5px 56px;
}

.ui-button.replay::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 28px;
  width: 24px;
  height: 24px;
  border: 2px solid #ffffff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.ui-button.replay::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 28px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  padding: 4px;
  transform: translate(-30%, -50%) rotate(135deg);
  transition: all 0.3s ease;
}

/* Proceed Button */
.ui-button.proceed {
  padding: 5px 56px 5px 15px;
}

.ui-button.proceed::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 28px;
  width: 24px;
  height: 24px;
  border: 2px solid #ffffff;
  border-left: 2px solid transparent;
  border-radius: 50%;
  transform: translate(50%, -50%);
  transition: all 0.3s ease;
}

.ui-button.proceed::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 28px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  padding: 4px;
  transform: translate(0, -50%) rotate(-45deg);
  transition: all 0.3s ease;
}

/* Go Back Button */
.ui-button.goBack {
  padding: 5px 15px 5px 56px;
}

.ui-button.goBack::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 28px;
  width: 24px;
  height: 24px;
  border: 2px solid #ffffff;
  border-right: 2px solid transparent;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.ui-button.goBack::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 28px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  padding: 4px;
  transform: translate(-60%, -50%) rotate(135deg);
  transition: all 0.3s ease;
}

/* Special Buttons Hover States */
.ui-button.replay:hover,
.ui-button.proceed:hover,
.ui-button.goBack:hover {
  background-color: #ffffff;
  color: #000000;
  transform: scale(1.05);
}

.ui-button.replay:hover::before,
.ui-button.proceed:hover::before,
.ui-button.goBack:hover::before {
  border-color: #000000;
}

.ui-button.replay:hover::before { border-top-color: transparent; }
.ui-button.proceed:hover::before { border-left-color: transparent; }
.ui-button.goBack:hover::before { border-right-color: transparent; }

.ui-button.replay:hover::after,
.ui-button.proceed:hover::after,
.ui-button.goBack:hover::after {
  border-color: #000000;
}

/* Special Buttons Active States */
.ui-button.replay:active,
.ui-button.proceed:active,
.ui-button.goBack:active {
  transform: scale(0.95);
}

/* Special Expand Button */
.ui-button.expand {
  background-color: transparent;
  border: 2px solid rgba(255, 255, 255, 0);
  border-radius: 4px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s ease;
}

/* SVG styling */
.ui-button.expand .expand-icon {
  width: 100%;
  height: 100%;
  /*svg stroke color*/
  stroke: #ffffffa9;
  stroke-width: 1;
  fill: none;
}

.ui-button.expand .expand-icon:hover {
  fill: rgb(255, 255, 255);
}

/* Special Info Button */
/* Info Button */
.ui-button.info {
  background-color: transparent;
  border: 2px solid rgba(255, 255, 255, 0);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s ease;
}

/* SVG styling */
.ui-button.info .info-icon {
  width: 100%;
  height: 100%;
}

/* Circle styling */
.ui-button.info .info-icon circle {
  fill: transparent;
  stroke: #ffffffaa;
  stroke-width: 1;
}

/* Text styling */
.ui-button.info .info-icon text {
  fill: #ffffffb1;
  font-size: 22px;
  font-family: serif;
  font-weight: bold;
}

/* Hover state */
.ui-button.info:hover {
  transform: scale(1.1);
}

.ui-button.info:hover .info-icon circle {
  fill: rgba(255, 255, 255, 0.561);
}

/* Active state */
.ui-button.info:active {
  transform: scale(0.95);
}

/* Animation for replay button */
@media (prefers-reduced-motion: no-preference) {
  .ui-button.replay:hover::before {
    animation: spin 0.8s linear infinite;
  }
}

/* Blink animation */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(-360deg); }
}

/* Responsive design for special buttons */
@media (max-width: 1400px) {

  .ui-button.replay::before,
  .ui-button.replay::after {
    left: 50%;
  }

  .ui-button.proceed::before,
  .ui-button.proceed::after {
    right: 50%;
  }

  .ui-button.goBack::before,
  .ui-button.goBack::after {
    left: 50%;
  }

  .ui-button.replay span,
  .ui-button.proceed span,
  .ui-button.goBack span {
    display: none;
  }
  
}

@media (max-width: 1180px) {

  .ui-button {
    padding: 5px 5px;
  }

  .ui-button.ui-button.goBack,
  .ui-button.ui-button.proceed,
  .ui-button.ui-button.replay {
    border-radius: 6px;
    width: 16px;
    height: 56px;
    border: solid 1px #ffffff00;
    font-size: 10px;
    padding: 10px;
  }

  .ui-button.chalkboard {
    font-size: 14px;
    overflow-wrap:break-word;
    /* how to force it not to use capital letters */
    text-transform: none;
  }

  .ui-button.expand {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    position: fixed !important;
    padding: 6px !important;
  }
  
  .ui-button.expand .expand-icon {
    width: 100% !important;
    height: 100% !important;
  }

  .ui-button.info {
    width: 36px;
    height: 36px;
  }
  
  .ui-button.info .info-icon text {
    font-size: 20px;
  }
}


@media (max-width: 768px) {

  .ui-button.chalkboard {
    font-size: 10px;
  }

  .ui-button.replay,
  .ui-button.proceed,
  .ui-button.goBack {
    padding: 5px;
  }

}
/* Base Text Style */
.ui-text {
  position: absolute;
  color: #c7c7c7;
  font-size: 15px;
  pointer-events: auto;
  transition: all 0.3s ease;
  line-height: 1.6;
  display: flex;
  align-items: center;
  min-height: 32px;
}

/* Chalkboard Theme */
.ui-text.chalkboard {
  font-family: 'Chalkboard SE', 'Marker Felt', sans-serif;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  font-weight: normal;
  position: relative;
}

/* Base styling for list elements */
.ui-text.chalkboard.ui-list-element {
  position: relative;  /* Container for bullet point */
  font-size: 18px;
}

/* Bullet point */
.ui-text.chalkboard.ui-list-element::before {
  content: '';
  position: absolute;
  left: 0px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 30px;
  line-height: 32px;  /* Match the min-height */
  height: 32px;
  display: flex;
  align-items: center;
}

/* Chalk underline */
.ui-text.chalkboard:not(.ui-list-active)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 10px;  /* Adjust this value to move underline up/down */
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.431);
}

@media (max-width: 1300px) {
  .ui-text {
    font-size: 12px;
    line-height: 1.0;
  }
  
  .ui-text.chalkboard {
    font-size: 12px;
    letter-spacing: 0.2px;
  }
}


/* Responsive Adjustments */
@media (max-width: 768px) {
  .ui-text {
    font-size: 10px;
    line-height: 1.0;
  }
  
  .ui-text.chalkboard {
    font-size: 10px;
    letter-spacing: 0.2px;
  }
}
/* Base styles for list elements */
.ui-list-element {
    transition: all 0.01s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1.0;
  }
  
  /* Text elements */
  .ui-text.ui-list-element.ui-list-active {
    transform: scale(1.1);
    color: #FFD700 !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    position: relative;
  }


  .ui-text.ui-list-element.ui-list-inactive {
    opacity: 0.5;
  }
  
  /* Chalkboard theme text */
  .ui-text.chalkboard.ui-list-element.ui-list-active {
    color: #ffffff !important;
    letter-spacing: 1px;
  }
  
  .ui-button.ui-list-element.ui-list-active {
    background-color: rgb(29, 73, 131) !important;
    color: white !important;
    font-weight: 900 !important;
    box-shadow: 0 0 20px rgba(108, 134, 227, 0.5);
  }
  
  .ui-button.ui-list-element.ui-list-inactive {
    opacity: 0.6;
    background-color: #9e9e9e15;
  }
  
  .ui-frame.ui-list-element.ui-list-active {
    background-color: rgba(26, 48, 78, 0.707);
    box-shadow: 0 0 20px rgba(108, 134, 227, 0.3);
    transform: scale(1.05);
  }
  
  .ui-list-element[data-ui-category="tutorial"].ui-list-active {
    --ui-active-color: #2196F3;
    border: 2px solid #2196F3;
  }
  
  .ui-list-element[data-ui-category="navigation"].ui-list-active {
    --ui-active-color: #FF9800;
    border: 2px solid #FF9800;
  }

  .ui-button.list-item-completed {
    background-color: rgba(29, 73, 131, 0.7) !important;
    color: white !important;

  }

  .ui-button.list-item-completed::after {
    content: '     ✔';
    color: rgb(255, 255, 255);
    font-weight: 900;
    font-style: bold;
}

#pdf-overlay {
    position: fixed;
    overflow: hidden; 
    top: 5%;
    left: 5%;
    right: 5%;
    bottom: 5%; 
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

#pdf-canvas {
    position: relative;
    top: 10px;
    margin-bottom: 20px;
}

.pdf-buttons-container {
    position: absolute;
    bottom: 10px;
    left: 50%; 
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    width: 100%;
}

#pdf-overlay button {
    padding: 10px 15px; 
    margin: 0 10px; 
    font-size: 1em;
    border: none;
    background-color: var(--background-color); 
    color: var(--text-color);
    border-radius: 8px; 
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5); 
    cursor: pointer;
    font-family: var(--primary-font);
    transition: background-color 0.3s, transform 0.3s; 
}

#pdf-overlay button:hover {
    background-color: var(--title-color);
}

#close-pdf-btn {
    position: absolute;
    top: 10px;
    right: 10px;
}

#prev-page-btn {
    position: absolute;
    left: 10px;
    bottom: 10px;
}

#next-page-btn {
    position: absolute;
    right: 10px;
    bottom: 10px;
}

.zoom-btn {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 15px;
    margin: 0 10px;
}

#zoom-in-btn {
    bottom: 60px;
}

#zoom-out-btn {
    bottom: 10px;
}
/* learningUI.css */

.learning-steps-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 340px;
    max-height: 80vh;
    overflow: hidden;
    z-index: 100;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    transform: translateY(0);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 1;
  }
  
  .learning-steps-container.showing {
    animation: fadeInUp 0.3s ease-out forwards;
  }
  
  .learning-steps-container.hiding {
    animation: fadeOutDown 0.3s ease-in forwards;
  }
  
  @keyframes fadeInUp {
    from {
      transform: translateY(50%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  
  @keyframes fadeOutDown {
    from {
      transform: translateY(0);
      opacity: 1;
    }
    to {
      transform: translateY(50%);
      opacity: 0;
    }
  }
  
  .learning-steps-panel {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px) saturate(150%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
  }
  
  .learning-steps-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.322);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
  }
  
  .module-info {
    display: flex;
    align-items: baseline;
    flex-grow: 1;
    margin-right: 8px;
  }
  
  .learning-steps-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #e8e8e8;
  }
  
  .module-progress {
    font-size: 12px;
    color: #555;
    background: #e9ecef;
    padding: 2px 10px;
    border-radius: 10px;
    margin-left: 10px;
    white-space: nowrap;
  }
  
  .collapse-toggle {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
  }
  
  .collapse-toggle:hover {
    background: rgba(0, 0, 0, 0.06);
  }
  
  .collapse-toggle .collapse-icon {
    fill: #222;
    transition: transform 0.2s ease;
    width: 20px;
    height: 20px;
  }
  
  .collapse-toggle.collapsed .collapse-icon {
    transform: rotate(180deg);
  }
  
  .collapsible-content {
    transition: max-height 0.3s ease, opacity 0.2s ease;
    opacity: 1;
    overflow: hidden;
    max-height: 1000px; /* large default to accommodate content */
  }
  
  .learning-steps-content {
    max-height: 320px;
    background-color: #000000a0;
    overflow-y: auto;
  }
  
  /* Steps list items */
  .learning-step {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    gap: 10px;
    position: relative;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease;
  }
  
  .learning-step:hover {
    background: rgba(0, 0, 0, 0.04);
  }
  
  .learning-step.current {
    background: rgba(51, 155, 240, 0.138);
    border-left-color: #339af0;
  }
  
  .learning-step.completed {
    border-left-color: #40c057;
  }
  
  .step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e9ecef;
    color: #495057;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.2s ease;
  }
  
  .learning-step.current .step-indicator {
    background: #339af0;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(51, 154, 240, 0.2);
  }
  
  .learning-step.completed .step-indicator {
    background: #40c057;
    color: #fff;
  }
  
  .check-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
  }
  
  .step-content {
    flex-grow: 1;
  }
  
  .step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }
  
  .step-title {
    font-size: 14px;
    font-weight: 300;
    color: #333;
    line-height: 1.4;
    margin-bottom: 2px;
  }
  
  .learning-step.current .step-title {
    color: #339af0;
    font-weight: 600;
  }
  
  .learning-step.completed .step-title {
    color: #40c057;
  }
  
  /* Info button */
  .info-button {
    background: #339af0;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    padding: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
  }
  
  .info-button:hover {
    background: #228be6;
    transform: scale(1.05);
  }
  
  .info-button svg {
    fill: white;
    width: 16px;
    height: 16px;
  }
  
  /* Current Step details at the bottom */
  .current-step-details {
    padding: 16px;
    background: rgba(255, 255, 255, 0.635);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
  }
  
  .current-step-header {
    font-size: 12px;
    font-weight: 600;
    color: #339af0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
  }
  
  .current-step-title {
    font-size: 15px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 6px;
  }
  
  .current-step-instructions {
    font-size: 13px;
    color: #495057;
    line-height: 1.6;
    white-space: pre-line;
  }
  
  .learning-steps-panel.collapsed .collapsible-content {
    max-height: 0;
    opacity: 0;
  }
  
  .learning-steps-panel.collapsed {
    background: transparent;
    box-shadow: none;
  }
  
  .learning-steps-panel.collapsed .learning-steps-header {
    border-radius: 16px;
    margin-bottom: 0;
    border-bottom: none;
  }
  
  .learning-steps-panel.collapsed .learning-steps-content,
  .learning-steps-panel.collapsed .current-step-details {
    display: none;
  }
  
  .learning-steps-content::-webkit-scrollbar {
    width: 6px;
  }
  .learning-steps-content::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 3px;
  }
  .learning-steps-content::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 3px;
  }
  .learning-steps-content::-webkit-scrollbar-thumb:hover {
    background: #ced4da;
  }
  
  /* Step completion animation */
  @keyframes stepComplete {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
  }
  
  .learning-step.completed .step-indicator {
    animation: stepComplete 0.3s ease;
  }
  
  @media (prefers-color-scheme: dark) {
    .learning-steps-panel {
      background: rgba(33, 37, 41, 0.6);
      border-color: rgba(255, 255, 255, 0.1);
    }
    .learning-steps-header {
      background: rgba(33, 37, 41, 0.3);
      border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    .learning-step:hover {
      background: rgba(255, 255, 255, 0.05);
    }
    .learning-step.current {
      background: rgba(51, 154, 240, 0.1);
    }
    .step-title {
      color: #dee2e6;
    }
    .current-step-details {
      background: rgba(33, 37, 41, 0.3);
      border-top-color: rgba(255, 255, 255, 0.1);
    }
    .current-step-title {
      color: #f8f9fa;
    }
    .current-step-instructions {
      color: #dee2e6;
    }
    .collapse-toggle .collapse-icon {
      fill: #eee;
    }
    .module-progress {
      background: rgba(255, 255, 255, 0.1);
      color: #fff;
    }
  }
  
  @media (max-width: 768px) {
    .learning-steps-container {
      width: calc(100% - 40px);
      right: 20px;
      bottom: 20px;
    }
    .learning-steps-content {
      max-height: 200px;
    }
  }
  
/***************************************************************
 * Side Panel Layout
 ***************************************************************/
 .learning-editor-sidepanel {
  position: fixed;
  top: 0;
  right: 0;
  width: 30%;
  height: 100%;
  background-color: #2e2e2e;
  box-shadow: -2px 0 6px rgba(0,0,0,0.4);
  transform: translateX(110%);
  transition: transform 0.3s ease;
  z-index: 99998;
  display: flex;
  flex-direction: column;
  pointer-events: auto; /* ensures panel intercepts the mouse */
}

.learning-editor-sidepanel.open {
  transform: translateX(0%);
}

/* Header with close/back buttons */
.lesp-header {
  display: flex;
  align-items: center;
  background: #3c3c3c;
  padding: 10px 15px;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.1);
}

.lesp-header-title {
  flex: 1;
  text-align: center;
  color: #ffffff;
  margin: 0;
  font-weight: 600;
  font-size: 16px;
}

.lesp-icon-btn {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  margin: 0 5px;
  font-size: 18px;
  transition: color 0.2s ease;
}

.lesp-icon-btn:hover {
  color: #ffca28; /* highlight color */
}

.lesp-icon {
  pointer-events: none;
}

#lesp-close-btn .lesp-icon-close {
  font-size: 22px; /* slightly larger X */
}

#lesp-back-btn .lesp-icon-arrow {
  font-size: 16px; /* smaller arrow */
}

/* Body */
.lesp-body {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background-color: #2e2e2e;
}

/* Container for each "screen" */
.lesp-screen-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/***************************************************************
 * Buttons
 ***************************************************************/
.lesp-btn {
  display: inline-block;
  padding: 8px 14px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  outline: none;
}

.lesp-btn:hover {
  transform: translateY(-1px);
}

.lesp-add-btn {
  background-color: #007bff;
  color: #ffffff;
}

.lesp-add-btn:hover {
  background-color: #0092ff;
}

.lesp-action-btn {
  background-color: transparent;
  color: #ddd;
  border: 1px solid #555;
  margin-left: 4px;
}

.lesp-action-btn:hover {
  background-color: #555;
  color: #fff;
}

/***************************************************************
 * Lists
 ***************************************************************/
.lesp-list {
  background-color: #3a3a3a;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #444;
}

.lesp-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #444;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.lesp-list-item:last-child {
  border-bottom: none;
}

.lesp-list-item:hover {
  background-color: #4c4c4c;
}

.lesp-item-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lesp-item-title {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

.lesp-item-status {
  font-size: 12px;
  color: #bbb;
}

.lesp-item-actions {
  display: flex;
  gap: 8px;
}

.lesp-edit-btn,
.lesp-delete-btn {
  font-size: 12px;
  padding: 4px 8px;
}

/***************************************************************
 * Drag & Drop
 ***************************************************************/
.lesp-step-item-draggable.dragging {
  opacity: 0.4;
}

.lesp-step-item-draggable.drag-over {
  outline: 1px dashed #ffca28;
  background-color: #505050;
}

/***************************************************************
 * Forms
 ***************************************************************/
.lesp-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  background-color: #3a3a3a;
  padding: 20px;
  border-radius: 4px;
  border: 1px solid #444;
}

.lesp-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lesp-form-group label {
  color: #fff;
  font-weight: 500;
  font-size: 13px;
}

.lesp-form input,
.lesp-form select,
.lesp-form textarea {
  padding: 8px;
  background: #2e2e2e;
  color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
  font-size: 14px;
}

.lesp-form textarea {
  resize: vertical;
  min-height: 60px;
}

.lesp-form h3,
.lesp-form h4 {
  color: #ffca28;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.lesp-instructions {
  margin: 0;
  font-size: 12px;
  color: #ccc;
}

.lesp-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.lesp-submit-btn {
  background-color: #28a745;
  color: #fff;
}

.lesp-submit-btn:hover {
  background-color: #34ce57;
}

.lesp-cancel-btn {
  background: transparent;
  color: #fff;
  border: 1px solid #666;
}

.lesp-cancel-btn:hover {
  background-color: #444;
}

/***************************************************************
 * Event Chain
 ***************************************************************/
.le-event-chain-builder {
  padding: 10px;
  background: #2e2e2e;
  border: 1px solid #444;
  border-radius: 4px;
}

.le-event-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.le-event-type {
  padding: 6px;
  border-radius: 4px;
  background: #2e2e2e;
  color: #fff;
  border: 1px solid #555;
}

.le-event-parameters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.le-param-input {
  background: #3a3a3a;
  color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 6px;
  min-width: 120px;
}

.le-event-list {
  margin-top: 8px;
  max-height: 200px;
  overflow-y: auto;
  background: #404040;
  border-radius: 4px;
  padding: 8px;
}

.le-event-item {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  background: #2e2e2e;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 6px;
  gap: 6px;
}

.le-event-item span {
  flex: 1;
  color: #fff;
  font-size: 13px;
}

.le-event-item button {
  font-size: 12px;
  background: transparent;
  color: #fff;
  border: none;
  cursor: pointer;
}

.le-event-item button:hover {
  color: #ffca28;
}

/***************************************************************
 * AI Wizard Additions
 ***************************************************************/
/* Container for the AI wizard steps */
.ai-wizard-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  background-color: #2e2e2e; /* match side panel background */
  padding: 10px 0;           /* some extra spacing at top/bottom */
}

/* Each wizard step gets a box similar to a "lesp-form" style */
.ai-wizard-step {
  background-color: #3a3a3a;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/***************************************************************
 * Responsive
 ***************************************************************/
@media(max-width: 768px) {
  .learning-editor-sidepanel {
    width: 100%;
    transform: translateX(100%);
  }
}
/**
 * eventChainBuilder.css
 *
 * Styles for the Event Chain Builder widget.
 * 
 * Key improvements:
 * - Clear layout and spacing.
 * - Hover effects on buttons.
 * - Smooth transitions.
 * - "Move Up"/"Move Down" actions.
 */

/* Basic reset inside the builder */
.ecb-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 12px;
  background-color: #1e1e1e;
  border: 1px solid #444;
  border-radius: 6px;
}

/* Chain List Container */
.ecb-chain-list {
  background-color: #2c2c2c;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 12px;
  min-height: 50px;
  transition: background-color 0.2s ease;
}

.ecb-chain-list:hover {
  background-color: #2f2f2f;
}

/* When chain is empty */
.ecb-chain-empty {
  color: #aaaaaa;
  font-style: italic;
  padding: 4px 0;
}

/* Chain Item Row */
.ecb-chain-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #3a3a3a;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 8px;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.ecb-chain-item:hover {
  background-color: #444;
  transform: scale(1.01);
}

/* Event label in the row */
.ecb-item-label {
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  margin-right: 8px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Actions (Edit, Remove, Move Up, Move Down) */
.ecb-item-actions {
  display: flex;
  gap: 4px;
}

.ecb-item-actions button {
  background-color: #2c2c2c;
  color: #ffffff;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 3px 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.ecb-item-actions button:hover {
  background-color: #3e3e3e;
  transform: translateY(-1px);
}
.ecb-item-actions button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* Add Section */
.ecb-add-section {
  background-color: #2c2c2c;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 12px;
}

.ecb-add-section-title {
  color: #ffffff;
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
}

.ecb-form-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.ecb-label {
  font-size: 14px;
  font-weight: 500;
  color: #bbbbbb;
  min-width: 90px;
}

/* Event select */
.ecb-event-select {
  flex: 1;
  background-color: #222;
  color: #ffffff;
  border: 1px solid #444;
  padding: 6px;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s;
}
.ecb-event-select:focus {
  border-color: #007bff;
  outline: none;
}

/* Args Container */
.ecb-args-wrapper {
  margin-bottom: 12px;
}
.ecb-args-title {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #bbb;
  text-decoration: underline;
}
.ecb-arg-fields {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.ecb-arg-input {
  background-color: #222;
  color: #fff;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 6px;
  font-size: 13px;
  transition: border-color 0.2s;
}
.ecb-arg-input:focus {
  border-color: #007bff;
  outline: none;
}

/* Form Actions (Add / Clear) */
.ecb-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.ecb-add-btn,
.ecb-clear-btn {
  background-color: #007bff;
  border: none;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  font-size: 14px;
}

.ecb-clear-btn {
  background-color: #666;
}

.ecb-add-btn:hover,
.ecb-clear-btn:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
}

.ecb-clear-btn:hover {
  background-color: #444;
}

.ecb-add-btn:active,
.ecb-clear-btn:active {
  transform: translateY(1px);
}
/* infoTooltip.css */
#tooltip-root {
    /* A parent element to contain all tooltips, ensures they are stacked on top. */
    position: relative; /* Not strictly necessary since we use position: fixed on tooltips */
    z-index: 99999; /* Higher than most UI elements */
  }
  
  /* Container that holds the info icon */
  .info-tooltip-container {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    position: relative;
  }
  
  /* The icon/button itself */
  .info-tooltip-icon {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #666;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background-color 0.2s ease;
  }
  
  .info-tooltip-icon:hover {
    color: #999;
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  .info-tooltip-icon.active {
    color: #3f51b5;
    background-color: rgba(63, 81, 181, 0.1);
  }
  
  /* The content box that pops up */
  .info-tooltip-content {
    position: fixed;
    background-color: #1f1f1f;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 16px;
    width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }
  
  /* Class to show content */
  .info-tooltip-content.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 10000; /* Ensure tooltip is on top of most elements */
  }
  
  /* Tooltip content styling */
  .info-tooltip-content h3 {
    color: #fff;
    font-size: 16px;
    margin: 0 0 12px 0;
    font-weight: 600;
  }
  
  .info-tooltip-content p {
    color: #bbb;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 12px 0;
  }
  
  .info-tooltip-content ul {
    color: #bbb;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    padding-left: 20px;
  }
  
  .info-tooltip-content li {
    margin-bottom: 6px;
  }
  
  .info-tooltip-content li:last-child {
    margin-bottom: 0;
  }
  
  .info-tooltip-content strong {
    color: #fff;
    font-weight: 600;
  }
  
