@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,700;1,400&family=Quintessential&family=Playfair+Display:wght@700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e, #000000);
    background-size: 400% 400%;
    animation: gradientAnimation 12s ease infinite;
    font-family: 'Lora', serif;
    color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    overflow-x: hidden;
}

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

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    background: radial-gradient(circle, #8a2be2, transparent);
    border-radius: 50%;
    animation: float 8s infinite linear;
    opacity: 0.6;
}

@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

.container {
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 50px 40px;
    border-radius: 25px;
    box-shadow: 
        0 0 50px rgba(138, 43, 226, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    max-width: 650px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(138, 43, 226, 0.1), transparent);
    animation: shine 6s infinite linear;
    pointer-events: none;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(0deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(360deg); }
}

.oracle-title {
    font-family: 'Playfair Display', serif;
    background: linear-gradient(45deg, #ff6bff, #a855f7, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 3.8em;
    margin-bottom: 15px;
    text-shadow: 0 0 30px rgba(168, 85, 247, 0.5);
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { text-shadow: 0 0 20px rgba(168, 85, 247, 0.5); }
    100% { text-shadow: 0 0 40px rgba(168, 85, 247, 0.8), 0 0 60px rgba(102, 51, 204, 0.4); }
}

.subtitle {
    font-style: italic;
    color: #d8b4fe;
    margin-bottom: 40px;
    font-size: 1.3em;
    text-shadow: 0 0 10px rgba(216, 180, 254, 0.5);
}

.input-group {
    position: relative;
    margin: 30px 0;
}

textarea {
    width: 100%;
    height: 120px;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid rgba(168, 85, 247, 0.3);
    background: rgba(0, 0, 0, 0.3);
    color: #f0f0f0;
    font-size: 1.1em;
    font-family: 'Lora', serif;
    resize: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

textarea:focus {
    outline: none;
    border-color: #a855f7;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
    background: rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

textarea::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.button-group {
    position: relative;
}

button {
    margin-top: 10px;
    padding: 18px 45px;
    font-size: 1.3em;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(45deg, #a855f7, #6366f1);
    border: none;
    border-radius: 60px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 
        0 0 25px rgba(168, 85, 247, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.8s;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 0 40px rgba(168, 85, 247, 0.7),
        0 10px 25px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(-1px) scale(1.02);
}

button:disabled {
    background: linear-gradient(45deg, #6b7280, #4b5563);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

button:disabled::before {
    display: none;
}

#response-container {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(102, 51, 204, 0.05));
    border-radius: 20px;
    border-left: 6px solid #cda4de;
    text-align: left;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#response-container.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

#response-container h2 {
    color: #e9d5ff;
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
    font-size: 1.8em;
    text-shadow: 0 0 10px rgba(233, 213, 255, 0.3);
}

#response-text {
    font-size: 1.3em;
    font-style: italic;
    line-height: 1.7;
    color: #f3e8ff;
    text-shadow: 0 0 5px rgba(243, 232, 255, 0.2);
}

.crystal-ball {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle at 30% 30%, rgba(168, 85, 247, 0.3), transparent 70%);
    border-radius: 50%;
    filter: blur(20px);
    animation: floatCrystal 8s ease-in-out infinite;
    z-index: -1;
}

.crystal-ball:nth-child(1) {
    top: -100px;
    left: -100px;
}

.crystal-ball:nth-child(2) {
    bottom: -100px;
    right: -100px;
    animation-delay: -4s;
}

@keyframes floatCrystal {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.1); }
}

@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .oracle-title {
        font-size: 2.8em;
    }
    
    textarea {
        height: 100px;
        font-size: 1em;
    }
    
    button {
        padding: 15px 35px;
        font-size: 1.1em;
    }
}

/* ANIMATIONS ALEATOIRES POUR TOUTES LES IMAGES */
.manga-character {
    position: fixed;
    width: 180px;
    height: 180px;
    z-index: 9997;
    opacity: 0;
    pointer-events: none;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 0 20px #ff49b6);
}

/* Images différentes avec des chemins différents */
.manga-character.rocket {
    background-image: url('anime-rocket.gif');
    animation: randomFly1 25s linear infinite;
    width: 200px;
    height: 200px;
}

.manga-character.girl1 {
    background-image: url('anime-girl-2.webp');
    animation: randomFly2 30s linear infinite;
}

.manga-character.girl2 {
    background-image: url('anime-girl-3.webp');
    animation: randomFly3 35s linear infinite;
}

/* Traînées pour toutes les images */
.manga-character::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 30px;
    background: radial-gradient(ellipse, var(--trail-color, #ff00ff), #8a2be2, transparent 80%);
    filter: blur(10px);
    opacity: 0.7;
    top: 60%;
    left: -60px;
    animation: trailPulse 0.3s ease-in-out infinite alternate;
}

.manga-character.rocket::after {
    --trail-color: #ff00ff;
}

.manga-character.girl1::after {
    --trail-color: #00ffff;
}

.manga-character.girl2::after {
    --trail-color: #ffff00;
}

/* Animations aléatoires différentes pour chaque type */
@keyframes randomFly1 {
    0%, 20% {
        opacity: 0;
        transform: translateX(120vw) translateY(80vh) rotate(-25deg) scale(0.7);
    }
    25% {
        opacity: 0.9;
        transform: translateX(90vw) translateY(40vh) rotate(-15deg) scale(0.9);
    }
    45% {
        opacity: 1;
        transform: translateX(50vw) translateY(20vh) rotate(0deg) scale(1.1);
    }
    65% {
        opacity: 0.8;
        transform: translateX(10vw) translateY(60vh) rotate(15deg) scale(0.9);
    }
    85% {
        opacity: 0.6;
        transform: translateX(-40vw) translateY(30vh) rotate(25deg) scale(0.8);
    }
    100% {
        opacity: 0;
        transform: translateX(-120vw) translateY(100vh) rotate(35deg) scale(0.6);
    }
}

@keyframes randomFly2 {
    0%, 15% {
        opacity: 0;
        transform: translateX(-50px) translateY(120vh) rotate(20deg) scale(0.6);
    }
    20% {
        opacity: 0.8;
        transform: translateX(100px) translateY(80vh) rotate(10deg) scale(0.8);
    }
    40% {
        opacity: 0.9;
        transform: translateX(400px) translateY(50vh) rotate(0deg) scale(1);
    }
    60% {
        opacity: 0.7;
        transform: translateX(700px) translateY(70vh) rotate(-10deg) scale(1.2);
    }
    80% {
        opacity: 0.5;
        transform: translateX(1000px) translateY(30vh) rotate(-20deg) scale(0.9);
    }
    100% {
        opacity: 0;
        transform: translateX(1300px) translateY(-50vh) rotate(-30deg) scale(0.7);
    }
}

@keyframes randomFly3 {
    0%, 10% {
        opacity: 0;
        transform: translateX(80vw) translateY(-100px) rotate(15deg) scale(0.8);
    }
    15% {
        opacity: 0.7;
        transform: translateX(60vw) translateY(150px) rotate(25deg) scale(1);
    }
    35% {
        opacity: 0.9;
        transform: translateX(30vw) translateY(300px) rotate(35deg) scale(1.1);
    }
    55% {
        opacity: 0.8;
        transform: translateX(0vw) translateY(200px) rotate(25deg) scale(0.9);
    }
    75% {
        opacity: 0.6;
        transform: translateX(-30vw) translateY(350px) rotate(15deg) scale(0.7);
    }
    100% {
        opacity: 0;
        transform: translateX(-80vw) translateY(500px) rotate(5deg) scale(0.5);
    }
}

@keyframes trailPulse {
    0% {
        transform: scaleX(0.7);
        opacity: 0.4;
    }
    100% {
        transform: scaleX(1.1);
        opacity: 0.8;
    }
}

/* Délais aléatoires pour chaque instance */
.manga-character.delay-1 { animation-delay: 0s; }
.manga-character.delay-2 { animation-delay: 8s; }
.manga-character.delay-3 { animation-delay: 16s; }
.manga-character.delay-4 { animation-delay: 24s; }
.manga-character.delay-5 { animation-delay: 32s; }
.manga-character.delay-6 { animation-delay: 40s; }

/* Effet de scintillement */
.manga-sparkle {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 30%, rgba(255, 255, 255, 0.3) 70%, transparent 100%);
    animation: sparkle 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}
:root{
    --bg-dark: #06050b;
    --bg-mid: #170b24;
    --neon-1: #ff4da6;
    --neon-2: #5ff0ff;
    --muted: #dcd6ee;
    --glass: rgba(255,255,255,0.04);
    --accent-shadow: 0 8px 40px rgba(95,240,255,0.06);
}

*{box-sizing:border-box;margin:0;padding:0;font-family:"Poppins", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial;}

html,body{height:100%;}

body{
    background: radial-gradient(1200px 500px at 10% 10%, rgba(95,240,255,0.04), transparent 10%),
                radial-gradient(900px 400px at 90% 90%, rgba(255,77,166,0.04), transparent 8%),
                linear-gradient(180deg, var(--bg-mid), var(--bg-dark));
    color:var(--muted);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:48px 20px;
    overflow:hidden;
}

/* Subtle animated glow behind content */
.background-glow{
    position:fixed;
    inset:-20%;
    background: conic-gradient(from 120deg at 50% 50%, rgba(95,240,255,0.06), rgba(255,77,166,0.05), rgba(95,240,255,0.06));
    filter: blur(80px);
    transform: rotate(6deg);
    pointer-events:none;
    z-index:0;
    animation: slowRotate 30s linear infinite;
}
@keyframes slowRotate{ from{ transform: rotate(0deg);} to{ transform: rotate(360deg);} }

/* Container */
.container{
    width:100%;
    max-width:760px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border-radius:20px;
    padding:36px;
    box-shadow: 0 20px 80px rgba(3,3,8,0.7);
    border: 1px solid rgba(255,255,255,0.03);
    position:relative;
    backdrop-filter: blur(8px) saturate(120%);
    z-index:2;
}

/* Header */
.header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.logo{ font-weight:800; font-size:18px; color:var(--neon-2); letter-spacing:0.6px; text-shadow: 0 6px 30px rgba(95,240,255,0.06); }
.sigil{ font-size:20px; opacity:0.95; transform:translateY(-2px); }

/* Title / subtitle */
.oracle-title{
    font-size:30px;
    margin-bottom:6px;
    color: #fff;
    background: linear-gradient(90deg, var(--neon-1), var(--neon-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight:700;
    letter-spacing:0.6px;
}
.subtitle{
    font-size:13px;
    color:#d8d6e8;
    opacity:0.9;
    margin-bottom:18px;
}

/* Input area */
textarea#user-question{
    width:100%;
    min-height:120px;
    resize:vertical;
    padding:16px;
    border-radius:12px;
    border:1px solid rgba(255,255,255,0.03);
    background: linear-gradient(180deg, rgba(0,0,0,0.32), rgba(255,255,255,0.02));
    color:var(--muted);
    font-size:15px;
    outline:none;
    box-shadow: inset 0 6px 24px rgba(10,8,20,0.6);
    margin-bottom:16px;
}

/* Actions */
.actions{ display:flex; gap:12px; align-items:center; }

/* Button */
#submit-button{
    background: linear-gradient(90deg, rgba(255,77,166,1), rgba(95,240,255,1));
    color:#08060a;
    font-weight:700;
    padding:12px 20px;
    border-radius:12px;
    cursor:pointer;
    border: none;
    box-shadow: 0 10px 40px rgba(95,240,255,0.08), 0 2px 0 rgba(255,77,166,0.06) inset;
    transition: transform .12s ease, box-shadow .18s ease, filter .12s ease;
}
#submit-button:hover{ transform: translateY(-3px) scale(1.01); filter:brightness(1.05); box-shadow: 0 16px 60px rgba(95,240,255,0.12); }
#submit-button:active{ transform: translateY(-1px) scale(.997); }
#submit-button:disabled{
    opacity:0.6;
    cursor:default;
    transform:none;
    box-shadow:none;
}

/* Response */
.hidden{ display:none; }
#response-container{
    margin-top:18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    padding:16px;
    border-radius:12px;
    border:1px solid rgba(255,255,255,0.02);
    display:none;
    box-shadow: var(--accent-shadow);
}
#response-container.visible{ display:block; }

#response-container h2{
    margin-bottom:8px;
    color:var(--neon-1);
    font-size:16px;
}
#response-text{ font-size:15px; color:#f3f1fb; line-height:1.45; }

/* Particles */
.particles{ position:fixed; left:0; right:0; top:0; bottom:0; pointer-events:none; z-index:1; }
.particle{ position:absolute; border-radius:50%; opacity:0.12; filter: blur(14px); animation: floatUp linear infinite; background: radial-gradient(circle at 30% 30%, rgba(95,240,255,0.95), rgba(255,77,166,0.6)); }
@keyframes floatUp{ from{ transform: translateY(120vh) } to{ transform: translateY(-40vh) } }

/* Manga characters subtle positions */
.manga-character{
    position:fixed;
    bottom:8%;
    width:84px;
    height:84px;
    border-radius:14px;
    background:linear-gradient(135deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    box-shadow: 0 8px 30px rgba(95,240,255,0.04);
    opacity:0.98;
    transform:translateY(0);
    transition: transform 0.6s ease;
    z-index:2;
}
.manga-character .manga-sparkle{ width:8px; height:8px; background:var(--neon-1); border-radius:50%; position:absolute; left:10px; top:10px; box-shadow: 0 0 22px var(--neon-1); }

/* positions */
.manga-character.rocket{ left:4%; }
.manga-character.rocket.delay-2{ left:82%; transform:scale(.95); bottom:12%; }
.manga-character.girl1{ left:18%; bottom:18%; transform:scale(.92); }
.manga-character.girl2{ left:64%; bottom:14%; transform:scale(.9); }

/* Responsive tweaks */
@media (max-width:520px){
    .container{ padding:20px; border-radius:12px; }
    .oracle-title{ font-size:22px; }
    textarea#user-question{ min-height:90px; }
    .manga-character{ display:none; }
}
body { cursor: none; }

.cursor-dot,
.cursor-ring {
    position: fixed;
    left: 0;
    top: 0;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 99999;
    transition: opacity .18s ease, transform .12s ease;
    mix-blend-mode: screen;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff, rgba(255,255,255,0.95) 8%, rgba(255,77,166,0.12) 50%);
    box-shadow: 0 0 8px rgba(255,77,166,0.16), 0 0 4px rgba(95,240,255,0.06);
    opacity: 0.98;
    transform-origin: center;
}

.cursor-ring {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(95,240,255,0.26);
    box-shadow: 0 0 16px rgba(95,240,255,0.06);
    background: transparent;
    opacity: 0.85;
}

/* when hovering interactive elements */
body.cursor-hover .cursor-dot {
    transform: scale(0.9);
    background: radial-gradient(circle at 30% 30%, #ffffff, rgba(255,255,255,0.98) 8%, rgba(255,77,166,0.22) 50%);
    box-shadow: 0 0 12px rgba(255,77,166,0.22), 0 0 6px rgba(95,240,255,0.1);
}
body.cursor-hover .cursor-ring {
    transform: scale(1.4);
    border-color: rgba(255,77,166,0.42);
    opacity: 1;
}

/* on click feedback */
body.cursor-click .cursor-dot { transform: scale(0.6); opacity: 0.9; }
body.cursor-click .cursor-ring { transform: scale(0.95); opacity: 0.6; }

/* restore native cursor for interactive elements for accessibility */
a, button, input, textarea, select, label {
    cursor: auto !important;
}

/* hide on touch devices (no mouse) */
@media (pointer: coarse), (hover: none) {
    .cursor-dot, .cursor-ring { display: none !important; }
    body { cursor: auto; }
}