/* AiTrans Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: #020617;
    color: #f1f5f9;
    min-height: 100vh;
}

/* Component Classes */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px #0f172a, 0 0 0 4px #0ea5e9;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: #0284c7;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #0ea5e9;
}

.btn-primary:active:not(:disabled) {
    background-color: #0369a1;
}

.btn-secondary {
    background-color: #334155;
    color: #f1f5f9;
    border: 1px solid #475569;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #475569;
}

.btn-ghost {
    background-color: transparent;
    color: #cbd5e1;
}

.btn-ghost:hover:not(:disabled) {
    background-color: #1e293b;
    color: #f1f5f9;
}

.btn-icon {
    padding: 0.5rem;
    border-radius: 0.5rem;
    color: #94a3b8;
    transition: all 0.2s;
}

.btn-icon:hover {
    color: #f1f5f9;
    background-color: #1e293b;
}

.input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    color: #f1f5f9;
    transition: all 0.2s;
}

.input::placeholder {
    color: #64748b;
}

.input:focus {
    outline: none;
    border-color: transparent;
    box-shadow: 0 0 0 2px #0ea5e9;
}

.textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    color: #f1f5f9;
    resize: none;
    transition: all 0.2s;
}

.textarea::placeholder {
    color: #64748b;
}

.textarea:focus {
    outline: none;
    border-color: transparent;
    box-shadow: 0 0 0 2px #0ea5e9;
}

.card {
    background-color: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    border: 1px solid #1e293b;
    border-radius: 0.75rem;
    padding: 1rem;
}

.label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 0.25rem;
}

/* Blazor-specific styles */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background-color: rgba(127, 29, 29, 0.9);
    color: white;
    text-align: center;
    z-index: 50;
}

#blazor-error-ui.show {
    display: block;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    margin-left: 1rem;
}

#blazor-error-ui .reload {
    text-decoration: underline;
    margin-left: 0.5rem;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background-color: #0f172a;
}

::-webkit-scrollbar-thumb {
    background-color: #334155;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #475569;
}

/* Streaming cursor animation */
.streaming-cursor::after {
    content: '▋';
    color: #0ea5e9;
    animation: pulse 1s ease-in-out infinite;
    margin-left: 2px;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Animation utilities */
.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}