/* 自定义样式 */
.nav-item.active {
    @apply bg-blue-50 border-r-3 border-blue-600;
}

.nav-item.active i {
    @apply text-blue-700;
}

.nav-item.active span {
    @apply text-blue-700 font-semibold;
}

/* 渐变背景 */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* 卡片阴影效果 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    @apply shadow-xl transform -translate-y-1;
}

/* 按钮动效 */
.btn-primary {
    @apply bg-blue-600 text-white px-6 py-3 rounded-lg font-medium;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    @apply bg-blue-700 shadow-lg transform -translate-y-0.5;
}

.btn-secondary {
    @apply bg-gray-100 text-gray-700 px-6 py-3 rounded-lg font-medium border border-gray-200;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    @apply bg-gray-200 shadow-md;
}

/* 输入框样式 */
.input-field {
    @apply w-full px-4 py-3 border-2 border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-400;
    transition: all 0.3s ease;
    background-color: #fafafa;
    font-size: 14px;
}

.input-field:focus {
    @apply shadow-lg bg-white;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-field:hover {
    background-color: #ffffff;
    border-color: #9ca3af;
}

/* 重要输入框强调样式 */
.input-field-primary {
    @apply w-full px-4 py-3 border-2 border-blue-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-400;
    transition: all 0.3s ease;
    background-color: #f8fafc;
    background-image: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.input-field-primary:focus {
    @apply bg-white;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.input-field-primary:hover {
    background-color: #ffffff;
    border-color: #60a5fa;
}

/* 重要文本域强调样式 */
.textarea-field-primary {
    @apply w-full px-4 py-3 border-2 border-blue-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-400 resize-none;
    transition: all 0.3s ease;
    min-height: 120px;
    background-color: #f8fafc;
    background-image: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.textarea-field-primary:focus {
    @apply bg-white;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.textarea-field-primary:hover {
    background-color: #ffffff;
    border-color: #60a5fa;
}

/* 输入框提示样式 */
.input-hint {
    @apply text-xs text-gray-500 mt-1 flex items-center;
}

.input-hint i {
    @apply mr-1;
}

/* 字符计数样式 */
.char-count {
    @apply text-xs text-gray-400 mt-1 text-right;
}

.char-count.warning {
    @apply text-yellow-600;
}

.char-count.error {
    @apply text-red-600;
}

/* 重要区域容器样式 */
.important-section {
    position: relative;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    margin: 8px 0;
}

.important-section::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #3b82f6, #06b6d4, #10b981, #3b82f6);
    border-radius: 12px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

.important-section:hover::before {
    animation-duration: 1s;
}

.important-section .input-field-primary,
.important-section .textarea-field-primary {
    background: white;
    border-color: #3b82f6;
}

/* 文本域样式 */
.textarea-field {
    @apply w-full px-4 py-3 border-2 border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-400 resize-none;
    transition: all 0.3s ease;
    min-height: 120px;
    background-color: #fafafa;
    font-size: 14px;
    line-height: 1.6;
}

.textarea-field:focus {
    @apply shadow-lg bg-white;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.textarea-field:hover {
    background-color: #ffffff;
    border-color: #9ca3af;
}

/* 统计卡片 */
.stat-card {
    @apply bg-white p-6 rounded-xl border border-gray-200;
    transition: all 0.3s ease;
}

.stat-card:hover {
    @apply shadow-lg border-blue-200;
}

/* 加载动画 */
.loading-spinner {
    @apply inline-block w-6 h-6 border-2 border-gray-300 border-t-blue-600 rounded-full;
    animation: spin 1s linear infinite;
}

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

/* 成功提示 */
.alert-success {
    @apply bg-green-50 border border-green-200 text-green-800 p-4 rounded-lg;
}

.alert-error {
    @apply bg-red-50 border border-red-200 text-red-800 p-4 rounded-lg;
}

.alert-warning {
    @apply bg-yellow-50 border border-yellow-200 text-yellow-800 p-4 rounded-lg;
}

.alert-info {
    @apply bg-blue-50 border border-blue-200 text-blue-800 p-4 rounded-lg;
}

/* 标签样式 */
.tag {
    @apply inline-block px-3 py-1 bg-gray-100 text-gray-700 text-sm rounded-full mr-2 mb-2;
}

.tag-blue {
    @apply bg-blue-100 text-blue-800;
}

.tag-green {
    @apply bg-green-100 text-green-800;
}

.tag-yellow {
    @apply bg-yellow-100 text-yellow-800;
}

.tag-red {
    @apply bg-red-100 text-red-800;
}

/* 进度条 */
.progress-bar {
    @apply w-full bg-gray-200 rounded-full h-2;
}

.progress-fill {
    @apply bg-blue-600 h-2 rounded-full;
    transition: width 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-mobile {
        @apply hidden;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    @apply bg-gray-100;
}

::-webkit-scrollbar-thumb {
    @apply bg-gray-400 rounded-full;
}

::-webkit-scrollbar-thumb:hover {
    @apply bg-gray-600;
}

/* RTL语言支持 */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .flex {
    flex-direction: row-reverse;
}

[dir="rtl"] .space-x-2 > * + * {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] .ml-2 {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] .mr-2 {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* 阿拉伯语字体支持 */
.arabic-text {
    font-family: 'Noto Sans Arabic', 'Amiri', 'Scheherazade New', sans-serif;
    line-height: 1.8;
    text-align: right;
    direction: rtl;
}

/* Markdown内容样式 */
.prose {
    line-height: 1.7;
    max-width: none;
}

.prose h1, .prose h2, .prose h3 {
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: #1f2937;
}

.prose h1 {
    font-size: 1.5em;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.3em;
}

.prose h2 {
    font-size: 1.25em;
}

.prose h3 {
    font-size: 1.125em;
}

.prose p {
    margin-bottom: 1em;
    color: #374151;
}

.prose ul, .prose ol {
    margin: 1em 0;
    padding-left: 2em;
}

.prose li {
    margin-bottom: 0.5em;
}

.prose strong {
    font-weight: 600;
    color: #1f2937;
}

.prose em {
    font-style: italic;
}

.prose blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1em;
    margin: 1em 0;
    font-style: italic;
    color: #6b7280;
    background-color: #f8fafc;
    padding: 1em;
    border-radius: 0.5rem;
}

.prose code {
    background-color: #f3f4f6;
    padding: 0.125em 0.25em;
    border-radius: 0.25em;
    font-size: 0.875em;
    color: #dc2626;
}

.prose pre {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 1em;
    border-radius: 0.5rem;
    overflow-x: auto;
}

.prose pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.prose th, .prose td {
    border: 1px solid #e5e7eb;
    padding: 0.5em 1em;
    text-align: left;
}

.prose th {
    background-color: #f3f4f6;
    font-weight: 600;
}

/* 流式响应动画 */
.streaming-container {
    position: relative;
}

.streaming-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: #3b82f6;
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
} 