@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300;400;500&display=swap');

:root {
    --primary-color: #0ff;
    --primary-dark: #0cc;
    --secondary-color: #ff00ff;
    --accent-color: #ffcc00;
    --bg-color: #0a0a14;
    --bg-dark: #050510;
    --bg-light: #121224;
    --text-color: #eef;
    --text-dim: #99a;
    --user-msg-color: #111144;
    --bot-msg-color: #112233;
    --border-glow: 0 0 8px rgba(0, 255, 255, 0.5);
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

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

body {
    font-family: 'Roboto Mono', monospace;
    background-color: var(--bg-color);
    color: var(--text-color);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 255, 255, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255, 0, 255, 0.05) 0%, transparent 20%),
        linear-gradient(to bottom, var(--bg-dark), var(--bg-color), var(--bg-dark));
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
    height: 85vh;
    min-height: 500px;
    background-color: var(--bg-dark);
    border: 1px solid var(--primary-dark);
    border-radius: 10px;
    box-shadow: var(--box-shadow), var(--border-glow);
    overflow: hidden;
    position: relative;
    display: flex;
}

.chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    backdrop-filter: blur(10px);
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: rgba(10, 10, 20, 0.7);
    border-bottom: 1px solid var(--primary-dark);
    position: relative;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-glitch {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 24px;
    color: var(--primary-color);
    text-shadow: 2px 2px var(--secondary-color);
    margin-right: 10px;
    position: relative;
    transition: text-shadow 0.3s ease;
}

.logo-glitch::before {
    content: 'NEOTOK';
    position: absolute;
    left: 2px;
    top: 2px;
    color: var(--accent-color);
    opacity: 0.5;
    filter: blur(2px);
}

.status-indicator {
    width: 10px;
    height: 10px;
    background-color: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-color);
    animation: pulse 2s infinite;
    margin-left: 10px;
}

.header-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.version {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.status {
    font-size: 0.8rem;
    color: var(--primary-color);
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-dark) var(--bg-dark);
    background-image: 
        linear-gradient(135deg, rgba(0, 0, 20, 0.7) 0%, rgba(10, 10, 30, 0.7) 100%),
        repeating-linear-gradient(90deg, 
            rgba(0, 255, 255, 0.03) 0px, 
            rgba(0, 255, 255, 0.03) 1px, 
            transparent 1px, 
            transparent 60px
        ),
        repeating-linear-gradient(0deg, 
            rgba(0, 255, 255, 0.03) 0px, 
            rgba(0, 255, 255, 0.03) 1px, 
            transparent 1px, 
            transparent 60px
        );
}

.messages::-webkit-scrollbar {
    width: 6px;
}

.messages::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

.messages::-webkit-scrollbar-thumb {
    background-color: var(--primary-dark);
    border-radius: 3px;
}

.message {
    display: flex;
    margin-bottom: 20px;
    animation: fadeInUp 0.3s ease-out;
    padding: 10px 15px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.message::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
}

.bot-message {
    background-color: var(--bot-msg-color);
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.bot-message::before {
    background-color: var(--primary-color);
}

.user-message {
    background-color: var(--user-msg-color);
    border: 1px solid rgba(255, 0, 255, 0.3);
}

.user-message::before {
    background-color: var(--secondary-color);
}

.system-message {
    background-color: rgba(20, 20, 30, 0.7);
    border: 1px solid rgba(255, 204, 0, 0.3);
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
    transition: opacity 0.3s ease;
}

.avatar {
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-dark);
    color: var(--accent-color);
    font-size: 1.2rem;
    border: 1px solid rgba(255, 204, 0, 0.3);
}

.bot-message .avatar {
    color: var(--primary-color);
    border-color: rgba(0, 255, 255, 0.3);
}

.user-message .avatar {
    color: var(--secondary-color);
    border-color: rgba(255, 0, 255, 0.3);
}

.message-content {
    flex: 1;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.8rem;
}

.sender {
    font-weight: bold;
    color: var(--accent-color);
}

.bot-message .sender {
    color: var(--primary-color);
}

.user-message .sender {
    color: var(--secondary-color);
}

.timestamp {
    color: var(--text-dim);
    font-size: 0.7rem;
}

.chat-input {
    background-color: var(--bg-dark);
    border-top: 1px solid var(--primary-dark);
    padding: 15px;
    display: flex;
    align-items: center;
    position: relative;
}

#user-input {
    flex: 1;
    background-color: rgba(20, 20, 40, 0.6);
    border: 1px solid var(--primary-dark);
    border-radius: 5px;
    padding: 12px 15px;
    color: var(--text-color);
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    transition: all 0.3s ease;
}

#user-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px var(--primary-color);
    background-color: rgba(30, 30, 50, 0.8);
}

#user-input::placeholder {
    color: var(--text-dim);
}

.file-upload-label, #voice-btn, #send-btn {
    background-color: transparent;
    border: 1px solid var(--primary-dark);
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.2s ease;
}

.file-upload-label {
    margin-right: 10px;
    margin-left: 0;
}

#file-upload {
    display: none;
}

.file-upload-label:hover, #voice-btn:hover, #send-btn:hover {
    background-color: rgba(0, 255, 255, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

#send-btn {
    background-color: rgba(0, 255, 255, 0.1);
    color: var(--primary-color);
}

#voice-btn.active {
    background-color: rgba(255, 0, 0, 0.2);
    border-color: #ff3333;
    color: #ff3333;
    animation: recording 1.5s infinite;
}

.typing-animation {
    display: flex;
    align-items: center;
}

.dots {
    margin-left: 4px;
    display: inline-block;
    animation: dots 1.5s infinite;
}

.sidebar {
    width: 300px;
    background-color: rgba(15, 15, 25, 0.8);
    border-left: 1px solid var(--primary-dark);
    padding: 20px;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-section h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--primary-dark);
}

.setting-item {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting-item label {
    color: var(--text-color);
    font-size: 14px;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-light);
    border: 1px solid var(--primary-dark);
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 3px;
    background-color: var(--text-dim);
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-dark);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
    background-color: var(--primary-color);
}

#proxy-url {
    width: 100%;
    background-color: rgba(20, 20, 40, 0.6);
    border: 1px solid var(--primary-dark);
    border-radius: 5px;
    padding: 8px;
    color: var(--text-color);
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    margin-top: 5px;
}

.setting-note {
    margin-top: 15px;
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.5;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    border-left: 2px solid var(--accent-color);
}

.sidebar-section ul {
    list-style-type: none;
}

.sidebar-section ul li {
    padding: 10px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    font-size: 14px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-section ul li:hover {
    background-color: rgba(0, 255, 255, 0.05);
    color: var(--primary-color);
}

.sidebar-section ul li i {
    margin-right: 10px;
    color: var(--accent-color);
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}

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

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

@media (max-width: 900px) {
    .container {
        height: 95vh;
        width: 95%;
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: 35%;
        border-left: none;
        border-top: 1px solid var(--primary-dark);
    }
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    .chat-header {
        padding: 10px;
    }
    
    .logo-glitch {
        font-size: 20px;
    }
    
    .avatar {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .message {
        padding: 8px 10px;
    }
    
    .chat-input {
        padding: 10px;
    }
    
    #user-input {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .file-upload-label, #voice-btn, #send-btn {
        width: 35px;
        height: 35px;
        margin-left: 8px;
    }
} 