body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #2c3e50;
}

.container {
    width: 95vw;
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(52, 152, 219, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
    border-radius: 12px;
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    color: #2c3e50;
}

.header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.header h2 {
    margin: 0;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: titlePulse 3s infinite;
}

.host-info {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.instructions {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 10px 0;
    border-radius: 6px;
    font-size: 14px;
    color: #856404;
}

.instructions p {
    margin: 5px 0;
    line-height: 1.3;
    color: #856404;
}

.model-container {
    display: flex;
    gap: 20px;
    margin: 15px 0;
}

.model-section {
    flex: 1;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.model-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.prompt-container {
    position: relative;
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
}

.prompt-button {
    background: #3498db;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

#promptText {
    flex: 1 1 100%;
    margin: 10px 0;
    transition: border-color 0.2s ease;
}

#promptText:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.2);
}

.secondary-button {
    margin-left: auto;
}

.prompt-button-container {
    position: relative;
    display: inline-block;
}

.prompt-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 200px;
    margin-top: 5px;
}

.prompt-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.prompt-list li {
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.prompt-list li:hover {
    background: #f0f0f0;
}

.sub-prompt-list {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 200px;
}

.advanced-settings {
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.settings-header {
    padding: 12px;
    background: #f8f9fa;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-content {
    padding: 15px;
    display: none;
    border-top: 1px solid #ddd;
}

.setting-item {
    margin-bottom: 15px;
}

.setting-item label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
}

.chat-split {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-grow: 1;
    min-height: 600px;
}

.chat-panel {
    flex: 1;
    border: 1px solid rgba(52, 152, 219, 0.2);
    border-radius: 12px;
    padding: 15px;
    height: 70vh;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.1);
    position: relative;
    backdrop-filter: blur(10px);
    scrollbar-width: thin;
    scrollbar-color: #3498db #f0f2f5;
}

.chat-panel::-webkit-scrollbar {
    width: 6px;
}

.chat-panel::-webkit-scrollbar-track {
    background: #f0f2f5;
    border-radius: 3px;
}

.chat-panel::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 3px;
}

.message {
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 10px 0;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
    animation: messagePopIn 0.3s ease-out;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(52, 152, 219, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: #2c3e50;
}

.user-message {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.assistant-message {
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    color: white;
    margin-right: auto;
    border-bottom-left-radius: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.message-buttons {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.message-buttons button {
    padding: 4px 8px;
    font-size: 12px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    color: #666;
}

.message-buttons button:hover {
    opacity: 1;
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.message-buttons button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.message-buttons button:active::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(100, 100);
        opacity: 0;
    }
}

.input-container {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
}

textarea {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: vertical;
    min-height: 40px;
    font-family: inherit;
    font-size: 14px;
}

select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    margin-bottom: 10px;
}

button {
    padding: 8px 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

#connection-form {
    max-width: 500px;
    margin: 0 auto 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

#connection-form input {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.system-message {
    text-align: center;
    color: #666;
    margin: 10px 0;
    font-style: italic;
}

.typing-indicator {
    display: none;
    margin: 10px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    animation: fadeInUp 0.2s ease-out;
}

.typing-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.typing-text {
    color: #3498db;
    font-weight: 500;
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: cyberpunkDot 1.5s infinite;
    box-shadow: 0 0 20px #00c6ff,
                0 0 40px #00c6ff,
                0 0 60px #00c6ff;
}

@keyframes cyberpunkDot {
    0%, 100% {
        transform: scale(1);
        opacity: 0.2;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
        box-shadow: 0 0 30px #00c6ff,
                    0 0 60px #00c6ff,
                    0 0 90px #00c6ff;
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.signature {
    position: fixed;
    top: 2%;
    bottom: 94%;
    right: 20px;
    background: rgba(52, 152, 219, 0.9);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
}

.desc {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}


.alert-message {
    margin: 10px 0;
    padding: 8px;
    background: #e3f2fd;
    border-radius: 4px;
    color: #1565c0;
    font-size: 0.9em;
    flex: 1 1 100%;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes panelGlow {
    from {
        box-shadow: 0 0 5px rgba(52, 152, 219, 0.1);
    }
    to {
        box-shadow: 0 0 15px rgba(52, 152, 219, 0.2);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes titlePulse {
    0% { text-shadow: 0 0 0 rgba(44, 62, 80, 0); }
    50% { text-shadow: 0 0 10px rgba(44, 62, 80, 0.2); }
    100% { text-shadow: 0 0 0 rgba(44, 62, 80, 0); }
}

textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.2);
    transition: all 0.2s ease;
}

@keyframes neonGlow {
    from {
        box-shadow: 0 0 10px #fff,
                    0 0 20px #fff,
                    0 0 30px #00c6ff,
                    0 0 40px #00c6ff;
    }
    to {
        box-shadow: 0 0 5px #fff,
                    0 0 10px #fff,
                    0 0 15px #00c6ff,
                    0 0 20px #00c6ff;
    }
}

@keyframes messagePopIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(50px) rotate(-5deg);
    }
    50% {
        transform: scale(1.1) translateY(-10px) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotate(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.message {
    animation: messagePopIn 0.3s ease-out;
}

.typing-indicator {
    animation: fadeInUp 0.2s ease-out;
}

.bubble-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.bubble {
    position: absolute;
    bottom: -100px;
    width: 40px;
    height: 40px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 50%;
    animation: rise 15s infinite ease-in;
    transition: background 0.5s ease;
}

.bubble:nth-child(1) { left: 10%; animation-duration: 8s; animation-delay: 1s; }
.bubble:nth-child(2) { left: 20%; animation-duration: 10s; animation-delay: 2s; }
.bubble:nth-child(3) { left: 30%; animation-duration: 12s; animation-delay: 3s; }
.bubble:nth-child(4) { left: 40%; animation-duration: 9s; animation-delay: 4s; }
.bubble:nth-child(5) { left: 50%; animation-duration: 11s; animation-delay: 5s; }
.bubble:nth-child(6) { left: 60%; animation-duration: 13s; animation-delay: 6s; }
.bubble:nth-child(7) { left: 70%; animation-duration: 8s; animation-delay: 7s; }
.bubble:nth-child(8) { left: 80%; animation-duration: 10s; animation-delay: 8s; }
.bubble:nth-child(9) { left: 90%; animation-duration: 12s; animation-delay: 9s; }
.bubble:nth-child(10) { left: 95%; animation-duration: 9s; animation-delay: 10s; }

@keyframes rise {
    0% {
        bottom: -100px;
        transform: translateX(0) scale(1);
        opacity: 0.5;
        background: rgba(52, 152, 219, 0.1);
    }
    50% {
        transform: translateX(100px) scale(1.5);
        opacity: 0.8;
        background: rgba(52, 152, 219, 0.2);
    }
    100% {
        bottom: 100vh;
        transform: translateX(-100px) scale(0.5);
        opacity: 0;
        background: rgba(52, 152, 219, 0.1);
    }
}

.bubble:hover {
    background: rgba(52, 152, 219, 0.4);
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.6);
}
