/* --- BASE STYLES (Robot & Background) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    background: radial-gradient(circle at top, #0d1221, #02050f 70%);
    color: #ffffff;
    overflow: hidden; /* Prevent scrolling on main body */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 430px;
    text-align: center;
    transition: 0.3s;
}

/* Robot neon card */
.robot-box {
    width: 380px;
    height: 380px;
    margin: 0 auto;
    background: rgba(15, 25, 50, 0.85);
    border-radius: 28px;
    border: 2px solid rgba(90, 140, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 80px rgba(49, 85, 255, 0.8),
                0 0 40px rgba(49, 85, 255, 0.4);
}

.robot-img {
    width: 95%;
    height: 95%;
    object-fit: contain;
}

/* Glowing message bubble */
.glow-message {
    margin: 22px auto;
    width: 95%;
    padding: 22px;
    font-size: 26px;
    font-family: Georgia, serif;
    border-radius: 22px;
    background: rgba(18, 35, 85, 0.6);
    border: 1px solid rgba(49, 85, 255, 0.8);
    box-shadow: 0 0 60px rgba(49, 85, 255, 1),
                inset 0 0 18px rgba(49, 85, 255, 0.4);
    line-height: 1.3;
}

/* Main CTA button */
.desi-btn {
    width: 92%;
    margin-top: 25px;
    padding: 18px;
    border-radius: 45px;
    font-size: 20px;
    font-weight: 600;
    border: 2px solid #5876ff;
    background: #1a2745;
    color: #fff;
    cursor: pointer;
    transition: .25s;
    box-shadow: 0 0 35px rgba(49,85,255,.9);
}

.desi-btn:hover {
    background: #3155ff;
    box-shadow: 0 0 55px rgba(49,85,255,1);
    transform: scale(1.02);
}

/* --- CHAT MODAL STYLES --- */
.chat-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(8px);
    display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: 0.3s ease;
    z-index: 1000;
}
.chat-modal.active { opacity: 1; pointer-events: all; }

.chat-content {
    width: 90%; max-width: 400px; height: 85vh;
    background: #0a0f1d; border: 1px solid #5876ff;
    border-radius: 20px; display: flex; flex-direction: column;
    box-shadow: 0 0 50px rgba(88, 118, 255, 0.4);
    overflow: hidden;
}

/* Header */
.chat-header {
    padding: 15px; background: #151e36; border-bottom: 1px solid #333;
    display: flex; justify-content: space-between; align-items: center;
}
.close-btn { background: none; border: none; color: #fff; font-size: 1.2rem; cursor: pointer; }

/* Messages Area */
.chat-messages {
    flex: 1; padding: 15px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 15px;
}
.message { max-width: 85%; padding: 10px 15px; border-radius: 12px; font-size: 14px; line-height: 1.4; }
.message.bot { align-self: flex-start; background: #1f2940; border: 1px solid #5876ff; color: #e0e6ff; }
.message.user { align-self: flex-end; background: #5876ff; color: white; }

/* --- NEW: STARTUP OPTION BUTTONS (Manual vs Upload) --- */
.option-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}

.option-btn {
    background: transparent;
    border: 1px solid #5876ff;
    color: #fff;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
}

.option-btn:hover {
    background: #5876ff;
    box-shadow: 0 0 15px rgba(88, 118, 255, 0.5);
}

/* Input Area */
.chat-input-area {
    padding: 15px; background: #111827; border-top: 1px solid #333;
    display: flex; flex-direction: column; gap: 10px;
}
input, select, textarea {
    width: 100%; padding: 12px; background: #0a0f1d; border: 1px solid #333;
    border-radius: 8px; color: #fff; outline: none; font-size: 14px;
}
input:focus, textarea:focus { border-color: #5876ff; }
textarea { resize: none; height: 60px; }
.row { display: flex; gap: 10px; }

/* Action Buttons */
.action-buttons { display: flex; gap: 10px; margin-top: 5px; }
.action-btn {
    flex: 1; padding: 12px; border: none; border-radius: 8px;
    color: white; font-weight: 600; cursor: pointer; transition: 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.slogan-btn { background: #2196F3; }
.slogan-btn:hover { background: #1976D2; }
.poster-btn { background: #8e44ad; }
.poster-btn:hover { background: #9b59b6; }
.action-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* --- IMAGE & DOWNLOAD OVERLAY STYLES --- */
.image-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
}
.image-container img {
    width: 100%;
    border-radius: 8px;
    display: block;
}

.download-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    border: 1px solid #5876ff;
    transition: 0.3s;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.download-icon:hover {
    background: #5876ff;
    transform: scale(1.1);
}
/* Add this to the bottom of style.css */

.textarea-wrapper {
    width: 100%;
    position: relative;
}

.mic-icon {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(31, 41, 64, 0.8);
    color: #5876ff;
    border: 1px solid #5876ff;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
}

.mic-icon:hover {
    background: #5876ff;
    color: white;
}

/* Animation for when recording is active */
.mic-icon.listening {
    background: #ff4d4d;
    color: white;
    border-color: #ff4d4d;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 77, 77, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); }
}
