/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: #F8F9FA;
    color: #0A0E1A;
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.logo-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    color: #0A0E1A;
}

.tagline {
    font-size: 14px;
    color: #1E90FF;
    margin-left: 44px;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.hide-chat-btn {
    background: #F3F4F6;
    border: 1px solid #D1D5DB;
    color: #4B5563;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hide-chat-btn:hover {
    background: #E5E7EB;
    border-color: #4F46E5;
    color: #4F46E5;
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Chat Panel */
.chat-panel {
    width: 420px;
    background: #FFFFFF;
    border-right: 1px solid #E5E7EB;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.chat-panel.hidden {
    width: 0;
    overflow: hidden;
}

.chat-header {
    padding: 32px 28px;
    border-bottom: 1px solid #E5E7EB;
    background: linear-gradient(135deg, #1E90FF 0%, #0A0E1A 100%);
    color: white;
}

.chat-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.chat-header p {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    line-height: 1.5;
    font-weight: 400;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    gap: 12px;
    animation: fadeIn 0.3s ease;
}

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

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #E3F2FD;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-message .message-avatar {
    background: #1E90FF;
}

.message-content {
    flex: 1;
    padding-top: 6px;
}

.message-content p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
    font-weight: 400;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-content {
    text-align: right;
}

/* Chat Input */
.chat-input-container {
    padding: 20px 24px;
    border-top: 1px solid #1a1f2e;
}

.chat-input-wrapper {
    position: relative;
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-input {
    flex: 1;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 14px;
    color: #0A0E1A;
    transition: all 0.2s ease;
    font-weight: 400;
}

.chat-input:focus {
    outline: none;
    border-color: #1E90FF;
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.08);
}

.chat-input::placeholder {
    color: #6C757D;
    font-weight: 400;
}

.send-btn {
    background: #F4B740;
    border: none;
    border-radius: 8px;
    padding: 14px;
    color: #0A0E1A;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(244, 183, 64, 0.15);
}

.send-btn:hover {
    background: #e6a632;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 183, 64, 0.25);
}

.send-btn:active {
    transform: translateY(0);
}

/* Preview Panel */
.preview-panel {
    flex: 1;
    background: #FAFBFC;
    display: flex;
    flex-direction: column;
}

.preview-header {
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    padding: 20px 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.tabs {
    display: flex;
    gap: 2px;
}

.tab {
    background: transparent;
    border: none;
    color: #6C757D;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 4px;
}

.tab:hover {
    color: #1E90FF;
    background: #E3F2FD;
}

.tab.active {
    color: #1E90FF;
    background: #E3F2FD;
    font-weight: 600;
}

/* Preview Content */
.preview-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.tab-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tab-content.active {
    opacity: 1;
    visibility: visible;
}

.placeholder-content {
    text-align: center;
    max-width: 400px;
}

.placeholder-icon {
    margin-bottom: 24px;
    opacity: 0.6;
    display: flex;
    justify-content: center;
}

.placeholder-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #0A0E1A;
    letter-spacing: -0.01em;
}

.placeholder-content p {
    font-size: 14px;
    color: #6C757D;
    line-height: 1.5;
    font-weight: 400;
}

/* Generated Content */
.generated-content {
    padding: 24px;
    height: 100%;
    overflow-y: auto;
}

.config-section {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.config-section h4 {
    color: #1E90FF;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.config-section pre {
    background: #F8F9FA;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    padding: 16px;
    font-size: 13px;
    line-height: 1.4;
    overflow-x: auto;
    color: #0A0E1A;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

.endpoint-item {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.endpoint-method {
    display: inline-block;
    background: #1E90FF;
    color: #FFFFFF;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.endpoint-path {
    color: #0A0E1A;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 14px;
    font-weight: 500;
}

.endpoint-description {
    color: #6C757D;
    font-size: 13px;
    margin-top: 8px;
    font-weight: 400;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #F8F9FA;
}

::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* Responsive */
@media (max-width: 768px) {
    .chat-panel {
        width: 100%;
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1000;
        transform: translateX(-100%);
    }
    
    .chat-panel.visible {
        transform: translateX(0);
    }
    
    .hide-chat-btn {
        display: block;
    }
}

/* Animations */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6C757D;
    font-size: 14px;
    font-style: italic;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 4px;
    height: 4px;
    background: #6C757D;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}