@import url('https://fonts.googleapis.com/css2?family=VT323&family=Share+Tech+Mono&display=swap');

/* ===== BASE ===== */
body { 
    font-family: 'Share Tech Mono', monospace;
    overflow-x: hidden;
    background-color: #000;
}

h1, h2, h3, button, h4, h5 { 
    font-family: 'VT323', monospace; 
}

/* ===== PARTICLE CANVAS ===== */
#particle-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
}

/* ===== UI BACKGROUND ===== */
.ui-background {
    background-color: rgba(10, 10, 10, 0.87);
    backdrop-filter: blur(6px);
}

/* ===== GLOW TEXT ===== */
.text-glow { 
    text-shadow: 0 0 8px rgba(255, 50, 50, 0.7); 
}

/* ===== GLITCH TEXT ===== */
@keyframes glitchAnim {
    0% { clip-path: inset(10% 0 30% 0); transform: translate(-2px, 1px); }
    20% { clip-path: inset(80% 0 5% 0); transform: translate(2px, -1px); }
    40% { clip-path: inset(40% 0 40% 0); transform: translate(-1px, 2px); }
    60% { clip-path: inset(15% 0 60% 0); transform: translate(1px, -2px); }
    80% { clip-path: inset(50% 0 10% 0); transform: translate(-2px, -1px); }
    100% { clip-path: inset(20% 0 50% 0); transform: translate(2px, 1px); }
}

.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before, .glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0.8;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 red;
    animation: glitchAnim 3s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    animation: glitchAnim 2.5s infinite linear alternate-reverse;
}

/* ===== PROFILE PIC WRAPPER ===== */
.profile-pic-wrapper {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

@keyframes profileGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 50, 50, 0.4), 0 0 0 1px rgba(255, 50, 50, 0.3); }
    50%       { box-shadow: 0 0 22px rgba(255, 50, 50, 0.85), 0 0 0 1px rgba(255, 80, 80, 0.9); }
}

@keyframes scanLine {
    0%   { top: -4px; opacity: 0.8; }
    80%  { opacity: 0.6; }
    100% { top: 100%; opacity: 0; }
}

.profile-pic-wrapper img {
    animation: profileGlow 2.8s ease-in-out infinite;
    display: block;
}

.profile-pic-wrapper::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(transparent, rgba(255, 90, 90, 0.7), transparent);
    animation: scanLine 2.8s linear infinite;
    pointer-events: none;
}

/* ===== TRANSIÇÃO ENTRE SEÇÕES ===== */
@keyframes slideIn {
    from { opacity: 0; transform: translateX(-18px); }
    to { opacity: 1; transform: translateX(0); }
}

.fade-in {
    animation: slideIn 0.32s ease-out;
}

/* ===== TYPEWRITER REVEAL ===== */
@keyframes scanlineReveal {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
}
.typewriter-reveal {
    animation: scanlineReveal 0.6s steps(40) forwards;
}

/* ===== AUDIO VISUALIZER ===== */
@keyframes eqBar {
    0% { height: 2px; }
    50% { height: 12px; }
    100% { height: 2px; }
}
.bar-anim-1 { animation: eqBar 0.6s infinite ease-in-out alternate; }
.bar-anim-2 { animation: eqBar 0.8s infinite ease-in-out alternate-reverse; }
.bar-anim-3 { animation: eqBar 0.5s infinite ease-in-out alternate; }

.visualizer-active { opacity: 1 !important; }

/* ===== MENU HOVER GLITCH ===== */
@keyframes menuGlitch {
    0% { transform: translate(1px, 1px) }
    33% { transform: translate(-1px, 0) }
    66% { transform: translate(0, -1px) }
    100% { transform: translate(1px, 1px) }
}
.menu-button:hover {
    animation: menuGlitch 0.2s infinite;
    color: #fff !important;
    background: rgba(255, 0, 0, 0.2) !important;
}

/* ===== FEATURED IMAGE ===== */
.featured-image {
    transition: transform 0.3s ease-in-out;
}
.featured-card:hover .featured-image {
    transform: scale(1.05);
}

/* ===== SETUP CARDS — hover glow ===== */
.setup-card {
    transition: all 0.22s ease;
    border: 1px solid transparent !important;
}
.setup-card:hover {
    border-color: rgba(255, 50, 50, 0.5) !important;
    box-shadow: 0 0 18px rgba(255, 50, 50, 0.18), inset 0 0 10px rgba(255, 50, 50, 0.04);
    transform: translateX(5px);
}
.setup-card:hover i {
    filter: drop-shadow(0 0 5px rgba(255, 50, 50, 0.9));
}

/* ===== SKELETON LOADING ===== */
@keyframes skeletonPulse {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

.skeleton-box {
    background: linear-gradient(90deg, #0e0e0e 25%, #1c1c1c 50%, #0e0e0e 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.6s ease-in-out infinite;
}

/* ===== RECORDS — cards em grid ===== */
@keyframes recordFadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== CHAOS EMERALDS ===== */
.emerald {
    width: 20px;
    height: 18px;
    background: #333;
    clip-path: polygon(25% 0%, 75% 0%, 100% 35%, 50% 100%, 0% 35%);
    transition: all 0.3s ease;
    opacity: 0.3;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
    cursor: pointer;
}

.emerald::before {
    content: '';
    position: absolute;
    top: 0; left: 25%; width: 50%; height: 35%;
    background: rgba(255,255,255,0.4);
    clip-path: polygon(0 0, 100% 0, 80% 100%, 20% 100%);
    pointer-events: none;
}

.emerald::after {
    content: '';
    position: absolute;
    top: 35%; left: 0; width: 100%; height: 65%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1), rgba(0,0,0,0.4));
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    pointer-events: none;
}

.emerald.active {
    opacity: 1;
}

/* Cores Clássicas dos Jogos */
.emerald-green.active  { background: #22c55e; filter: drop-shadow(0 0 5px #22c55e); }
.emerald-red.active    { background: #ef4444; filter: drop-shadow(0 0 5px #ef4444); }
.emerald-blue.active   { background: #3b82f6; filter: drop-shadow(0 0 5px #3b82f6); }
.emerald-yellow.active { background: #eab308; filter: drop-shadow(0 0 5px #eab308); }
.emerald-purple.active { background: #a855f7; filter: drop-shadow(0 0 5px #a855f7); }
.emerald-cyan.active   { background: #06b6d4; filter: drop-shadow(0 0 5px #06b6d4); }
.emerald-white.active  { background: #f8fafc; filter: drop-shadow(0 0 5px #f8fafc); }

@keyframes emeraldPulse {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.15); filter: brightness(1.5); }
}
.emeralds-charged .emerald {
    animation: emeraldPulse 2s infinite ease-in-out;
}

/* ===== SUPER SHADOW MODE ===== */
body.super-shadow-mode #bg-watermark {
    color: #ffd700 !important;
    opacity: 0.1 !important;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

body.super-shadow-mode .text-red-500,
body.super-shadow-mode .text-red-600 {
    color: #ffd700 !important;
}

body.super-shadow-mode .bg-red-600,
body.super-shadow-mode .bg-red-500 {
    background-color: #ffd700 !important;
}

body.super-shadow-mode .border-red-900,
body.super-shadow-mode .border-red-500 {
    border-color: #ffd700 !important;
}

body.super-shadow-mode .text-glow {
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.8) !important;
}

body.super-shadow-mode #profile-pic {
    box-shadow: 0 0 20px #ffd700, inset 0 0 10px #ffd700 !important;
    border-color: #ffd700 !important;
}

body.super-shadow-mode #dynamic-shadow-bg img {
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 1)) !important;
}

/* ===== PLAYLIST ACCORDION ===== */
.playlist-card {
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.playlist-chevron {
    transition: transform 0.32s ease;
}
.playlist-embed {
    overflow: hidden;
}

/* ===== SOCIAL LINKS — cores por plataforma ===== */
.social-link {
    transition: all 0.2s ease !important;
}
.social-twitch:hover    { color: #9146FF !important; border-color: rgba(145,70,255,0.55) !important; }
.social-twitter:hover   { color: #e7e9ea !important; border-color: rgba(231,233,234,0.55) !important; }
.social-instagram:hover { color: #E1306C !important; border-color: rgba(225,48,108,0.55) !important; }
.social-github:hover    { color: #f0f6fc !important; border-color: rgba(240,246,252,0.55) !important; }
.social-steam:hover     { color: #66C0F4 !important; border-color: rgba(102,192,244,0.55) !important; }
.social-lastfm:hover    { color: #D51007 !important; border-color: rgba(213,16,7,0.55) !important; }
.social-letterboxd:hover{ color: #40BCF4 !important; border-color: rgba(64,188,244,0.55) !important; }

/* ===== CHAOS ENERGY BAR — glow pulsante ===== */
@keyframes chaosGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 50, 50, 0.5); }
    50%       { box-shadow: 0 0 16px rgba(255, 50, 50, 1), 0 0 30px rgba(255, 50, 50, 0.3); }
}
#chaos-bar {
    animation: chaosGlow 2.2s ease-in-out infinite;
}

/* ===== NOW PLAYING ===== */
#now-playing {
    border: 1px solid rgba(255, 50, 50, 0.22);
    background: rgba(255, 50, 50, 0.04);
    padding: 8px 10px;
    margin-top: 10px;
}

.now-playing-label {
    font-size: 0.58rem;
    color: #cc2222;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.now-playing-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #ff3232;
    flex-shrink: 0;
    animation: npPulse 1.3s ease-in-out infinite;
}

@keyframes npPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.35; transform: scale(0.75); }
}

.now-playing-track {
    font-size: 0.74rem;
    color: #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.now-playing-artist {
    font-size: 0.64rem;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.now-playing-idle {
    font-size: 0.65rem;
    color: #444;
}

/* ===== UPTIME ===== */
#uptime-display {
    font-size: 0.6rem;
    color: #3a3a3a;
    text-align: center;
    margin-top: 4px;
    letter-spacing: 0.06em;
}

/* ===== EASTER EGG OVERLAY ===== */
#easter-egg-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    background: rgba(0, 0, 0, 0.97);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 24px;
}

#easter-egg-overlay.active {
    display: flex;
}

@keyframes easterFlicker {
    0%, 100% { opacity: 1; }
    10%       { opacity: 0.6; }
    20%       { opacity: 1; }
    30%       { opacity: 0.4; }
    40%       { opacity: 1; }
}

#easter-main-text {
    font-family: 'VT323', monospace;
    font-size: clamp(2rem, 6vw, 4rem);
    color: #ff0000;
    text-shadow: 0 0 20px #ff0000, 0 0 50px #ff000066;
    letter-spacing: 0.25em;
    animation: easterFlicker 0.5s ease 0.5s;
}

/* ===== MOBILE ===== */
@media (max-width: 1024px) {
    #sidebar {
        height: 100vh;
        overflow-y: auto !important;
        position: fixed;
        top: 0; left: 0;
        z-index: 100 !important;
        width: 80vw;
        max-width: 340px;
        background: rgba(10,10,10,0.98);
        box-shadow: 2px 0 16px #000a;
        transition: transform 0.3s;
        -webkit-overflow-scrolling: touch;
    }
    #sidebar.-translate-x-full { transform: translateX(-100%); }
    #sidebar.translate-x-0     { transform: translateX(0); }
    #mobile-overlay {
        z-index: 90 !important;
        pointer-events: auto;
        transition: opacity 0.2s;
    }
    #mobile-overlay.hidden {
        display: none;
        pointer-events: none !important;
    }
    main, #main-container > main { margin-left: 0 !important; }
}

@media (min-width: 1024px) {
    #sidebar {
        position: relative !important;
        transform: none !important;
        width: 25vw;
        max-width: 340px;
        z-index: 10;
        box-shadow: none;
    }
    #mobile-overlay { display: none !important; }
}

@media (max-width: 768px) {
    body { font-size: 14px; }
    h1   { font-size: 1.5rem; }
    h2   { font-size: 1.25rem; }
    .menu-button {
        font-size: 0.9rem !important;
        padding: 0.5rem !important;
        gap: 0.5rem !important;
        min-height: 48px;
        min-width: 44px;
        border-radius: 8px;
        transition: background 0.15s, color 0.15s, box-shadow 0.15s;
        touch-action: manipulation;
    }
    .menu-button:active, .menu-button:focus {
        background: rgba(255,50,50,0.15) !important;
        color: #fff !important;
        outline: none;
        box-shadow: 0 0 0 2px #ff3232;
    }
    .menu-button i { font-size: 1rem !important; }
    .lang-button {
        font-size: 0.75rem !important;
        padding: 0.25rem 0.5rem !important;
    }
}

@media (max-width: 639px) {
    /* Reserva espaço para idioma + player fixos no topo do celular. */
    #main-container > main { padding-top: 11.5rem !important; }
}

@media (max-width: 480px) {
    body { font-size: 13px; }
    .menu-button   { font-size: 0.85rem !important; padding: 0.4rem !important; }
    .menu-button i { font-size: 0.9rem !important; }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar       { width: 8px; }
::-webkit-scrollbar-track {
    background: rgba(20, 20, 20, 0.8);
    border-left: 1px solid rgba(255, 50, 50, 0.15);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff3232 0%, #cc0000 100%);
    box-shadow: 0 0 8px rgba(255, 50, 50, 0.5);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff4444 0%, #dd0000 100%);
    box-shadow: 0 0 12px rgba(255, 50, 50, 0.8);
}
::-webkit-scrollbar-corner { background: rgba(20, 20, 20, 0.8); }
* { scrollbar-width: thin; scrollbar-color: #ff3232 rgba(20, 20, 20, 0.8); }

.scrollable-content::-webkit-scrollbar       { width: 8px; }
.scrollable-content::-webkit-scrollbar-track { background: rgba(15, 15, 15, 0.9); }
.scrollable-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff3232 0%, #aa0000 100%);
    border: 1px solid rgba(255,255,255,0.05);
}

#sidebar {
    overflow: hidden;
}

#sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.1;
    pointer-events: none;
    mix-blend-mode: screen;
    background-image: url('./imagens/characters/shadow.webp');
    background-position: bottom;
    background-repeat: no-repeat;
    background-size: 150%;
    filter: grayscale(100%) sepia(100%) hue-rotate(300deg) saturate(5);
}

#sidebar > * {
    position: relative;
    z-index: 10;
}

/* ===== TEXT EFFS ===== */
.spotify-embed {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(255, 50, 50, 0.3);
    transition: all 0.3s ease;
}
.spotify-embed:hover {
    box-shadow: 0 0 30px rgba(255, 50, 50, 0.5);
    transform: translateY(-2px);
}
.spotify-embed iframe { border-radius: 12px; }

/* ===== MOBILE LIGHTBOX ===== */
@media (max-width: 768px) {
    #affinity-lightbox-modal img, #gallery-lightbox-modal img {
        max-width: 95vw !important;
        max-height: 70vh !important;
    }
    #affinity-lightbox-close, #gallery-lightbox-close {
        top: 16px !important; right: 16px !important;
        font-size: 1.5rem !important;
    }
    #affinity-lightbox-prev, #affinity-lightbox-next,
    #gallery-lightbox-prev,  #gallery-lightbox-next {
        font-size: 2rem !important;
        left: 16px !important; right: 16px !important;
    }
}

#mobile-menu-toggle { z-index: 120 !important; }

/* ===== ACESSIBILIDADE: reduz movimento ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    /* fundos animados desativados também via JS (matrix.js / particles.js) */
    #matrix-canvas, #particle-canvas { display: none !important; }
}
