/* ChatUni - Base CSS */
/* Reset, body, views, dark-overlay, effects */

@import url('../../assets/css/theme.css');

body {
    background: url('../../assets/images/neongamingbackground.jpg') no-repeat center center fixed;
    background-size: cover;
    color: white;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: fixed;
    /* GPU acceleration */
    transform: translateZ(0);
    will-change: background-image;
    transition: background-image 0.5s ease;
}

.view {
    display: none;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    will-change: opacity, transform;
}

.view.active {
    display: flex;
}

.dark-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 20%, black 150%);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease;
}

#effects-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.shape {
    position: absolute;
    animation: float 2s linear forwards;
}

@keyframes float {
    from { transform: translateY(0) rotate(0deg); opacity: 0.8; }
    to { transform: translateY(-120px) rotate(180deg); opacity: 0; }
}

.circle { border-radius: 50%; }

.triangle {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 20px solid;
}

.glitch-text {
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 2px 2px #ff00ff;
}

.flashing {
    animation: flash 1s infinite alternate;
}

@keyframes flash {
    from { opacity: 1; text-shadow: 0 0 5px #ff00ff; }
    to { opacity: 0.3; text-shadow: 0 0 20px #ff00ff; }
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Toggle Window Buttons Container */
.toggle-buttons-container {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    gap: 10px;
}

/* Toggle Window Button */
.toggle-window-btn {
    background: rgba(5, 5, 5, 0.95);
    border: 1px solid rgba(0, 242, 255, 0.4);
    color: #00f2ff;
    padding: 10px 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    text-transform: uppercase;
    white-space: nowrap;
}

.toggle-window-btn:hover {
    background: rgba(0, 242, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
}

body.light-down::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.95);
    z-index: 0;
    pointer-events: none;
}

/* 
   PERFORMANCE BOOST: 
   Mette in pausa tutte le animazioni CSS della pagina quando una modale è attiva.
   Questo libera la GPU per concentrarsi esclusivamente sul Video Player di Tortuga TV.
*/
body:has(.modal.active) *:not(.modal *):not(.tv-video-panel *) {
    animation-play-state: paused !important;
}

/* App Version Tag */
.app-version-tag {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: rgba(0, 242, 255, 0.4);
    z-index: 10;
    pointer-events: none;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
}

body.modal-open .app-version-tag,
body:has(.modal.active) .app-version-tag {
    display: none !important;
}
