:root {
    --bg-color: #050505;
    --glass-bg: rgba(20, 0, 0, 0.4);
    --glass-border: rgba(255, 50, 50, 0.2);
    --primary-red: #ff2a2a;
    --glow-red: #ff0000;
    --text-main: #f0f0f0;
    --text-dim: #a0a0a0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Rajdhani', sans-serif;
    height: 100vh;
    overflow: hidden;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(50, 0, 0, 0.2) 0%, rgba(0, 0, 0, 1) 100%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ff0000' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.dashboard-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    height: 100vh;
    padding: 30px;
    gap: 30px;
    position: relative;
    z-index: 10;
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.side-panel {
    width: 300px;
    padding: 20px;
}

.center-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Widgets */
.widget {
    margin-bottom: 30px;
}

.clock-widget {
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 10px var(--glow-red);
}

#time {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-red);
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
    width: 280px;
    display: inline-block;
    text-align: center;
}

#date {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-top: 5px;
}

.status-widget h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-red);
    margin-bottom: 15px;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 5px;
}

.status-widget ul {
    list-style: none;
}

.status-widget li {
    margin-bottom: 10px;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
}

.status-ok {
    color: #00ffaa;
    text-shadow: 0 0 5px #00ffaa;
}

/* Avatar Area */
.avatar-container {
    position: relative;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.avatar-video {
    width: 500px;
    height: 500px;
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
    border: 3px solid rgba(255, 50, 50, 0.1);
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* Speaking Animation */
.speaking .avatar-video {
    box-shadow: 0 0 60px rgba(255, 50, 50, 0.8);
    border-color: rgba(255, 50, 50, 0.5);
    transform: scale(1.05);
}

/* Start Screen */
.start-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: opacity 1s ease;
}

.start-btn {
    padding: 15px 40px;
    font-size: 1.5rem;
    font-family: 'Orbitron', sans-serif;
    background: transparent;
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 3px;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
    transition: all 0.3s ease;
    width: auto;
    border-radius: 5px;
}

.start-btn:hover {
    background: rgba(255, 0, 0, 0.1);
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.6);
    transform: scale(1.05);
}

/* Audio Waves */
.audio-waves {
    display: flex;
    gap: 5px;
    margin-top: 30px;
    height: 30px;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.speaking ~ .audio-waves {
    opacity: 1;
}

.wave {
    width: 4px;
    height: 10px;
    background-color: var(--primary-red);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--glow-red);
}

.speaking ~ .audio-waves .wave:nth-child(1) { animation: waveAnim 1s infinite 0.1s; }
.speaking ~ .audio-waves .wave:nth-child(2) { animation: waveAnim 1s infinite 0.3s; }
.speaking ~ .audio-waves .wave:nth-child(3) { animation: waveAnim 1s infinite 0.5s; }

@keyframes waveAnim {
    0%, 100% { height: 10px; }
    50% { height: 30px; }
}

/* Chat Area */
.right-panel {
    width: 350px;
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-container::-webkit-scrollbar {
    width: 6px;
}
.chat-container::-webkit-scrollbar-thumb {
    background: rgba(255, 50, 50, 0.3);
    border-radius: 3px;
}

.message {
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 1.1rem;
    line-height: 1.4;
    max-width: 90%;
    animation: fadeIn 0.3s ease;
}

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

.user-message {
    align-self: flex-end;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom-right-radius: 2px;
}

.asena-message {
    align-self: flex-start;
    background: rgba(255, 0, 0, 0.15);
    border: 1px solid var(--glass-border);
    border-bottom-left-radius: 2px;
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

.system-message {
    align-self: center;
    background: transparent;
    color: var(--text-dim);
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
}

/* Input Area */
.input-area {
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

#textInput {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    outline: none;
}

#textInput::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.input-area button {
    background: transparent;
    border: none;
    color: var(--primary-red);
    font-size: 1.2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.input-area button:hover {
    background: rgba(255, 50, 50, 0.2);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
}

.mic-active {
    color: #fff;
    background: var(--glow-red);
    box-shadow: 0 0 20px var(--glow-red);
    animation: pulseMic 1s infinite alternate;
}

@keyframes pulseMic {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); box-shadow: 0 0 30px var(--glow-red); }
}

/* Background Particles (Simple JS fallback) */
.particles {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 1;
}

/* Feedback Button & Modal */
.feedback-btn {
    margin-top: auto; /* Pushes to bottom of flex container */
    background: rgba(255, 50, 50, 0.2);
    border: 1px solid var(--primary-red);
    color: var(--primary-red);
    padding: 12px 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1em;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.feedback-btn:hover {
    background: rgba(255, 50, 50, 0.4);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: rgba(20, 0, 0, 0.9);
    padding: 30px;
    border-radius: 10px;
    width: 400px;
    text-align: center;
    position: relative;
    border: 1px solid var(--primary-red);
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.2);
}

.modal-content h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-red);
    margin-bottom: 15px;
}

.modal-content textarea {
    width: 100%;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,50,50,0.3);
    color: #fff;
    padding: 10px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    resize: none;
    margin-bottom: 15px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    color: var(--primary-red);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: #fff;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .dashboard-container {
        flex-direction: column;
        height: auto;
        padding: 15px;
        overflow-y: visible;
    }
    body {
        overflow: auto;
        height: auto;
    }
    .side-panel {
        width: 100%;
        margin-bottom: 20px;
    }
    .avatar-container {
        width: 300px;
        height: 300px;
        margin: 20px auto;
    }
    .avatar-video {
        width: 280px;
        height: 280px;
    }
    .right-panel {
        width: 100%;
        margin-bottom: 20px;
    }
    .chat-container {
        min-height: 300px;
        max-height: 400px;
    }
    #time {
        width: 100%;
        font-size: 2.5rem;
    }
}
