/* 自定义样式 */

/* 深色模式 */
@media (prefers-color-scheme: dark) {
    html {
        color-scheme: dark;
    }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dark ::-webkit-scrollbar-track {
    background: #374151;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 消息容器 */
.message-wrapper {
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-in;
}

/* 头像行 */
.avatar-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #e5e7eb;
}

.dark .avatar-img {
    border-color: #4b5563;
}

.avatar-name {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
}

.avatar-name-pro {
    color: #10b981;
}

.dark .avatar-name-pro {
    color: #34d399;
}

.avatar-name-con {
    color: #ef4444;
}

.dark .avatar-name-con {
    color: #f87171;
}

.avatar-name-judge {
    color: #a855f7;
}

.dark .avatar-name-judge {
    color: #c084fc;
}

/* 消息气泡 */
.message-bubble {
    width: 100%;
    padding: 16px 20px;
    border-radius: 16px;
    animation: fadeIn 0.3s ease-in;
    font-size: 1rem;
    line-height: 1.75;
}

.message-pro {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 12px;
}

.message-con {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-radius: 12px;
}

.message-judge {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    color: white;
    border-radius: 12px;
}

.message-system {
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
    padding: 8px 0;
    margin: 12px 0;
    position: relative;
}

.message-system::before,
.message-system::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: #e5e7eb;
}

.dark .message-system::before,
.dark .message-system::after {
    background: #4b5563;
}

.message-system::before {
    left: 0;
}

.message-system::after {
    right: 0;
}

/* 打字机效果 */
.typing-indicator {
    display: inline-block;
}

.typing-indicator::after {
    content: '|';
    animation: blink 1s infinite;
}

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

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 辩论列表项 */
.debate-item {
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.debate-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.dark .debate-item:hover {
    background: #374151;
    border-color: #4b5563;
}

.debate-item.active {
    background: #dbeafe;
    border-color: #3b82f6;
}

.dark .debate-item.active {
    background: #1e3a8a;
    border-color: #3b82f6;
}

/* 加载动画 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .message-bubble {
        max-width: 90%;
    }
}

/* 平滑过渡 */
* {
    transition-property: background-color, border-color, color;
    transition-duration: 150ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

button, input, select {
    transition-property: all;
}
