/* 朋友测试系统自定义样式 */

/* 全局样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: 600;
    color: #0d6efd !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
}

.navbar-nav .nav-link:hover {
    color: #0d6efd !important;
}

/* 卡片样式 */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* 统计数字样式 */
.stat-item {
    padding: 1rem 0;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0d6efd;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* 表格样式 */
.table th {
    font-weight: 600;
    color: #495057;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* 按钮样式 */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* 表单样式 */
.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 提示框样式 */
.alert {
    border: none;
    border-radius: 0.5rem;
}

.alert-success {
    background-color: #d1ecf1;
    color: #0c5460;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* 答题项样式 */
.response-item:last-child {
    border-bottom: none !important;
}

/* 题目列表样式 */
.topic-item {
    border-left: 3px solid transparent;
    transition: all 0.2s ease-in-out;
}

.topic-item:hover {
    border-left-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.03);
}

/* 私密题目标识 */
.private-topic {
    color: #ffc107;
}

.public-topic {
    color: #198754;
}

/* 分页样式 */
.pagination .page-link {
    color: #0d6efd;
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* 页脚样式 */
footer {
    border-top: 1px solid #dee2e6;
}

.social-links a:hover {
    color: #fff !important;
}

.social-links-sm a:hover {
    color: #0d6efd !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .stat-number {
        font-size: 1.25rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 特殊颜色类 */
.text-primary-light {
    color: #6ea8fe !important;
}

.bg-primary-light {
    background-color: #cfe2ff !important;
}

.border-primary-light {
    border-color: #9ec5fe !important;
}

/* 表情图标样式 */
.mood-icon {
    width: 24px;
    height: 24px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* 题目创建表单样式 */
.question-form {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.option-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

/* 结果页面样式 */
.result-card {
    text-align: center;
    padding: 2rem;
}

.score-display {
    font-size: 3rem;
    font-weight: 700;
    color: #0d6efd;
    margin: 1rem 0;
}

.rank-badge {
    font-size: 1.25rem;
    padding: 0.5rem 1rem;
}

/* 用户资料页面样式 */
.profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
}

.avatar-upload {
    position: relative;
    display: inline-block;
}

.avatar-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* 搜索结果样式 */
.search-highlight {
    background-color: #fff3cd;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

/* 页脚优化样式 */
footer img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

footer .text-muted {
    font-size: 0.875rem;
    line-height: 1.4;
}

.copyright-text {
    font-size: 0.75rem;
    color: #6c757d;
    line-height: 1.5;
    margin: 0.5rem 0;
}

/* 移动端页脚优化 */
@media (max-width: 768px) {
    footer img {
        max-width: 80px;
    }
    
    .copyright-text {
        font-size: 0.7rem;
        text-align: center;
    }
    
    footer hr {
        margin: 1rem 0;
    }
}

.dropdown-menu {
    margin: 0 -20px !important;
}