/* Try It Out Section */
.try-it-section {
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.05), transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.05), transparent 40%);
}

.try-it-container {
    max-width: 900px;
    margin: 0 auto;
    width: 90%;
}

.chat-interface {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 600px;
    position: relative;
    transition: all 0.3s ease;
}

.chat-interface:hover {
    box-shadow: 0 30px 60px -12px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.2);
}

/* Spotlight Effect Overlay */
.chat-interface::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(124, 58, 237, 0.08),
            transparent 40%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 2;
    /* Below content but above bg */
    pointer-events: none;
}

.chat-interface:hover::after {
    opacity: 1;
}

.chat-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.model-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.05);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
}

[data-theme="dark"] .model-status {
    background: rgba(255, 255, 255, 0.05);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 5px #10b981;
}

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

.message {
    max-width: 80%;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    font-size: 1rem;
    line-height: 1.6;
    animation: fadeIn 0.3s ease;
}

.message.ai {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-bottom-left-radius: 4px;
}

.message.user {
    align-self: flex-end;
    background: var(--text-main);
    color: var(--bg-color);
    border-bottom-right-radius: 4px;
}

.chat-input-area {
    padding: 1.5rem;
    border-top: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.01);
    position: relative;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    background: var(--bg-color);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: var(--accent-glow);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.1);
}

.chat-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-main);
    resize: none;
    height: 24px;
    max-height: 150px;
    padding: 0;
    line-height: 1.5;
}

.chat-input:focus {
    outline: none;
}

.send-btn {
    background: var(--text-main);
    color: var(--bg-color);
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.send-btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    opacity: 0.5;
    animation: pulse 1s infinite;
}

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

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

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}