/**
 * 前台样式文件
 */

/* 全局样式 */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #56ab2f;
    --danger-color: #f5576c;
    --warning-color: #f093fb;
    --info-color: #4facfe;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 15px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    margin: 0 10px;
    border-radius: 8px;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
}

/* 主要内容区 */
.main-content {
    padding: 60px 0;
    min-height: calc(100vh - 76px);
}

.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1.1rem;
    color: #6c757d;
}

/* 活动卡片 */
.activity-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.activity-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-color);
}

.activity-body {
    padding: 20px;
    flex: 1;
}

.activity-description {
    color: #6c757d;
    margin-bottom: 20px;
    line-height: 1.6;
}

.activity-info {
    space-y: 10px;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: #6c757d;
    font-size: 0.9rem;
}

.info-item i {
    margin-right: 10px;
    color: var(--primary-color);
    width: 20px;
}

.activity-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.activity-footer .btn {
    flex: 1;
    font-weight: 500;
    border-radius: 8px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #dee2e6;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* 结果页面 */
.result-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 40px;
    text-align: center;
    margin-top: 50px;
}

/* 成功页面内容样式 */
.success-content {
    margin: 20px 0;
    text-align: left;
    line-height: 1.8;
}

.success-content h1,
.success-content h2,
.success-content h3,
.success-content h4,
.success-content h5,
.success-content h6 {
    color: var(--dark-color);
    margin: 20px 0 10px 0;
}

.success-content p {
    margin-bottom: 15px;
    color: #495057;
}

.success-content ul,
.success-content ol {
    margin-bottom: 15px;
    padding-left: 30px;
}

.success-content li {
    margin-bottom: 5px;
}

.success-content strong {
    color: var(--dark-color);
    font-weight: 600;
}

/* 活动信息卡片 */
.activity-info-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
    border-left: 4px solid var(--primary-color);
}

.activity-info-card h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.activity-info-card p {
    margin-bottom: 8px;
    color: #495057;
}

.activity-info-card strong {
    color: var(--dark-color);
}

.result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
}

.result-icon.success {
    background: linear-gradient(135deg, var(--success-color) 0%, #a8e063 100%);
    color: white;
}

.result-icon.error {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--warning-color) 100%);
    color: white;
}

/* 模态框 */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid #eee;
    padding: 20px;
}

.modal-title {
    font-weight: 600;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid #eee;
    padding: 20px;
}

/* 活动详情 */
.activity-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    line-height: 1.8;
}

/* 富文本内容样式 */
.activity-details h1,
.activity-details h2,
.activity-details h3,
.activity-details h4,
.activity-details h5,
.activity-details h6 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.activity-details h1 { font-size: 2rem; }
.activity-details h2 { font-size: 1.75rem; }
.activity-details h3 { font-size: 1.5rem; }
.activity-details h4 { font-size: 1.25rem; }
.activity-details h5 { font-size: 1.1rem; }
.activity-details h6 { font-size: 1rem; }

.activity-details p {
    margin-bottom: 15px;
    text-align: justify;
}

.activity-details ul,
.activity-details ol {
    margin-bottom: 15px;
    padding-left: 30px;
}

.activity-details li {
    margin-bottom: 5px;
}

.activity-details blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: #6c757d;
}

.activity-details strong {
    font-weight: 600;
    color: var(--dark-color);
}

.activity-details em {
    font-style: italic;
}

.activity-details u {
    text-decoration: underline;
}

.activity-details code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.activity-details pre {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    overflow-x: auto;
    margin: 15px 0;
}

.activity-details pre code {
    background: none;
    padding: 0;
}

.activity-details img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

.activity-details table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.activity-details th,
.activity-details td {
    border: 1px solid #dee2e6;
    padding: 12px;
    text-align: left;
}

.activity-details th {
    background: #f8f9fa;
    font-weight: 600;
}

.activity-details a {
    color: var(--primary-color);
    text-decoration: none;
}

.activity-details a:hover {
    text-decoration: underline;
}

.activity-details-info h6 {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.activity-details-info ul li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.activity-details-info ul li i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* 表单样式 */
.form-control {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-select {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 按钮样式 */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 10px 20px;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #a8e063 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #4a9429 0%, #96d652 100%);
    transform: translateY(-2px);
}

/* 徽章样式 */
.badge {
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .activity-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .activity-footer {
        flex-direction: column;
    }
    
    .activity-footer .btn {
        width: 100%;
    }
    
    .result-card {
        margin: 20px;
        padding: 30px 20px;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 30px 0;
    }
    
    .page-header {
        margin-bottom: 30px;
    }
    
    .activity-card {
        margin-bottom: 20px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.activity-card {
    animation: fadeIn 0.6s ease-out;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}