:root {
    --primary-color: #00f7ff;
    --secondary-color: #1a1a2e;
    --accent-color: #4ecca3;
    --background-color: #0a192f;
    --text-color: #e4e4e4;
    --error-color: #ff4757;
    --success-color: #2ed573;
    --warning-color: #ffa502;
    --neon-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color), 0 0 30px var(--primary-color);
}

body {
    background: var(--background-color);
    color: var(--text-color);
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

.container {
    max-width: 100%;
    width: 90%;
    height: 85vh;
    margin: 20px;
    padding: 30px;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 247, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 247, 255, 0.1);
    border-radius: 20px;
    animation: glow 3s infinite;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.container_list {
    max-width: 100%;
    height: 85vh;
    width: 90%;
    margin: 20px;
    padding: 30px;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 247, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 247, 255, 0.1);
    border-radius: 20px;
    animation: glow 3s infinite;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ai-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    flex-shrink: 0;
}

.ai-icon {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

h1 {
    color: var(--text-color);
    font-size: 2.5em;
    margin: 10px 0;
    font-weight: 600;
    position: relative;
}

.control-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(26, 26, 46, 0.8);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 247, 255, 0.2);
    flex-shrink: 0;
}

.status-panel, .voice-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator {
    display: none;
}

.language-dropdown {
    padding: 10px 15px;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    font-size: 14px;
    background: rgba(26, 26, 46, 0.9);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.2);
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
    flex-shrink: 0;
}

button {
    background: transparent;
    color: white;
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    padding: 12px 30px;
    font-size: 1em;
    transition: all 0.3s ease;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.2);
    position: relative;
    overflow: hidden;
}

button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 247, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

button:hover:before {
    left: 100%;
}

.log-wrapper {
    background: rgba(26, 26, 46, 0.8);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(0, 247, 255, 0.2);
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0; /* Important for flexbox to work properly */
}

.log-header {
    background: var(--secondary-color);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1em;
    border-bottom: 1px solid var(--primary-color);
    flex-shrink: 0;
}

.log-container {
    margin: 0;
    padding: 20px;
    overflow-y: auto;
    background: rgba(26, 26, 46, 0.5);
    flex: 1;
}

.log-entry {
    margin: 10px 0;
    padding: 12px 15px;
    border-radius: 8px;
    background: rgba(26, 26, 46, 0.9);
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.1);
}

.log-info {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.log-error {
    color: var(--error-color);
    border-left-color: var(--error-color);
}

/* Scrollbar styling */
.log-container::-webkit-scrollbar {
    width: 8px;
}

.log-container::-webkit-scrollbar-track {
    background: #F8F9FA;
}

.log-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.log-container::-webkit-scrollbar-thumb:hover {
    background: #5851DB;
}

/* Responsive Design */
@media (max-width: 768px) {
    .control-panel {
        flex-direction: column;
        gap: 20px;
    }
    
    .container, .container_list {
        padding: 20px;
        height: 90vh;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .ai-header {
        margin-bottom: 20px;
    }
    
    .button-group {
        flex-wrap: wrap;
        margin: 15px 0;
    }
}

/* Animation Keyframes */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Add floating particles background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 15s infinite linear;
}

/* Add these new animations to your existing CSS */
@keyframes float {
    0% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-100px) translateX(50px);
    }
    50% {
        transform: translateY(-200px) translateX(0);
    }
    75% {
        transform: translateY(-100px) translateX(-50px);
    }
    100% {
        transform: translateY(0) translateX(0);
    }
}

@keyframes glow {
    0% { box-shadow: 0 0 5px var(--primary-color); }
    50% { box-shadow: 0 0 20px var(--primary-color); }
    100% { box-shadow: 0 0 5px var(--primary-color); }
}

/* Add these new styles for the connection status */
.connection-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    position: relative;
}

.connection-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(26, 26, 46, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.connection-ring {
    position: absolute;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid transparent;
    left: 10px;
    transition: all 0.3s ease;
}

.connection-icon {
    font-size: 1.2em;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.connection-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.connection-label {
    font-size: 0.9em;
    color: var(--text-color);
    opacity: 0.8;
}

#connection-status {
    font-weight: 600;
    font-size: 1.1em;
}

/* Status States */
.status-panel.connecting .connection-ring {
    border-color: var(--warning-color);
    animation: rotate 2s linear infinite;
}

.status-panel.connecting .connection-circle {
    border-color: var(--warning-color);
}

.status-panel.connecting .connection-icon {
    color: var(--warning-color);
}

.status-panel.connected .connection-ring {
    border-color: var(--success-color);
    animation: pulse-ring 2s ease infinite;
}

.status-panel.connected .connection-circle {
    border-color: var(--success-color);
    animation: pulse-circle 2s ease infinite;
}

.status-panel.connected .connection-icon {
    color: var(--success-color);
}

.status-panel.error .connection-ring {
    border-color: var(--error-color);
}

.status-panel.error .connection-circle {
    border-color: var(--error-color);
}

.status-panel.error .connection-icon {
    color: var(--error-color);
}

/* Animations */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.3;
    }
    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

@keyframes pulse-circle {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}