/* 基础重置与变量 - 数字尾巴风格 */
:root {
    --primary-color: #8e44ad;
    --primary-light: #9b59b6;
    --primary-dark: #6c3483;
    --secondary-color: #ff9f1a;
    --secondary-light: #ffb347;
    --text-dark: #1a1a1a;
    --text-medium: #666666;
    --text-light: #999999;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e8e8e8;
    --shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
    --shadow-card: 0 8px 24px rgba(142, 68, 173, 0.08);
    --radius: 16px;
    --radius-sm: 12px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 - 紫色渐变卡片风 */
.header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 50%, var(--primary-light) 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 12px 40px rgba(142, 68, 173, 0.3), 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(15px);
    background-color: rgba(142, 68, 173, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.2rem 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transition: var(--transition);
}

.logo:hover {
    transform: translateY(-2px);
}

.logo i {
    font-size: 2.8rem;
    color: var(--secondary-light);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.logo h1 {
    font-family: 'Comic Neue', cursive;
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 0.95rem;
    opacity: 0.95;
    margin-left: 4rem;
    margin-top: -0.6rem;
    font-weight: 400;
}

.main-nav {
    display: flex;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.8rem;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 800;
    font-size: 1.2rem;
    transition: var(--transition);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.nav-btn i {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

.nav-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.2) 100%);
    color: white;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.nav-btn.active {
    background: linear-gradient(135deg, var(--bg-white) 0%, #f8f9fa 100%);
    color: var(--primary-color);
    box-shadow: 0 10px 28px rgba(142, 68, 173, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--bg-white);
    transform: translateY(-3px) scale(1.03);
    text-shadow: none;
}

/* 主内容布局 */
.main {
    display: flex;
    min-height: calc(100vh - 180px);
    padding: 2rem 0;
    gap: 2rem;
}

/* 侧边栏样式 - 数字尾巴卡片风格 */
.sidebar {
    width: 340px;
    flex-shrink: 0;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.sidebar:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.sidebar-header {
    padding: 1.8rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(to right, rgba(142, 68, 173, 0.05), rgba(255, 159, 26, 0.05));
}

.sidebar-header h2 {
    font-family: 'Comic Neue', cursive;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(106, 137, 204, 0.2);
}

.breed-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.breed-item {
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 2px solid transparent;
}

.breed-item:hover {
    background: rgba(106, 137, 204, 0.05);
    border-color: var(--border-color);
}

.breed-item.active {
    background: linear-gradient(135deg, rgba(106, 137, 204, 0.1) 0%, rgba(74, 105, 189, 0.1) 100%);
    border-color: var(--primary-light);
    color: var(--primary-color);
}

.breed-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.breed-info {
    flex: 1;
}

.breed-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.breed-scientific {
    font-size: 0.85rem;
    color: var(--text-medium);
    font-style: italic;
}

.loading {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

.loading i {
    margin-right: 0.5rem;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-medium);
    text-align: center;
}

/* 右侧内容区 */
.content {
    flex: 1;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.content-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.breadcrumb span:first-child {
    font-weight: 700;
    color: var(--primary-color);
}

.breadcrumb i {
    color: var(--text-light);
    font-size: 0.9rem;
}

.content-actions {
    display: flex;
    gap: 0.75rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-sm);
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
}

.btn-outline:hover {
    background: rgba(106, 137, 204, 0.1);
}

.btn-image {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-image:hover {
    background: white;
    transform: scale(1.1);
}

/* 内容主体 */
.content-body {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-medium);
}

.empty-state i {
    font-size: 4rem;
    color: var(--primary-light);
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state h2 {
    font-family: 'Comic Neue', cursive;
    font-size: 2.2rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.tips {
    max-width: 400px;
    margin: 0 auto;
    text-align: left;
}

.tip {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
}

.tip i {
    font-size: 1.2rem;
    color: var(--secondary-color);
    opacity: 1;
}

.tip span {
    font-size: 1rem;
}

/* 品种详情 */
.breed-detail.hidden {
    display: none;
}

.detail-header {
    margin-bottom: 2rem;
}

.detail-header h2 {
    font-family: 'Comic Neue', cursive;
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.breed-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-medium);
}

.meta-item i {
    color: var(--primary-light);
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .detail-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* 图片区 */
.image-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-light);
    height: 300px;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.main-image:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    opacity: 0;
    transition: var(--transition);
}

.main-image:hover .image-overlay {
    opacity: 1;
}

.image-thumbnails {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid transparent;
    transition: var(--transition);
}

.thumbnail:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.thumbnail.active {
    border-color: var(--primary-color);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 信息区 */
.info-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    flex-wrap: wrap;
}

.info-tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    font-weight: 600;
    color: var(--text-medium);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.info-tab:hover {
    color: var(--primary-color);
    background: rgba(106, 137, 204, 0.05);
}

.info-tab.active {
    color: var(--primary-color);
    background: rgba(106, 137, 204, 0.1);
}

.info-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.info-content {
    min-height: 200px;
}

.tab-content {
    display: none;
    padding: 1rem 0;
    line-height: 1.7;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.funfacts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.funfact-item {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--secondary-color);
}

.funfact-item i {
    color: var(--secondary-color);
    margin-right: 0.5rem;
}

/* 特征标签 */
.tags-section h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.5rem 1rem;
    background: rgba(106, 137, 204, 0.1);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    max-width: 900px;
    max-height: 90vh;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.modal-content img {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
}

.modal-info {
    padding: 1.5rem;
}

.modal-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.modal-info p {
    color: var(--text-medium);
}

/* 页脚 */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--secondary-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.footer-section li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .detail-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        text-align: center;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .subtitle {
        margin-left: 0;
        margin-top: 0;
    }
    
    .main-nav {
        width: 100%;
        justify-content: center;
    }
    
    .content-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .content-actions {
        justify-content: center;
    }
    
    .breadcrumb {
        justify-content: center;
    }
    
    .breed-meta {
        justify-content: center;
    }
}

/* 实用类 */
.hidden {
    display: none !important;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}