/* AiDotNet Playground Styles */

/* Reset and base styles */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #0f172a;
    color: #f8fafc;
}

#app {
    height: 100%;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Link styles */
a {
    color: #6366f1;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Code blocks */
code {
    font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
    background: #1e293b;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

pre {
    font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
    background: #1e293b;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0;
}

pre code {
    background: transparent;
    padding: 0;
}

/* Form elements */
input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Utility classes */
.text-primary { color: #6366f1; }
.text-secondary { color: #94a3b8; }
.text-success { color: #22c55e; }
.text-error { color: #ef4444; }
.text-warning { color: #f59e0b; }

.bg-dark { background-color: #0f172a; }
.bg-darker { background-color: #020617; }
.bg-card { background-color: #1e293b; }

/* Animation classes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.animate-slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Card component */
.card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.card-description {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Badge component */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-primary {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

.badge-success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

/* Grid utilities */
.grid {
    display: grid;
    gap: 20px;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-cols-3, .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .grid-cols-2, .grid-cols-3, .grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

/* Spacing utilities */
.p-2 { padding: 8px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.m-0 { margin: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mt-4 { margin-top: 16px; }

/* Monaco Editor overrides */
.monaco-editor {
    border-radius: 0 0 8px 8px;
}

.monaco-editor .margin {
    background: #1e293b !important;
}

/* Loading spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #334155;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    background: #1e293b;
    border: 1px solid #334155;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
    z-index: 1000;
}

.toast-success {
    border-color: #22c55e;
}

.toast-error {
    border-color: #ef4444;
}

/* Tab component */
.tabs {
    display: flex;
    border-bottom: 1px solid #334155;
    margin-bottom: 20px;
}

.tab {
    padding: 12px 20px;
    color: #94a3b8;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
}

.tab:hover {
    color: #f8fafc;
}

.tab.active {
    color: #6366f1;
    border-bottom-color: #6366f1;
}

/* Responsive design */
@media (max-width: 768px) {
    .playground-container {
        flex-direction: column;
    }

    .editor-container {
        flex-direction: column;
    }

    .editor-panel {
        border-right: none;
        border-bottom: 1px solid #334155;
        min-height: 300px;
    }

    .output-panel {
        width: 100%;
        min-height: 200px;
    }
}
