body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #2a1a3d 0%, #4a1f5c 50%, #1f1635 100%);
    font-family: 'Courier New', 'Consolas', monospace;
    min-height: 100vh;
    position: relative;
}

/* Particles d'étoiles animées */
body::before {
    content: "";
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #ff9ed8, transparent),
        radial-gradient(2px 2px at 60px 70px, #b896ff, transparent),
        radial-gradient(1px 1px at 50px 50px, #d4b5ff, transparent),
        radial-gradient(1px 1px at 130px 80px, #ff9ed8, transparent),
        radial-gradient(2px 2px at 90px 10px, #b896ff, transparent);
    background-size: 200px 200px;
    background-position: 0 0, 40px 60px, 130px 270px, 70px 100px, 150px 50px;
    animation: sparkle 20s linear infinite;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.4; }
}

#terminal {
    box-sizing: border-box;
    padding: 30px;
    margin: 20px;
    max-height: calc(100vh - 40px);
    height: calc(100vh - 40px);
    background: rgba(30, 20, 40, 0.95);
    border: 4px solid transparent;
    border-radius: 25px;
    outline: none;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 
        0 8px 32px rgba(184, 150, 255, 0.4),
        inset 0 2px 10px rgba(150, 100, 200, 0.2),
        0 0 60px rgba(255, 158, 216, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
    background-image: 
        linear-gradient(rgba(184, 150, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(184, 150, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% {
        border-color: #b896ff;
        box-shadow: 
            0 8px 32px rgba(184, 150, 255, 0.4),
            inset 0 2px 10px rgba(150, 100, 200, 0.2),
            0 0 60px rgba(255, 158, 216, 0.1);
    }
    50% {
        border-color: #ff9ed8;
        box-shadow: 
            0 8px 32px rgba(255, 158, 216, 0.5),
            inset 0 2px 10px rgba(150, 100, 200, 0.2),
            0 0 80px rgba(184, 150, 255, 0.2);
    }
}

#terminal::-webkit-scrollbar {
    width: 14px;
}

#terminal::-webkit-scrollbar-track {
    background: #2a1a3d;
    border-radius: 10px;
    border: 2px solid rgba(184, 150, 255, 0.1);
}

#terminal::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #b896ff, #ff9ed8);
    border-radius: 10px;
    border: 2px solid #2a1a3d;
    box-shadow: 0 0 10px rgba(184, 150, 255, 0.5);
}

#terminal::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #c9a7ff, #ffb3e6);
    box-shadow: 0 0 15px rgba(184, 150, 255, 0.8);
}

.prompt {
    color: #ff9ed8;
    text-shadow: 
        0 0 10px rgba(255, 158, 216, 0.5),
        0 0 20px rgba(255, 158, 216, 0.2);
    font-weight: 500;
}

.prompt::before {
    content: "✨ ";
    animation: twinkle 2s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#screen {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #d4b5ff;
    text-shadow: 0 0 5px rgba(212, 181, 255, 0.3);
}

#input-line {
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, rgba(60, 40, 80, 0.6), rgba(80, 50, 100, 0.6));
    padding: 10px 15px;
    border-radius: 15px;
    border: 2px solid #b896ff;
    box-shadow: 
        0 2px 8px rgba(184, 150, 255, 0.3),
        inset 0 1px 3px rgba(255, 255, 255, 0.1);
    margin-top: 5px;
    animation: inputGlow 2s ease-in-out infinite;
}

@keyframes inputGlow {
    0%, 100% {
        box-shadow: 
            0 2px 8px rgba(184, 150, 255, 0.3),
            inset 0 1px 3px rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 
            0 2px 12px rgba(184, 150, 255, 0.5),
            inset 0 1px 5px rgba(255, 255, 255, 0.2);
    }
}

#input {
    color: #e5d4ff;
    margin-left: 4px;
    text-shadow: 0 0 5px rgba(229, 212, 255, 0.3);
}

.cursor {
    color: #ff9ed8;
    animation: blink 1s steps(1) infinite, glow 2s ease-in-out infinite;
    margin-left: 2px;
    display: inline-block;
}

@keyframes blink {
    50% { opacity: 0; }
}

@keyframes glow {
    0%, 100% { 
        text-shadow: 0 0 5px rgba(255, 158, 216, 0.6);
        transform: scale(1);
    }
    50% { 
        text-shadow: 
            0 0 15px rgba(255, 158, 216, 0.9), 
            0 0 25px rgba(184, 150, 255, 0.5);
        transform: scale(1.1);
    }
}

#screen::first-line {
    color: #b896ff;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(184, 150, 255, 0.5);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#terminal:focus {
    border-color: #d4b5ff;
    box-shadow: 
        0 8px 32px rgba(184, 150, 255, 0.6),
        0 0 0 3px rgba(212, 181, 255, 0.3),
        inset 0 2px 10px rgba(150, 100, 200, 0.2),
        0 0 100px rgba(255, 158, 216, 0.2);
}

/* Floating hearts decoration */
.heart {
    position: fixed;
    color: #ff9ed8;
    font-size: 20px;
    animation: floatUp 6s ease-in infinite;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
}

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

/* Top corner decoration */
body::after {
    content: "♡";
    position: fixed;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #ff9ed8;
    animation: float 3s ease-in-out infinite;
    text-shadow: 
        0 0 10px rgba(255, 158, 216, 0.6),
        0 0 20px rgba(255, 158, 216, 0.3);
    z-index: 1000;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
    }
    50% { 
        transform: translateY(-10px) rotate(10deg);
    }
}

/* Scan line effect */
#terminal::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(184, 150, 255, 0.05) 50%,
        transparent 100%
    );
    animation: scan 8s linear infinite;
    pointer-events: none;
    border-radius: 25px;
    overflow: hidden;
}

@keyframes scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}