/* === RESET & BASE STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Uncial Antiqua', serif;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #000000 100%);
    color: #00ff41;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* === BACKGROUND EFFECTS === */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.flame {
    position: absolute;
    width: 20px;
    height: 40px;
    background: linear-gradient(45deg, #ff4757, #ff6b6b, #ff8787);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flicker 2s infinite alternate;
    filter: blur(1px);
}

.flame-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.flame-2 {
    top: 60%;
    right: 15%;
    animation-delay: 0.7s;
}

.flame-3 {
    bottom: 30%;
    left: 80%;
    animation-delay: 1.3s;
}

.floating-pentagram {
    position: absolute;
    font-size: 30px;
    color: #ff4757;
    animation: float 4s ease-in-out infinite;
    opacity: 0.3;
}

.pentagram-1 {
    top: 15%;
    right: 20%;
    animation-delay: 0s;
}

.pentagram-2 {
    bottom: 25%;
    left: 25%;
    animation-delay: 2s;
}

@keyframes flicker {
    0% { transform: scale(1) rotate(0deg); opacity: 0.8; }
    50% { transform: scale(1.1) rotate(2deg); opacity: 1; }
    100% { transform: scale(0.9) rotate(-2deg); opacity: 0.9; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(120deg); }
    66% { transform: translateY(-10px) rotate(240deg); }
}

/* === HEADER === */
header {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #ff4757;
    box-shadow: 0 4px 20px rgba(255, 71, 87, 0.3);
}

.main-title {
    font-family: 'Metal Mania', cursive;
    font-size: clamp(2rem, 6vw, 4rem);
    color: #00ff41;
    text-shadow: 
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000,
        2px 2px 0 #000,
        0 0 10px #00ff41,
        0 0 20px #00ff41,
        0 0 30px #00ff41;
    margin-bottom: 0.5rem;
    animation: glow 2s ease-in-out infinite alternate;
}

.subtitle {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    color: #39ff14;
    margin-top: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

@keyframes glow {
    from { 
        text-shadow: 
            -2px -2px 0 #000,
            2px -2px 0 #000,
            -2px 2px 0 #000,
            2px 2px 0 #000,
            0 0 10px #00ff41,
            0 0 20px #00ff41,
            0 0 30px #00ff41;
    }
    to { 
        text-shadow: 
            -2px -2px 0 #000,
            2px -2px 0 #000,
            -2px 2px 0 #000,
            2px 2px 0 #000,
            0 0 15px #00ff41,
            0 0 25px #00ff41,
            0 0 35px #00ff41,
            0 0 40px #39ff14;
    }
}

/* === CHAT CONTAINER === */
.chat-container {
    max-width: 800px;
    margin: 2rem auto;
    background: rgba(15, 15, 15, 0.9);
    border: 2px solid #ff4757;
    border-radius: 15px;
    box-shadow: 
        0 10px 30px rgba(255, 71, 87, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-bottom: 1px solid #ff4757;
}

.devil-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff4757, #ff6b6b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-right: 1rem;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
}

.chat-info h2 {
    font-family: 'Metal Mania', cursive;
    color: #00ff41;
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.status {
    display: flex;
    align-items: center;
    color: #39ff14;
    font-size: 0.9rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}

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

/* === CHAT MESSAGES === */
.chat-messages {
    height: 400px;
    padding: 1.5rem;
    overflow-y: auto;
    background: rgba(10, 10, 10, 0.8);
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 71, 87, 0.1);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #ff4757;
    border-radius: 10px;
}

.message {
    display: flex;
    margin-bottom: 1.5rem;
    animation: messageSlideIn 0.5s ease-out;
}

@keyframes messageSlideIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: linear-gradient(135deg, #ff4757, #ff6b6b);
    color: white;
    box-shadow: 0 2px 10px rgba(255, 71, 87, 0.3);
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    margin-right: 0;
    margin-left: 1rem;
}

.message-content {
    background: rgba(255, 71, 87, 0.1);
    padding: 1rem 1.2rem;
    border-radius: 18px;
    max-width: 70%;
    border: 1px solid rgba(255, 71, 87, 0.3);
    backdrop-filter: blur(5px);
}

.user-message .message-content {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
    text-align: right;
}

.message-content p {
    margin: 0;
    line-height: 1.5;
    color: #00ff41;
    font-size: 0.95rem;
}

.user-message .message-content p {
    color: #90EE90;
}

.message-time {
    display: block;
    font-size: 0.75rem;
    color: rgba(0, 255, 65, 0.6);
    margin-top: 0.5rem;
    font-style: italic;
}

/* === CHAT INPUT === */
.chat-input-container {
    padding: 1.5rem;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-top: 1px solid #ff4757;
}

.input-wrapper {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

#userInput {
    flex: 1;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #ff4757;
    border-radius: 25px;
    color: #ff8787;
    font-family: 'Uncial Antiqua', serif;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

#userInput::placeholder {
    color: rgba(255, 135, 135, 0.5);
    font-style: italic;
}

#userInput:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.3);
    transform: scale(1.02);
}

.send-button {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff4757, #ff6b6b);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
}

.send-button:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.6);
}

.send-button:active {
    transform: scale(0.95);
}

.disclaimer {
    text-align: center;
    color: rgba(255, 135, 135, 0.6);
    font-size: 0.8rem;
    font-style: italic;
}

/* === FOOTER === */
footer {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid #ff4757;
    color: rgba(255, 135, 135, 0.7);
    font-size: 0.9rem;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .chat-container {
        margin: 1rem;
        border-radius: 10px;
    }
    
    .chat-messages {
        height: 300px;
        padding: 1rem;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    header {
        padding: 1.5rem 1rem;
    }
    
    .chat-header {
        padding: 1rem;
    }
    
    .chat-input-container {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .input-wrapper {
        flex-direction: column;
    }
    
    .send-button {
        align-self: center;
    }
    
    .message-content {
        max-width: 90%;
        padding: 0.8rem 1rem;
    }
}