/* 朋友测试系统自定义样式 */

/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9f7ff;
}

/* 导航栏样式 */
.navbar {
    background-color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-weight: 700;
    color: #4a90e2 !important;
    font-size: 1.4rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: #5a6c84 !important;
}

.navbar-nav .nav-link:hover {
    color: #4a90e2 !important;
    background-color: #f0f8ff;
    border-radius: 8px;
}

/* 卡片样式 */
.card {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8f0fe;
    border-radius: 12px;
    transition: all 0.3s ease-in-out;
    background-color: #ffffff;
}

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

.card-header {
    background-color: #f8faff;
    border-bottom: 1px solid #e8f0fe;
    font-weight: 600;
    color: #334155;
    border-radius: 12px 12px 0 0 !important;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.card-body {
    padding: 1rem;
}

/* 统计数字样式 */
.stat-item {
    padding: 0.6rem 0;
}

.stat-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ff6b8b;
}

.stat-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.1rem;
}

/* 表格样式 */
.table th {
    font-weight: 600;
    color: #334155;
    background-color: #f8faff;
    border-bottom: 2px solid #e8f0fe;
}

.table-hover tbody tr:hover {
    background-color: rgba(74, 144, 226, 0.05);
}

/* 按钮样式 */
.btn {
    border-radius: 25px;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #4a90e2;
    border-color: #4a90e2;
    color: white;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover {
    background-color: #357abd;
    border-color: #357abd;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.4);
}

.btn-outline-primary {
    border-color: #4a90e2;
    color: #4a90e2;
}

.btn-outline-primary:hover {
    background-color: #4a90e2;
    color: white;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
    color: white;
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

.btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(25, 135, 84, 0.4);
}

/* 表单样式 */
.form-control {
    border-radius: 10px;
    border: 2px solid #e8f0fe;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.15);
    outline: none;
}

/* 提示框样式 */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.alert-success {
    background-color: #e8f5e8;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.alert-danger {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.alert-info {
    background-color: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid #2196f3;
}

/* 答题项样式 */
.response-item:last-child {
    border-bottom: none !important;
}

/* 题目列表样式 */
.topic-item {
    border-left: 4px solid transparent;
    transition: all 0.3s ease-in-out;
    padding: 12px;
    border-radius: 0 12px 12px 0;
}

.topic-item:hover {
    border-left-color: #ff6b8b;
    background-color: #fff5f7;
    transform: translateX(4px);
}

/* 私密题目标识 */
.private-topic {
    color: #ff9800;
}

.public-topic {
    color: #4caf50;
}

/* 分页样式 */
.pagination .page-link {
    color: #5a6c84;
    border-color: #e8f0fe;
    border-radius: 8px !important; /* 强制圆角 */
    margin: 0 4px;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    color: #4a90e2;
    border-color: #4a90e2;
    background-color: #f0f8ff;
}

.pagination .page-item.active .page-link {
    background-color: #4a90e2;
    border-color: #4a90e2;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
    color: #ffffff !important;
}

.pagination .page-item.active .page-link:hover {
    background-color: #357abd;
    border-color: #357abd;
    color: #ffffff !important;
}

.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    border-radius: 8px !important;
}

/* 页脚样式 */
footer {
    border-top: 1px solid #e8f0fe;
    background-color: #f8faff;
    padding: 2rem 0;
}

.social-links a:hover {
    color: #4a90e2 !important;
    transform: translateY(-2px);
}

.social-links-sm a:hover {
    color: #4a90e2 !important;
    transform: scale(1.1);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .stat-number {
        font-size: 1.4rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .btn {
        padding: 0.5rem 1.25rem;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 特殊颜色类 */
.text-primary-light {
    color: #7cb3f8 !important;
}

.bg-primary-light {
    background-color: #e8f0fe !important;
}

.border-primary-light {
    border-color: #b3d1ff !important;
}

/* 表情图标样式 */
.mood-icon {
    width: 28px;
    height: 28px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* 题目创建表单样式 */
.question-form {
    background-color: #f8faff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e8f0fe;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.option-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    background-color: #ffffff;
}

.option-row:hover {
    background-color: #f0f8ff;
}

/* 结果页面样式 */
.result-card {
    text-align: center;
    padding: 2.5rem;
    background-color: #f8faff;
    border-radius: 16px;
    border: 1px solid #e8f0fe;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.score-display {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ff6b8b;
    margin: 1.5rem 0;
    text-shadow: 2px 2px 4px rgba(255, 107, 139, 0.2);
}

.rank-badge {
    font-size: 1.4rem;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 用户资料页面样式 */
.profile-header {
    background: linear-gradient(135deg, #4a90e2 0%, #7b68ee 100%);
    color: white;
    padding: 2.5rem 0;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.2);
}

.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.25rem 0.5rem;
    border-radius: 8px;
    font-weight: 600;
    color: #856404;
}

/* 页脚优化样式 */
footer img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

footer .text-muted {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #5a6c84;
}

.copyright-text {
    font-size: 0.8rem;
    color: #8a9ba8;
    line-height: 1.5;
    margin: 0.5rem 0;
}

/* 移动端页脚优化 */
@media (max-width: 768px) {
    footer img {
        max-width: 90px;
    }
    
    .copyright-text {
        font-size: 0.75rem;
        text-align: center;
    }
    
    footer hr {
        margin: 1.5rem 0;
    }
}

.dropdown-menu {
    margin: 0 -20px !important;
    border-radius: 12px;
    border: 1px solid #e8f0fe;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    padding: 8px;
}

.dropdown-item {
    border-radius: 8px;
    padding: 10px 16px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f0f8ff;
    transform: translateX(4px);
}

/* 统计卡片样式 */
.stat-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e8f0fe;
}

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

/* 按钮组样式 */
.btn-group .btn {
    border-radius: 8px;
    margin: 0 6px;
}

/* 标签样式 */
.badge {
    border-radius: 16px;
    padding: 0.4rem 0.8rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.badge-primary {
    background-color: #4a90e2;
}

.badge-success {
    background-color: #7ed321;
}

.badge-warning {
    background-color: #ffcc00;
    color: #333;
}

.badge-danger {
    background-color: #ff6b8b;
}
