/* AI Agent Playground Styles */

.playground-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    min-height: 100vh;
    padding-top: 60px;
}

.playground-sidebar {
    background: var(--dark);
    padding: 2rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
}

.playground-sidebar h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-desc {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.quick-actions h3,
.capabilities-list h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray);
    margin-bottom: 1rem;
}

.quick-actions {
    margin-bottom: 2rem;
}

.action-btn {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    color: var(--light);
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
}

.capabilities-list ul {
    list-style: none;
}

.capabilities-list li {
    padding: 0.5rem 0;
    color: var(--gray);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.capabilities-list li::before {
    content: ">";
    color: var(--accent);
    font-family: 'Fira Code', monospace;
}

/* Main Chat Area */
.playground-main {
    display: flex;
    flex-direction: column;
    background: var(--darker);
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.chat-message {
    display: flex;
    gap: 1rem;
    max-width: 800px;
}

.chat-message.user {
    flex-direction: row-reverse;
    margin-left: auto;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.chat-message.system .message-avatar,
.chat-message.assistant .message-avatar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
}

.chat-message.user .message-avatar {
    background: rgba(255, 255, 255, 0.1);
    color: var(--light);
}

.message-content {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: var(--light);
}

.chat-message.user .message-content {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}

.message-content p {
    margin-bottom: 0.75rem;
}

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

.message-content ul {
    margin: 0.75rem 0;
    padding-left: 1.25rem;
}

.message-content li {
    margin-bottom: 0.25rem;
    color: var(--gray);
}

.message-content code {
    font-family: 'Fira Code', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.message-content pre {
    background: var(--dark);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Data Tables in Chat */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table th {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    color: var(--gray);
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Stats Grid in Chat */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.stat-item {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.stat-item .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-item .label {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

/* Chat Input */
.chat-input-container {
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 1rem;
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: var(--light);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

.chat-input::placeholder {
    color: var(--gray);
}

.chat-input:focus {
    border-color: rgba(99, 102, 241, 0.5);
}

.send-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 12px;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.3);
}

.send-btn svg {
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .playground-container {
        grid-template-columns: 1fr;
    }

    .playground-sidebar {
        display: none;
    }
}
