/* Dream Analyser UI Styles */

/* Override Bootstrap body and main background */
body {
    background: transparent !important;
    font-family: 'Cinzel', serif;
    position: relative;
    overflow-x: hidden;
}

html {
    background: #121330 !important;
}

#main {
    background: transparent !important;
}

#footer {
    background: rgba(0,0,0,0.2) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#footer .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Aurora Borealis Layers */
.aurora {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0.55;
    animation: aurora-shift ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
    will-change: opacity;
}

.aurora-1 {
    background:
        radial-gradient(ellipse 100% 75% at 50% 50%, rgba(148, 0, 211, 0.7) 0%, transparent 60%),
        radial-gradient(ellipse 90% 65% at 45% 48%, rgba(0, 255, 127, 0.6) 0%, transparent 60%),
        radial-gradient(ellipse 85% 60% at 55% 52%, rgba(30, 144, 255, 0.65) 0%, transparent 60%);
    animation-duration: 20s;
    animation-delay: 0s;
}

@keyframes aurora-shift {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 0.65; }
}

/* Stars */
.stars {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    pointer-events: none;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
}

.star-small {
    width: 1px;
    height: 1px;
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
}

.star-medium {
    width: 2px;
    height: 2px;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.9), 0 0 8px rgba(200, 220, 255, 0.5);
}

.star-large {
    width: 3px;
    height: 3px;
    box-shadow: 0 0 6px rgba(255, 255, 255, 1), 0 0 12px rgba(180, 200, 255, 0.7);
}

@keyframes twinkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(0.8);
    }
}

/* Ambient glow */
.ambient-glow {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(138, 43, 226, 0.08) 0%, transparent 40%),
        radial-gradient(ellipse at 70% 30%, rgba(0, 255, 150, 0.06) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(100, 149, 237, 0.05) 0%, transparent 50%);
    animation: glow-pulse 20s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes glow-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Apply mystical fonts */
.dream-read {
    padding: 0;
    background: transparent;
    min-height: 100vh;
    font-family: 'Cinzel', serif;
    position: relative;
    overflow-x: hidden;
}

.dream-read > * {
    position: relative;
    z-index: 1;
}

.dream-read .container {
    background: transparent !important;
}

.dream-read h1,
.dream-read h2,
.dream-read h3,
.dream-read h4,
.dream-read .btn {
    font-family: 'Cinzel Decorative', serif;
}

.dream-read h1 {
    color: #fff;
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin-top: 40px;
}

.reading-instructions {
    color: #fff;
}

.reading-instructions .lead {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
}

#dream-status {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

#dream-details-count {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.instruction-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-bottom: 20px;
}

/* Phase Sections */
.dream-input-phase,
.mood-selector-phase,
.symbol-phase,
.interpretation-phase {
    max-width: 900px;
    margin: 0 auto 30px;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dream-input-phase .card,
.mood-selector-phase .card,
.symbol-phase .card,
.interpretation-phase .card {
    background: rgba(10, 14, 39, 0.92);
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 8px 32px 0 rgba(255, 215, 0, 0.2);
}

.dream-read h3 {
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    font-weight: normal;
    font-size: 1.5rem;
}

.dream-read h4 {
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    font-size: 1.5rem;
}

/* Chat Messages Container */
.bubble-container {
    position: relative;
    min-height: 400px;
    max-height: 500px;
    background: transparent;
    border-radius: 15px;
    margin-bottom: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 2px solid rgba(255, 215, 0, 0.3);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bubble-container::-webkit-scrollbar {
    width: 8px;
}

.bubble-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.bubble-container::-webkit-scrollbar-thumb {
    background: rgba(138, 43, 226, 0.5);
    border-radius: 10px;
}

.bubble-container::-webkit-scrollbar-thumb:hover {
    background: rgba(138, 43, 226, 0.7);
}

/* Chat Message Bubbles */
.chat-message {
    max-width: 80%;
    padding: 15px 20px;
    border-radius: 20px;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    line-height: 1.6;
    animation: messageSlideIn 0.3s ease;
    word-wrap: break-word;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* User Message (Yellow) */
.chat-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25) 0%, rgba(255, 193, 7, 0.25) 100%);
    border: 2px solid rgba(255, 215, 0, 0.6);
    color: rgba(255, 255, 255, 0.95);
    margin-left: auto;
}

/* Assistant Message (Purple) */
.chat-message.assistant {
    align-self: flex-start;
    background: linear-gradient(135deg, rgba(45, 27, 78, 0.9) 0%, rgba(35, 21, 60, 0.9) 100%);
    border: 2px solid rgba(138, 43, 226, 0.5);
    color: rgba(255, 255, 255, 0.95);
    margin-right: auto;
}

/* Typing Indicator */
.typing-indicator {
    align-self: flex-start;
    background: rgba(45, 27, 78, 0.7);
    border: 2px solid rgba(138, 43, 226, 0.4);
    border-radius: 20px;
    padding: 15px 20px;
    display: flex;
    gap: 5px;
    align-items: center;
    margin-right: auto;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 215, 0, 0.8);
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Error Message */
.chat-message.error {
    align-self: center;
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid rgba(239, 68, 68, 0.5);
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    max-width: 90%;
}

.dream-bubble {
    position: absolute;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(138, 43, 226, 1), rgba(147, 51, 234, 1));
    border: 2px solid rgba(216, 180, 254, 0.5);
    border-radius: 30px;
    color: #fff;
    font-size: 1rem;
    cursor: move;
    user-select: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
    animation: bubbleFloat 3s ease-in-out infinite;
}

@keyframes bubbleFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.dream-bubble:hover {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-color: #ffd700;
    color: #121330;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
    transform: scale(1.05);
}

.dream-bubble.dragging {
    opacity: 0.7;
    cursor: grabbing;
    z-index: 1000;
    animation: none !important;
}

.bubble-delete {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.9);
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.dream-bubble:hover .bubble-delete {
    opacity: 1;
}

.bubble-delete:hover {
    background: rgba(220, 38, 38, 1);
    transform: scale(1.1);
}

/* Dream Input */
.dream-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.dream-input {
    flex: 1;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    border: 2px solid rgba(255, 215, 0, 0.3);
    background: transparent;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
}

.dream-input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    background: transparent;
    color: #fff;
    outline: none;
}

.dream-input::placeholder {
    color: #fff;
}

.btn-add-fragment {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(138, 43, 226, 1), rgba(147, 51, 234, 1));
    border: 2px solid rgba(216, 180, 254, 0.5);
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    font-weight: bold;
}

.btn-add-fragment:hover {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-color: #ffd700;
    color: #121330;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.btn-add-fragment .add-icon {
    display: block;
    line-height: 1;
}

/* Weather Selector */
.mood-dial-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    height: 400px;
    margin: 30px auto;
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.weather-sky {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #121330 0%, #1a1f3a 50%, #2a2f4a 100%);
    transition: background 1s ease;
}

/* Weather option buttons */
.weather-options {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 20px;
}

.weather-option {
    background: rgba(10, 14, 39, 0.8);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cinzel', serif;
    text-align: center;
    white-space: nowrap;
}

.weather-option:hover {
    background: rgba(138, 43, 226, 0.6);
    border-color: #ffd700;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.weather-option.selected {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.8), rgba(147, 51, 234, 0.7));
    border-color: #ffd700;
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

/* Weather particles and effects */
.weather-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Clear Sky - default state */
.weather-sky.clear {
    background: linear-gradient(180deg, #1e3a5f 0%, #4a6fa5 50%, #87ceeb 100%);
}

/* Clear Sky with Calm modifier - brighter, more vibrant blue */
.weather-sky.clear.calm-active {
    background: linear-gradient(180deg, #2b5aa0 0%, #5b9fd8 50%, #a8d8ff 100%);
}

.weather-sky.clear .star-particle {
    animation: twinkleSky 3s ease-in-out infinite;
}

/* Calm wind gusts - slow and steady */
.calm-wind {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%);
    animation: calm-wind-blow 8s ease-in-out infinite;
    opacity: 0.4;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

.calm-wind:nth-child(1) { top: 15%; width: 120px; animation-duration: 7s; }
.calm-wind:nth-child(2) { top: 25%; width: 150px; animation-duration: 9s; animation-delay: -2s; }
.calm-wind:nth-child(3) { top: 35%; width: 130px; animation-duration: 8s; animation-delay: -4s; }
.calm-wind:nth-child(4) { top: 50%; width: 140px; animation-duration: 8.5s; animation-delay: -6s; }
.calm-wind:nth-child(5) { top: 60%; width: 135px; animation-duration: 7.5s; animation-delay: -1s; }
.calm-wind:nth-child(6) { top: 70%; width: 145px; animation-duration: 8.8s; animation-delay: -3s; }
.calm-wind:nth-child(7) { top: 80%; width: 125px; animation-duration: 7.8s; animation-delay: -5s; }
.calm-wind:nth-child(8) { top: 90%; width: 155px; animation-duration: 9.2s; animation-delay: -7s; }

@keyframes calm-wind-blow {
    0% { transform: translateX(-100%); opacity: 0; }
    15% { opacity: 0.4; }
    85% { opacity: 0.4; }
    100% { transform: translateX(calc(100vw + 100%)); opacity: 0; }
}

/* Calm sunrays - gentle beams from above */
.calm-sunray {
    position: absolute;
    top: 0;
    width: 2px;
    height: 40%;
    background: linear-gradient(180deg,
        rgba(255, 250, 205, 0.4) 0%,
        rgba(255, 250, 205, 0.2) 50%,
        transparent 100%);
    opacity: 0;
    animation: sunray-fade 12s ease-in-out infinite;
    filter: blur(3px);
    transform-origin: top center;
}

.calm-sunray:nth-child(9) { left: 15%; animation-delay: 0s; }
.calm-sunray:nth-child(10) { left: 30%; animation-delay: -3s; width: 3px; }
.calm-sunray:nth-child(11) { left: 50%; animation-delay: -6s; }
.calm-sunray:nth-child(12) { left: 70%; animation-delay: -9s; width: 2.5px; }
.calm-sunray:nth-child(13) { left: 85%; animation-delay: -2s; }

@keyframes sunray-fade {
    0%, 100% { opacity: 0; transform: scaleY(0.8); }
    50% { opacity: 0.6; transform: scaleY(1); }
}

/* Storm (Anger) - Enhanced with yellow lightning */
.weather-sky.storm {
    background: linear-gradient(180deg, #0a0a1a 0%, #1a1a2e 40%, #2d2d44 100%);
}

.lightning {
    position: absolute;
    width: 8px;
    height: 100%;
    background: linear-gradient(180deg,
        transparent 0%,
        #fff 20%,
        #ffeb3b 40%,
        #ffd700 50%,
        #ffeb3b 60%,
        #fff 80%,
        transparent 100%);
    opacity: 0;
    animation: lightning-strike 2s infinite;
    filter: drop-shadow(0 0 12px #ffd700) drop-shadow(0 0 20px #ffeb3b);
    clip-path: polygon(
        40% 0%, 60% 0%,
        54% 30%, 65% 30%,
        50% 50%, 70% 50%,
        46% 75%, 75% 75%,
        40% 100%, 60% 100%,
        54% 75%, 35% 75%,
        50% 50%, 30% 50%,
        46% 30%, 35% 30%
    );
}

@keyframes lightning-strike {
    0%, 100% { opacity: 0; }
    47% { opacity: 0; }
    48% { opacity: 1; }
    49% { opacity: 0; }
    50% { opacity: 1; }
    51% { opacity: 0; }
}

/* Dark Night (Fear) */
.weather-sky.darknight {
    background: linear-gradient(180deg, #000000 0%, #0d0d1a 50%, #1a1a2e 100%);
}

.dark-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.3);
    animation: dark-twinkle linear infinite;
}

@keyframes dark-twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 0.6;
        transform: scale(1);
    }
}

/* Meteor Shower (Excitement) - Meteor shower effect */
.weather-sky.meteor {
    background: linear-gradient(180deg, #000000 0%, #0d0d1a 50%, #1a1a2e 100%);
    width: 100% !important;
    height: 100% !important;
    top: 0;
    left: 0;
    border-radius: 0 !important;
    transform: none !important;
}

.meteor {
    position: absolute;
    width: 3px;
    height: 60px;
    top: -60px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(255, 170, 0, 0.9) 70%,
        rgba(255, 140, 0, 0.7) 100%);
    box-shadow: 0 0 8px rgba(255, 140, 0, 0.6);
    transform: rotate(45deg);
    animation: meteor-shoot linear infinite;
}

@keyframes meteor-shoot {
    0% {
        transform: translateY(0) translateX(0) rotate(45deg);
        opacity: 1;
    }
    100% {
        transform: translateY(500px) translateX(500px) rotate(45deg);
        opacity: 0;
    }
}

/* Sunrise */
.weather-sky.sunrise {
    background: linear-gradient(180deg, #1a1a3e 0%, #4a3a5a 30%, #ff6b6b 60%, #ffd93d 85%, #ffe66d 100%);
}

.sun-glow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 223, 61, 0.8) 0%, rgba(255, 107, 107, 0.4) 40%, transparent 70%);
    border-radius: 50%;
    animation: sunrise-pulse 4s ease-in-out infinite;
}

@keyframes sunrise-pulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.8; }
    50% { transform: translateX(-50%) scale(1.1); opacity: 1; }
}

/* Fog */
.weather-sky.fog {
    background: linear-gradient(180deg, #4a5568 0%, #6b7280 50%, #9ca3af 100%);
}

.fog-layer {
    position: absolute;
    width: 100%;
    height: 40%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 25%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.3) 75%,
        transparent 100%);
    animation: fog-drift 8s linear infinite;
    filter: blur(20px);
}

.fog-layer:nth-child(1) { top: 20%; animation-duration: 10s; }
.fog-layer:nth-child(2) { top: 40%; animation-duration: 15s; animation-delay: -5s; }
.fog-layer:nth-child(3) { top: 60%; animation-duration: 12s; animation-delay: -8s; }

@keyframes fog-drift {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Warm Wind (Desire) - Warmer colors */
.weather-sky.wind {
    background: linear-gradient(135deg, #5a3a2d 0%, #8a5f4a 40%, #d4916a 70%, #ffb88c 100%);
}

.wind-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 200, 120, 0.6) 50%,
        transparent 100%);
    animation: wind-blow 3s linear infinite;
    opacity: 0.7;
    box-shadow: 0 0 10px rgba(255, 150, 80, 0.4);
}

.wind-line:nth-child(1) { top: 20%; width: 150px; animation-duration: 2.5s; }
.wind-line:nth-child(2) { top: 40%; width: 200px; animation-duration: 3s; animation-delay: -1s; }
.wind-line:nth-child(3) { top: 60%; width: 180px; animation-duration: 2.8s; animation-delay: -2s; }
.wind-line:nth-child(4) { top: 80%; width: 220px; animation-duration: 3.2s; animation-delay: -1.5s; }

@keyframes wind-blow {
    0% { transform: translateX(-100%); opacity: 0; }
    20% { opacity: 0.7; }
    80% { opacity: 0.7; }
    100% { transform: translateX(calc(100vw + 100%)); opacity: 0; }
}

/* Drizzle/Rain */
.weather-sky.drizzle {
    background: linear-gradient(180deg, #374151 0%, #4b5563 50%, #6b7280 100%);
}

.raindrop {
    position: absolute;
    width: 1px;
    height: 20px;
    background: linear-gradient(180deg, transparent 0%, rgba(173, 216, 230, 0.8) 50%, transparent 100%);
    animation: rainfall 1.5s linear infinite;
}

.raindrop:nth-child(odd) { animation-duration: 1.2s; }
.raindrop:nth-child(even) { animation-duration: 1.8s; }

@keyframes rainfall {
    0% { transform: translateY(-100px); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(400px); opacity: 0; }
}

/* Cloud elements for various weathers */
.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 100px;
    opacity: 0.7;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 100px;
}

.cloud-1 {
    width: 80px;
    height: 35px;
    top: 10%;
    left: 30%;
    animation: cloud-drift-1 25s ease-in-out infinite;
}

.cloud-1::before {
    width: 40px;
    height: 40px;
    top: -20px;
    left: 10px;
}

.cloud-1::after {
    width: 50px;
    height: 35px;
    top: -12px;
    right: 10px;
}

.cloud-2 {
    width: 90px;
    height: 40px;
    top: 35%;
    left: 50%;
    animation: cloud-drift-2 30s ease-in-out infinite;
}

.cloud-2::before {
    width: 45px;
    height: 45px;
    top: -22px;
    left: 15px;
}

.cloud-2::after {
    width: 55px;
    height: 40px;
    top: -15px;
    right: 15px;
}

@keyframes cloud-drift-1 {
    0%, 100% { transform: translateX(-100px); }
    50% { transform: translateX(250px); }
}

@keyframes cloud-drift-2 {
    0%, 100% { transform: translateX(100px); }
    50% { transform: translateX(-250px); }
}

/* Dark storm clouds - more visible */
.weather-sky.storm .cloud {
    background: rgba(60, 60, 70, 1);
    opacity: 0.9;
}

.weather-sky.storm .cloud::before,
.weather-sky.storm .cloud::after {
    background: rgba(60, 60, 70, 1);
}

/* Meteor weather clouds - make them visible like storm clouds */
.weather-sky.meteor .cloud {
    background: rgba(255, 255, 255, 0.9);
    opacity: 1;
    z-index: 10;
}

.weather-sky.meteor .cloud::before,
.weather-sky.meteor .cloud::after {
    background: rgba(255, 255, 255, 0.9);
}

/* Selected weather display */
.mood-center-label {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    pointer-events: none;
    z-index: 5;
}

.mood-icon {
    display: block;
    font-size: 3rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.7));
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.mood-name {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.7), 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Symbol Cards */
.symbol-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    padding: 20px;
    min-height: 300px;
}

.symbol-card {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.3), rgba(147, 51, 234, 0.2));
    border: 2px solid rgba(216, 180, 254, 0.4);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    animation: symbolReveal 0.6s ease-out backwards;
}

@keyframes symbolReveal {
    from {
        opacity: 0;
        transform: scale(0.5) rotateY(180deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}

.symbol-card:nth-child(1) { animation-delay: 0.1s; }
.symbol-card:nth-child(2) { animation-delay: 0.2s; }
.symbol-card:nth-child(3) { animation-delay: 0.3s; }
.symbol-card:nth-child(4) { animation-delay: 0.4s; }
.symbol-card:nth-child(5) { animation-delay: 0.5s; }
.symbol-card:nth-child(6) { animation-delay: 0.6s; }

.symbol-card:hover {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.5), rgba(147, 51, 234, 0.4));
    border-color: rgba(216, 180, 254, 0.8);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.5);
}

.symbol-card.selected {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.7), rgba(147, 51, 234, 0.6));
    border-color: #d8b4fe;
    box-shadow: 0 0 25px rgba(138, 43, 226, 0.8);
}

.symbol-glyph {
    font-size: 3rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(216, 180, 254, 0.8));
}

.symbol-name {
    font-size: 1.1rem;
    color: #d8b4fe;
    font-weight: 600;
    margin-bottom: 5px;
}

.symbol-category {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

/* Dream Fragments Box */
.dream-fragments-box {
    padding: 20px;
    background: transparent;
    border-radius: 10px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    margin-bottom: 30px;
    text-align: center;
}

.dream-fragments-box h4 {
    color: #ffd700;
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

.fragments-list {
    text-align: left;
    max-width: 700px;
    margin: 0 auto;
}

.fragments-list p {
    color: #ffd700;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    margin-bottom: 10px;
}

/* Interpretation Tabs */
.interpretation-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    padding: 20px;
    background: transparent;
    border-radius: 10px;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.tab-btn {
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 15px 25px;
    color: #ffd700;
    font-family: 'Cinzel Decorative', serif;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    transform: translateY(-2px);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.tab-btn.active {
    text-shadow: 0 0 15px rgba(255, 215, 0, 1);
}

.tab-icon {
    font-size: 2rem;
}

.tab-label {
    font-size: 0.9rem;
}

/* Interpretation Content */
.interpretation-content {
    position: relative;
    min-height: 300px;
}

.layer-content {
    display: none;
    padding: 30px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    border: 1px solid rgba(138, 43, 226, 0.3);
    animation: layerFade 0.5s ease;
}

.layer-content.active {
    display: block;
}

@keyframes layerFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.layer-content[data-layer="psychological"] {
    border-left: 4px solid #60a5fa;
}

.layer-content[data-layer="symbolic"] {
    border-left: 4px solid #f472b6;
}

.layer-content[data-layer="spiritual"] {
    border-left: 4px solid #a78bfa;
}

.layer-content[data-layer="patterns"] {
    border-left: 4px solid #fbbf24;
}

.layer-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
}

/* Resonance Feedback */
.resonance-feedback {
    margin-top: 40px;
    padding: 25px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.feedback-title {
    color: #d8b4fe;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.feedback-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.feedback-btn {
    background: rgba(138, 43, 226, 0.3);
    border: 2px solid rgba(138, 43, 226, 0.5);
    border-radius: 12px;
    padding: 12px 20px;
    color: #fff;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feedback-btn:hover {
    background: rgba(138, 43, 226, 0.5);
    border-color: #d8b4fe;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.4);
}

.feedback-btn.selected {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.6), rgba(16, 185, 129, 0.5));
    border-color: #34d399;
}

.feedback-icon {
    font-size: 1.2rem;
}

.feedback-label {
    font-size: 0.95rem;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #ffd700;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    border-color: #ffd700;
}

.btn-primary:disabled {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid rgba(102, 126, 234, 0.5);
    cursor: wait;
    transform: none;
}

.btn-secondary {
    padding: 12px 30px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Custom Emotion Input */
.custom-emotion-input {
    max-width: 500px;
    margin: 0 auto;
}

.custom-emotion-input .form-control {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    border: 2px solid rgba(255, 215, 0, 0.3);
    background: transparent;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    text-align: left;
}

.custom-emotion-input .form-control:focus {
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    background: transparent;
    color: #fff;
    outline: none;
}

.custom-emotion-input .form-control::placeholder {
    color: #fff;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: #d8b4fe;
}

.loading::after {
    content: "Psychonaut is entering your dream realm...";
    font-size: 1.2rem;
    animation: dreamGlow 2s infinite;
}

@keyframes dreamGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(138, 43, 226, 1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dream-read h1 {
        font-size: 2rem;
    }

    .bubble-container {
        min-height: 250px;
    }

    .mood-dial-container {
        width: 300px;
    }

    .mood-icon {
        font-size: 2rem;
    }

    .mood-name {
        font-size: 1rem;
    }

    .symbol-container {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 15px;
    }

    .interpretation-tabs {
        gap: 8px;
    }

    .tab-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .tab-icon {
        font-size: 1.5rem;
    }

    .feedback-buttons {
        flex-direction: column;
    }

    .feedback-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Full-screen result display */
.interpretation-phase.fullscreen-result {
    max-width: none;
    width: 100%;
    min-height: 100vh;
    background: #121330;
    padding: 0;
    margin: 0;
}

.interpretation-phase.fullscreen-result .card {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    margin: 0;
    background: rgba(15, 20, 40, 0.95);
    border: none;
    border-radius: 0;
}

.fullscreen-result .card-body {
    padding: 3rem;
}

.return-button-container {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Action Buttons Container */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Share Button Styles */
.btn-share {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: 2px solid rgba(16, 185, 129, 0.6);
    color: #fff;
    padding: 12px 35px;
    font-size: 1.1rem;
    font-family: 'Cinzel Decorative', serif;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 10px;
}

.btn-share:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.btn-share:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}