/* DAISYUI */
@plugin "daisyui" {
    themes: light --default, black;
}

:root:has(input.theme-controller[value="black"]:checked) .tooltip,
:root:has(input.theme-controller[value="black"]:checked) .tooltip::before {
    border-radius: 0.25rem !important;
}

.tooltip::after {
    display: none !important;
}

/* Carousel Styles */
.carousel-container {
    position: fixed;
    left: 16.666%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20%;
    height: 60%;
    overflow: hidden;
    z-index: 10;
    pointer-events: none;
}

.carousel-track {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 1rem;
    align-items: center;
    transform: translateY(0);
    /* Убираем transition для предотвращения плавности при телепорте */
    /* transition: transform 0.1s ease-out; */
}

.carousel-item {
    width: 30%;
    height: 24vh;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0);
    border-radius: 12px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s, filter 0.2s;
    overflow: hidden;
}

.carousel-item.active {
    transform: scale(1.2);
    filter: brightness(1.2);
}

.carousel-item-icon {
      width: 100%;
      height: 100%;
      object-fit: contain;
}

/* Side Panel */
.side-panel {
    position: fixed;
    left: 28%;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 40vh;
    max-height: 80vh;
    overflow: hidden;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    transition: width 0.8s cubic-bezier(0.2,0.8,0.2,1);
    z-index: 11;
    display: flex;
    align-items: top;
    justify-content: center;
}

.side-panel.open {
    width: 25%;
}

.panel-content {
    text-align: center;
    color: white;
    width: 100%;
    padding: 1rem;
}

.panel-title {
    margin-bottom: 1rem;
    font-size: 1.8rem;
    word-wrap: break-word;
}

.panel-preview {
    width: 100%;
    height: 70%;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    overflow: hidden;
    background-color: #333;
}

/* Ensure canvas is behind */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    transition: filter 0.3s ease;
}

/* Inverted background */
#webgl-canvas.inverted {
    filter: invert(1) hue-rotate(180deg);
}

.carousel-item-icon {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }

/* Make sure carousel and panel are above */
#carousel-container, #side-panel {
    z-index: 10;
}

/* Hide scrollbar */
* {
    scrollbar-width: none;
}
*::-webkit-scrollbar {
    display: none;
}

/* DaisyUI overrides if needed */
:root {
    --color-base-100: #ffffff;
    --color-base-200: #f9fafb;
    --color-base-300: #f3f4f6;
    --color-base-content: #1f2937;
    --color-primary: #2563eb;
    --color-secondary: #64748b;
    --color-accent: #10b981;
    --color-neutral: #6b7280;
    --color-info: #3b82f6;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
}

/* Fade out animation for Enter key - applied to main */
.fade-out-main {
  overflow: hidden;
}
.fade-out-main *:not(#webgl-canvas):not(.active-glow) {
  opacity: 0;
  transition: opacity 1.5s ease-out;
}

/* Glow flash then fade for active item */
@keyframes glow-fade {
  0% {
    filter: brightness(1.2) drop-shadow(0 0 10px rgba(255,255,255,0.8));
    transform: scale(1.2);
  }
  30% {
    filter: brightness(1.5) drop-shadow(0 0 20px rgba(255,255,255,1));
    transform: scale(1.3);
  }
  100% {
    opacity: 0;
    filter: brightness(1.2) drop-shadow(0 0 10px rgba(255,255,255,0.8));
    transform: scale(1.2);
  }
}
.active-glow {
  animation: glow-fade 1.5s ease-out forwards;
}