:root {
    --primary-color: #2563eb;
    --secondary-color: #3b82f6;
    --accent-color: #60a5fa;
    --background-color: #f8fafc;
    --card-background: rgba(255, 255, 255, 0.9);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 12px -2px rgba(0,0,0,0.15);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --border-color: rgba(0,0,0,0.1);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
}

body {
    background: var(--background-color);
    background-image: 
        radial-gradient(at 40% 20%, rgba(37,99,235,0.1) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(96,165,250,0.1) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(37,99,235,0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: #1e293b;
}

.website-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.website-info-card {
    background: var(--card-background);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.website-info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.website-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255,255,255,0.5);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.website-logo {
    width: 120px;
    height: 120px;
    border-radius: 1rem;
    overflow: hidden;
    margin-right: 1.5rem;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.website-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

.website-logo i {
    font-size: 3rem;
    color: var(--primary-color);
}

.website-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.website-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.website-title a:hover {
    color: var(--primary-color);
}

.website-meta {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.website-meta span {
    margin-right: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.website-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.website-actions .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.website-actions .btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

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

.website-screenshot {
    width: 100%;
    border-radius: 1rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.website-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    background: rgba(255,255,255,0.5);
    border-radius: 0 1rem 1rem 0;
    font-size: 1rem;
}

.related-websites {
    background: var(--card-background);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.related-websites h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.related-website-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
}

.related-website-item:hover {
    background: rgba(37,99,235,0.1);
    transform: translateX(10px);
    border-color: var(--primary-color);
}

.related-website-logo {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    object-fit: contain;
    background: white;
    padding: 0.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.related-website-info h4 {
    font-size: 1rem;
    margin: 0;
    color: var(--text-primary);
}

.related-website-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0;
}

.advertisement {
    margin-bottom: 2rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

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

.advertisement img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .website-header {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
    }

    .website-logo {
        width: 50px;
        height: 50px;
        margin-right: 1rem;
    }

    .website-title {
        font-size: 1.2rem;
    }

    .website-actions {
        flex-direction: column;
        width: 100%;
    }

    .website-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

.advertisement-top {
    max-width: 1200px;
    margin: 1rem auto;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    /* 移除固定高度，让容器根据图片内容自适应 */
}

.advertisement-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.advertisement-top img {
    width: 100%;
    height: auto;
    display: block;
}

.related-articles {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(15px);
    border-radius: 1.2rem;
    padding: 1.8rem;
    box-shadow: 
        0 10px 25px rgba(37, 99, 235, 0.1),
        0 4px 10px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.related-articles h3 {
    color: #2563eb;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(37, 99, 235, 0.2);
    display: flex;
    align-items: center;
    text-shadow: 0 1px 2px rgba(37, 99, 235, 0.1);
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.article-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: 0.8rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.article-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.article-item:hover::before {
    transform: scaleY(1);
}

.article-item:hover {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.3);
    transform: translateX(8px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
}

.article-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    margin-right: 1rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
}

.article-item:hover .article-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.4);
}

.article-content {
    flex: 1;
    min-width: 0;
}

.article-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    margin: 0 0 0.3rem 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
    text-decoration: none;
}

.article-item:hover .article-title {
    color: #2563eb;
    text-decoration: none;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-date {
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    align-items: center;
}

.article-arrow {
    color: #94a3b8;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
}

.article-item:hover .article-arrow {
    color: #2563eb;
    transform: translateX(4px);
}

.related-article-item {
    display: block;
    padding: 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    margin-bottom: 1rem;
}

.related-article-item:hover {
    background: rgba(37,99,235,0.1);
    border-color: var(--primary-color);
    transform: translateX(10px);
}

.related-article-item h4 {
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
}

.related-article-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.related-navs-horizontal {
    background: var(--card-background);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
}

.related-navs-horizontal h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.related-navs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.related-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: inherit;
    background: rgba(255,255,255,0.5);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.related-nav-item:hover {
    background: rgba(37,99,235,0.1);
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.related-nav-logo {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.related-nav-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

.related-nav-info h4 {
    font-size: 1rem;
    margin: 0;
    color: var(--text-primary);
}

.related-nav-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 下载信息样式 - 大气酷炫版 */
.download-info {
    background: linear-gradient(145deg, 
        rgba(13, 110, 253, 0.1) 0%, 
        rgba(25, 135, 84, 0.1) 50%, 
        rgba(220, 53, 69, 0.1) 100%);
    backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    padding: 1.8rem;
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.08),
        0 6px 12px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.download-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(13, 110, 253, 0.05) 50%, 
        transparent 70%);
    animation: wave 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes wave {
    0%, 100% { transform: translateX(-100%) skewX(-15deg); }
    50% { transform: translateX(100%) skewX(-15deg); }
}

.download-header {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.download-header h3 {
    color: #0d6efd;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0;
    text-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
    background: linear-gradient(135deg, #0d6efd, #198754);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.download-card {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 1.5rem;
    padding: 2rem;
    position: relative;
    z-index: 2;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.1),
        0 5px 15px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.download-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 10px 25px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.download-button {
    position: relative;
    margin-bottom: 1.2rem;
}

.download-btn {
    position: relative;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 0.8rem;
    border: none;
    background: linear-gradient(135deg, #0d6efd 0%, #198754 50%, #dc3545 100%);
    background-size: 200% 200%;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 
        0 6px 20px rgba(13, 110, 253, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    animation: gradientShift 3s ease infinite;
    overflow: hidden;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.btn-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.download-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 15px 35px rgba(13, 110, 253, 0.5),
        0 5px 15px rgba(0, 0, 0, 0.3);
}

.download-btn:hover .btn-glow {
    left: 100%;
}

.download-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.download-stats {
    margin-bottom: 1.5rem;
}

.stats-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.1), rgba(255, 255, 255, 0.8));
    border-radius: 0.8rem;
    padding: 1rem;
    border: 1px solid rgba(108, 117, 125, 0.2);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    white-space: nowrap;
    min-width: fit-content;
}

.stats-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6c757d, #495057);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    box-shadow: 0 3px 8px rgba(108, 117, 125, 0.25);
}

.stats-info {
    text-align: left;
    white-space: nowrap;
    min-width: fit-content;
}

.stats-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #495057;
    line-height: 1;
}

.stats-label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
    margin-top: 0.1rem;
    white-space: nowrap;
}

.qr-code-section {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.05), rgba(255, 255, 255, 0.9));
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(108, 117, 125, 0.1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.qr-code-container {
    display: inline-block;
}

.qr-code-frame {
    position: relative;
    display: inline-block;
    padding: 20px;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.1),
        0 4px 10px rgba(0, 0, 0, 0.08);
}

.qr-code-img {
    width: 150px;
    height: 150px;
    border-radius: 1rem;
    display: block;
    transition: all 0.4s ease;
}

.qr-code-frame:hover .qr-code-img {
    transform: scale(1.05);
}

.qr-code-corners {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    pointer-events: none;
}

.corner {
    position: absolute;
    width: 25px;
    height: 25px;
    border: 3px solid #0d6efd;
}

.corner-tl {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
    border-radius: 8px 0 0 0;
}

.corner-tr {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
    border-radius: 0 8px 0 0;
}

.corner-bl {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
    border-radius: 0 0 0 8px;
}

.corner-br {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
    border-radius: 0 0 8px 0;
}

.qr-code-text {
    margin-top: 1.2rem;
    font-size: 1rem;
    color: #495057;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.visit-website {
    background: var(--card-background);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.visit-website .btn {
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.visit-website .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

@media (max-width: 991px) {
    /* 在中等屏幕上显示二维码，但调整大小 */
    .qr-code-img {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 768px) {
    .related-navs-grid {
        grid-template-columns: 1fr;
    }

    .advertisement-top {
        margin: 1rem;
        border-radius: 0.5rem;
    }

    /* 移动端布局排序 - 修复容器冲突 */
    .website-container .row {
        display: flex;
        flex-direction: column;
    }

    .main-content,
    .sidebar-content,
    .related-navs-horizontal {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
    }

    /* 网站信息卡片 */
    .mobile-order-1 {
        order: 1;
    }

    /* 下载卡片 */
    .mobile-order-2 {
        order: 2;
    }

    /* 相关课本 */
    .mobile-order-3 {
        order: 3;
    }

    /* 相关文章 */
    .mobile-order-4 {
        order: 4;
    }



    .download-info {
        padding: 1.2rem;
        border-radius: 1.2rem;
        margin: 1rem 0;
    }

    .download-header h3 {
        font-size: 1.4rem;
        margin-bottom: 0;
    }

    .download-card {
        padding: 1.2rem !important;
        border-radius: 1rem;
    }

    .download-button {
        margin-bottom: 0.8rem;
    }

    .download-btn {
        font-size: 1rem;
        padding: 0.9rem 1.8rem;
        border-radius: 0.7rem;
    }

    .download-stats {
        margin-bottom: 0 !important;
    }

    .stats-container {
        flex-direction: row;
        gap: 0.8rem;
        padding: 0.8rem;
        white-space: nowrap;
        min-width: fit-content;
    }

    .stats-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .stats-info {
        text-align: left;
        white-space: nowrap;
        min-width: fit-content;
    }

    .stats-number {
        font-size: 1.3rem;
    }

    .stats-label {
        font-size: 0.75rem;
        white-space: nowrap;
    }

    .website-header {
        flex-direction: row;
        text-align: left;
        gap: 1rem;
        align-items: center;
    }

    .website-logo {
        width: 50px;
        height: 50px;
        margin-right: 1rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .related-navs-horizontal {
        margin-top: 1rem;
    }

    .related-articles {
        margin-top: 1rem;
        padding: 1.2rem;
        border-radius: 1rem;
    }

    .articles-list {
        gap: 0.6rem;
    }

    .article-item {
        padding: 0.8rem 1rem;
        border-radius: 0.6rem;
    }

    .article-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
        margin-right: 0.8rem;
    }

    .article-title {
        font-size: 0.85rem;
        margin-bottom: 0.2rem;
    }

    .article-date {
        font-size: 0.8rem;
    }

    .article-arrow {
        font-size: 0.8rem;
    }
}

/* 小屏幕设备隐藏二维码 */
@media (max-width: 576px) {
    .qr-code-section {
        display: none !important;
    }
}