/* Basics */
* { box-sizing: border-box; }

body {
    margin: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: #050505;
    background-image: radial-gradient(circle at center, #111 0%, #000 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Roboto Mono', monospace;
    cursor: url('cursor.png'), auto; 
    transition: background 0.5s; 
}

body.dark-mode {
    background-image: none;
    background-color: #000;
}

/* Green Particles */
.particle {
    position: absolute;
    bottom: -10px;
    width: 4px;
    height: 4px;
    background: #00ff88;
    box-shadow: 0 0 10px #00ff88;
    pointer-events: none;
    border-radius: 50%;
    animation: floatUp linear forwards;
    z-index: 1;
}

@keyframes floatUp {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    10% { opacity: 0.8; }
    100% { transform: translateY(-100vh) scale(0); opacity: 0; }
}

/* Main Modal */
.dialog-box {
    position: relative;
    width: min(90%, 500px); 
    min-height: 250px;
    padding: 25px 20px;
    background: #0a0a0a;
    border: 3px solid #00ff88;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.2s;
    margin: 0 auto; 
}

.box-content { text-align: center; width: 100%; }

h2 {
    font-family: 'Bangers', cursive;
    font-size: clamp(2.5rem, 10vw, 3.5rem); 
    margin: 0 0 10px 0;
    color: white;
    text-shadow: 3px 3px 0px #00ff88;
    letter-spacing: 2px;
    line-height: 1.1;
}

p { 
    font-size: 0.85rem; 
    color: #00ff88; 
    margin: 0 0 25px 0; 
    font-weight: bold; 
    letter-spacing: 2px;
    text-transform: uppercase;
}

input {
    width: 100%;
    padding: 15px;
    font-size: 1.3rem;
    font-family: 'Bangers';
    border: 2px solid #333;
    background: #111;
    color: white;
    text-align: center;
    margin-bottom: 20px;
    outline: none;
    transition: 0.3s;
    cursor: url('cursor.png'), text;
}

input::placeholder { color: rgba(0, 255, 136, 0.4); font-family: 'Bangers'; letter-spacing: 1px; }
input:focus { border-color: #00ff88; box-shadow: 0 0 15px rgba(0, 255, 136, 0.3); }

button {
    width: 100%;
    padding: 15px;
    font-family: 'Bangers';
    font-size: 1.6rem;
    background: #00ff88;
    color: #000;
    border: none;
    transition: 0.2s;
    text-transform: uppercase;
    cursor: url('cursor.png'), pointer;
}

button:hover { background: white; box-shadow: 0 0 30px #00ff88; transform: scale(1.05); }

/* Clones (The Cut Pieces) */
.slice-clone {
    position: fixed; 
    background: #0a0a0a;
    border: 3px solid #00ff88;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    overflow: hidden;
    z-index: 11;
    padding: 25px 20px; 
}

.slice-clone .box-content { text-align: center; width: 100%; }
.slice-clone h2 { font-family: 'Bangers'; font-size: clamp(2.5rem, 10vw, 3.5rem); margin: 0 0 10px 0; color: white; text-shadow: 3px 3px 0px #00ff88; letter-spacing: 2px; line-height: 1.1; }
.slice-clone p { font-size: 0.85rem; color: #00ff88; margin: 0 0 25px 0; font-weight: bold; letter-spacing: 2px; text-transform: uppercase; }
.slice-clone input { width: 100%; padding: 15px; font-size: 1.3rem; font-family: 'Bangers'; border: 2px solid #333; background: #111; color: white; text-align: center; margin-bottom: 20px; }
.slice-clone button { width: 100%; padding: 15px; font-family: 'Bangers'; font-size: 1.6rem; background: #00ff88; color: #000; border: none; }


/* Zoro Image Layer */
#zoro-layer {
    position: fixed;
    bottom: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 100; display: none; 
}

#zoro-img {
    position: absolute;
    bottom: 0; 
    left: 100%; 
    height: 500px; max-height: 50vh; 
    filter: drop-shadow(0 0 15px #00ff88); 
    transform: scaleX(-1); 
    will-change: transform;
}

.zoro-strike {
    animation: dashAcross 1.0s cubic-bezier(0,0,0.2,1) forwards;
    filter: blur(2px) drop-shadow(0 0 20px #00ff88);
}

@keyframes dashAcross {
    0% { transform: translateX(0) scaleX(-1); opacity: 0; }
    5% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateX(-150vw) scaleX(-1); opacity: 0; }
}

/* Lost animation */
.zoro-lost-anim {
    animation: dashLost 2.5s cubic-bezier(0.2, 0, 0.2, 1) forwards !important;
    filter: blur(2px) drop-shadow(0 0 20px #00ff88);
}

@keyframes dashLost {
    0% { transform: translateX(0); opacity: 0; }
    10% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateX(200vw); opacity: 0; }
}


/* Effects */
.shake-screen { animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both; }

@keyframes shake {
    10%, 90% { transform: translate3d(-10px, 0, 0); }
    20%, 80% { transform: translate3d(10px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-10px, -10px, 0); }
    40%, 60% { transform: translate3d(10px, 10px, 0); }
}

#flash-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #fff; opacity: 0; pointer-events: none; z-index: 999; mix-blend-mode: normal;
}

.flash-active { animation: impactFlash 0.8s ease-out; }

@keyframes impactFlash {
    0% { opacity: 1; background: #fff; mix-blend-mode: normal; } 
    10% { opacity: 0.8; background: #00ff88; mix-blend-mode: hard-light; } 
    100% { opacity: 0; background: #00ff88; mix-blend-mode: hard-light; }
}

/* Cut Paths */
.anim-top { clip-path: polygon(0 0, 100% 0, 50% 50%); animation: flyTop 3s cubic-bezier(0.05, 0.7, 0.1, 1) forwards; }
@keyframes flyTop { to { transform: translate(0, -150px) rotate(-5deg); opacity: 0; } }

.anim-bot { clip-path: polygon(0 100%, 100% 100%, 50% 50%); animation: flyBot 3s cubic-bezier(0.05, 0.7, 0.1, 1) forwards; }
@keyframes flyBot { to { transform: translate(0, 150px) rotate(5deg); opacity: 0; } }

.anim-left { clip-path: polygon(0 0, 0 100%, 50% 50%); animation: flyLeft 3s cubic-bezier(0.05, 0.7, 0.1, 1) forwards; }
@keyframes flyLeft { to { transform: translate(-150px, 0) rotate(-5deg); opacity: 0; } }

.anim-right { clip-path: polygon(100% 0, 100% 100%, 50% 50%); animation: flyRight 3s cubic-bezier(0.05, 0.7, 0.1, 1) forwards; }
@keyframes flyRight { to { transform: translate(150px, 0) rotate(5deg); opacity: 0; } }

.slash-line {
    position: absolute; height: 6px; background: #fff;
    box-shadow: 0 0 10px #00ff88, 0 0 40px #00ff88;
    z-index: 50; transform-origin: center; border-radius: 50%; opacity: 0.9;
}

/* NEW: Haki Trail */
.haki-trail {
    position: fixed;
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    pointer-events: none; 
    z-index: 9999;
    box-shadow: 0 0 10px #00ff88, 0 0 20px #00ff88;
    animation: fadeTrail 0.5s linear forwards;
}

@keyframes fadeTrail {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(0); opacity: 0; }
}

/* NEW: Glitch Text Effect */
.glitch-text h2, .glitch-text p {
    animation: glitchRGB 0.2s infinite;
}

@keyframes glitchRGB {
    0% { text-shadow: 2px 0 red, -2px 0 cyan; }
    25% { text-shadow: -2px 0 red, 2px 0 cyan; }
    50% { text-shadow: 2px 0 red, -2px 0 cyan; }
    75% { text-shadow: -2px 0 red, 2px 0 cyan; }
    100% { text-shadow: 0 0 0; }
}