/* 主样式文件 */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
    line-height: 1;
    color: #333;
    background-color: #f5f7fa;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0.8rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-brand img {
    margin-right: 10px;
}

/* 轮播图样式 */
.swiper-container {
    border-radius: 15px;
    overflow: hidden;
    margin-top: 20px;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-button-next,
.swiper-button-prev {
    color: white;
    background: rgba(0,0,0,0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.5);
}

.swiper-pagination-bullet-active {
    background: white;
}

/* 灯笼卡片样式 */
.lantern {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.lantern:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15) !important;
}

.lantern-icon img {
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2));
}

.countdown {
    font-family: 'Courier New', monospace;
    font-size: 2.2rem;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    background: linear-gradient(45deg, #ff0000, #ff8800, #ffff00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-display {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(240,240,240,0.9) 100%);
    border-radius: 10px;
    padding: 0px;
}

.animal-name {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.animal-number {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 15px;
}

.animal-info .badge {
    font-size: 0.9rem;
    padding: 5px 10px;
    margin: 0 5px;
}

/* 表格样式 */
.table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 15px;
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.table td {
    padding: 12px 15px;
    vertical-align: middle;
    border-color: #eee;
}

/* 按钮样式 */
.btn {
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #20c997 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #fd7e14 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #ff922b 100%);
    color: #333;
    border: none;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    padding: 15px 20px;
    font-weight: 600;
}

/* 移动端底部导航 */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex;
    z-index: 1000;
    padding: 10px 0;
}

.mobile-nav a {
    flex: 1;
    text-align: center;
    color: #666;
    text-decoration: none;
    padding: 10px 5px;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.mobile-nav a.active {
    color: var(--primary-color);
}

.mobile-nav a i {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

/* 页脚样式 */
footer {
    margin-top: 50px;
    padding: 40px 0;
    background: linear-gradient(135deg, #2c3e50 0%, #4a6491 100%);
}

footer h5 {
    color: white;
    margin-bottom: 20px;
    font-weight: 600;
}

footer p, footer a {
    color: rgba(255,255,255,0.8);
}

footer a:hover {
    color: white;
    text-decoration: underline;
}

footer hr {
    background: rgba(255,255,255,0.2);
    margin: 30px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-brand img {
        height: 30px;
    }
    
    .countdown {
        font-size: 1.8rem;
    }
    
    .animal-number {
        font-size: 2.5rem;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .table td, .table th {
        padding: 8px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    footer {
        padding: 30px 0;
        text-align: center;
    }
    
    .mobile-nav {
        display: flex;
    }
    
    body {
        padding-bottom: 70px; /* 为底部导航留出空间 */
    }
}

@media (max-width: 576px) {
    .lantern {
        margin-bottom: 20px;
    }
    
    .swiper-container {
        margin-top: 10px;
    }
    
    .btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.pulse {
    animation: pulse 2s infinite;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* 工具类 */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

.shadow-sm {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.shadow-lg {
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

.rounded-lg {
    border-radius: 15px !important;
}

.rounded-xl {
    border-radius: 20px !important;
}

/* 灯笼颜色相关的样式 */
.bg-red { background-color: #dc3545 !important; }
.bg-yellow { background-color: #ffc107 !important; color: #333 !important; }
.bg-blue { background-color: #007bff !important; }

.text-red { color: #dc3545 !important; }
.text-yellow { color: #ffc107 !important; }
.text-blue { color: #007bff !important; }

/* 表单样式 */
.form-control {
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    padding: 12px 15px;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: -20px;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 弹窗样式 */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.modal-header {
    border-radius: 15px 15px 0 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.modal-footer {
    border-top: 1px solid #eee;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 进度条 */
.progress {
    height: 10px;
    border-radius: 5px;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 5px;
}

/* 标签样式 */
.badge {
    border-radius: 20px;
    padding: 6px 12px;
    font-weight: 500;
}

.badge-pill {
    border-radius: 50rem;
}

/* 图片响应式 */
.img-fluid {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* 分页样式 */
.pagination {
    justify-content: center;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-color: var(--primary-color);
}

.page-link {
    color: var(--primary-color);
    border-radius: 5px;
    margin: 0 3px;
    border: 1px solid #dee2e6;
}

.page-link:hover {
    color: var(--secondary-color);
    background-color: #f8f9fa;
    border-color: #dee2e6;
}