@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@700&display=swap');

/* Keyframe Animations */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 20px rgba(238, 119, 82, 0.3), 0 0 10px rgba(255,255,255,0.1) inset; }
    50% { box-shadow: 0 0 45px rgba(35, 166, 213, 0.9), 0 0 20px rgba(255,255,255,0.2) inset; }
    100% { box-shadow: 0 0 20px rgba(238, 119, 82, 0.3), 0 0 10px rgba(255,255,255,0.1) inset; }
}

@keyframes violent-shake {
    0%, 100% { transform: translate(1px, -1px) rotate(-1deg); }
    25% { transform: translate(-2px, 2px) rotate(1deg); }
    50% { transform: translate(2px, -2px) rotate(0deg); }
    75% { transform: translate(-1px, 1px) rotate(1deg); }
}

@keyframes move-stars {
    from { transform: translateY(0px); }
    to { transform: translateY(-2000px); }
}

@keyframes input-glow {
    from { width: 0%; }
    to { width: 100%; }
}

@keyframes aurora-wave {
    0% { transform: translateX(-50%) translateY(-50%) rotate(0deg); opacity: 0.5; }
    50% { transform: translateX(-50%) translateY(-60%) rotate(180deg); opacity: 1; }
    100% { transform: translateX(-50%) translateY(-50%) rotate(360deg); opacity: 0.5; }
}


/* Base Styles */
body {
    font-family: "Comic Neue", "Comic Sans MS", "Chalkboard SE", sans-serif;
    background: #0d1a2e;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    text-align: center;
    overflow: hidden;
    position: relative;
    perspective: 1000px;
}

/* Background Effects */
.aurora, .stars, .stars-2 { position: absolute; }
.aurora {
    top: 50%; left: 50%; width: 150vw; height: 150vw;
    background: radial-gradient(circle, rgba(35, 166, 213, 0.4) 0%, rgba(231, 60, 126, 0.4) 50%, rgba(0,0,0,0) 70%);
    border-radius: 50%; animation: aurora-wave 20s ease-in-out infinite;
}
.stars, .stars-2 {
    width: 2px; height: 2px; background: white; border-radius: 50%;
    box-shadow: 600px 800px #fff, 200px 1500px #fff, 1000px 300px #fff, 1400px 1200px #fff, 1800px 600px #fff, 900px 1800px #fff, 400px 900px #fff, 1600px 200px #fff, 1200px 1400px #fff, 50px 1900px #fff, 1950px 100px #fff, 700px 1000px #fff;
    animation: move-stars 200s linear infinite;
}
.stars-2 {
    width: 1px; height: 1px;
    box-shadow: 100px 500px #fff, 800px 1300px #fff, 1100px 700px #fff, 1500px 1000px #fff, 300px 1700px #fff, 1700px 400px #fff, 1300px 100px #fff, 1900px 1600px #fff;
    animation-duration: 100s; animation-delay: -10s;
}

/* Card Container */
.container {
    background: rgba(20, 10, 30, 0.75);
    backdrop-filter: blur(12px);
    padding: 40px 50px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 90%; max-width: 520px;
    animation: pulse-glow 10s ease-in-out infinite;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease-in-out;
    position: relative; z-index: 1;
    transform-style: preserve-3d;
}

/* Header Controls for Mood & Language */
.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    top: 15px;
    left: 20px;
    right: 20px;
}

#moodIndicator {
    font-size: 0.9em; font-style: italic; color: rgba(255, 255, 255, 0.6);
    transition: color 0.5s ease;
    text-align: right;
}

#languageSelector {
    background: rgba(0,0,0,0.3);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 5px;
    padding: 3px;
    font-family: "Comic Neue", sans-serif;
    font-size: 0.8em;
}

/* Title & Description */
h1 {
    margin-top: 20px; color: #fff; font-weight: 700; font-size: 2.7em;
    text-shadow: 0 0 10px #fff, 0 0 20px #ff00cc, 0 0 35px #ff00cc, 0 0 55px #6600ff;
}
p { color: #e0d7f3; margin-bottom: 30px; font-size: 1.2em; line-height: 1.5em; }

/* Input Field */
.input-container { position: relative; margin-bottom: 20px; }
#passwordInput {
    width: 100%; padding: 16px; font-size: 17px;
    border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.05); color: #fff;
    transition: all 0.3s ease-in-out;
}
#passwordInput::placeholder { color: rgba(255, 255, 255, 0.4); }
#passwordInput:focus {
    outline: none; border-color: #e73c7e;
    box-shadow: 0 0 25px rgba(231, 60, 126, 0.7), 0 0 5px rgba(255,255,255,0.3);
    background-color: rgba(255, 255, 255, 0.08);
}
.input-container::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    height: 2px; width: 0; background: #e73c7e;
    box-shadow: 0 0 10px #e73c7e; transition: width 0.4s ease-out;
}
#passwordInput:focus + .input-container::after, .input-container:has(#passwordInput:focus)::after { width: 100%; }

/* Feedback Box */
#feedback {
    min-height: 50px; padding: 18px; border-radius: 10px;
    font-weight: 700; transition: all 0.3s ease;
    display: flex; justify-content: center; align-items: center;
    font-size: 1.1em; border: 1px dashed transparent; color: #fff;
    backdrop-filter: blur(4px);
}
.feedback-neutral { background-color: rgba(35, 166, 213, 0.15); border-color: rgba(35, 166, 213, 0.7); }
.feedback-sassy { background-color: rgba(255, 107, 107, 0.15); border-color: rgba(255, 107, 107, 0.7); }
.feedback-poetic { background-color: rgba(112, 161, 255, 0.15); border-color: rgba(112, 161, 255, 0.7); }
.feedback-sleepy { background-color: rgba(162, 155, 254, 0.15); border-color: rgba(162, 155, 254, 0.7); }
.feedback-confused { background-color: rgba(253, 224, 71, 0.15); border-color: rgba(253, 224, 71, 0.7); }
.feedback-prophecy { background-color: rgba(255, 204, 112, 0.15); border-color: rgba(255, 204, 112, 0.7); font-style: italic; }
.feedback-joke { background-color: rgba(45, 212, 191, 0.15); border-color: rgba(45, 212, 191, 0.7); }
.feedback-aura { background-color: rgba(224, 170, 255, 0.15); border-color: rgba(224, 170, 255, 0.7); }

/* Aura Display */
#auraDisplay { display: flex; justify-content: center; gap: 10px; margin: 15px 0; min-height: 40px; }
.aura-swatch {
    width: 40px; height: 40px;
    border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}
.aura-swatch:hover { transform: scale(1.1); }

/* Button Grid */
.button-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 15px; }
.button-grid button {
    color: white; border: none; padding: 16px 10px;
    border-radius: 10px; cursor: pointer; font-weight: 700;
    font-size: 16px; font-family: "Comic Neue", sans-serif;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease-in-out;
}
#generateButton { background: linear-gradient(45deg, #e73c7e, #23a6d5, #ffcc70); background-size: 300%; }
#prophecyButton { background: linear-gradient(45deg, #6600ff, #a900ff, #d400ff); background-size: 200%; }
#jokeButton { background: linear-gradient(45deg, #10b981, #2dd4bf, #99f6e4); background-size: 200%; }
#auraButton { background: linear-gradient(45deg, #f59e0b, #fbbf24, #fde68a); background-size: 200%; }

.button-grid button:hover {
    background-position: right;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}
.button-grid button:active { transform: translateY(0px) scale(1); box-shadow: 0 2px 10px rgba(0,0,0,0.3); }
#generateButton:disabled { cursor: not-allowed; background: #333; animation: violent-shake 0.5s linear infinite; color: #aaa; }
