html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    background: #f9fafc;
    color: #222;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 8px;
}

header {
    background: #1976d2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 0;
}

.logo {
    color: #fff;
    font-size: 1.6rem;
    font-weight: bold;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.nav-links li a:hover {
    background: #1565c0;
}

.hero {
    background: linear-gradient(90deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 3rem 0 2rem 0;
    text-align: center;
}

.hero h1,
.about h2 {
    color: #1976d2;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.hero p,
.about p {
    font-size: 1rem;
    color: #333;
    line-height: 1.7;
    text-align: center;
}

.worksheets-list {
    padding: 1.2rem 0 1rem 0;
}

.worksheets-list h2,
.about h2 {
    color: #1976d2;
    margin-bottom: 1.5rem;
    text-align: center;
}

.worksheet-grid,
.recently-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1100px) {
    .worksheet-grid,
    .recently-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 700px) {
    .worksheet-grid,
    .recently-grid {
        grid-template-columns: 1fr;
    }
}

.worksheet-card,
.recently-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.08);
    padding: 1rem 1rem;
    text-align: center;
    font-size: 1.05rem;
    color: #1976d2;
    font-weight: 500;
    transition: box-shadow 0.2s, transform 0.2s;
    cursor: pointer;
    max-width: 220px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}
.worksheet-card:hover,
.recently-card:hover {
    box-shadow: 0 6px 18px rgba(25, 118, 210, 0.15);
    transform: translateY(-4px) scale(1.03);
}

.worksheet-img {
    width: 170px;
    height: 170px;
    object-fit: contain;
    display: block;
    margin: 8px auto 8px auto;
    border-radius: 16px;
    background: #f7faff;
    box-shadow: 0 1px 4px rgba(25,118,210,0.07);
}

.worksheet-title {
    font-size: 1.08rem;
    font-weight: 600;
    text-align: center;
    margin-top: 0;
    margin-bottom: 0;
}

.worksheet-title a{
    font-size: 1.08rem;
    font-weight: 600;
    text-align: center;
    margin-top: 0;
    margin-bottom: 0;
    color: #1976d2;
    text-decoration: none;

}

.about {
    background: #e3f2fd;
    padding: 2.5rem 0 2rem 0;
    text-align: center;
}

.about p {
    font-size: 1rem;
    color: #333;
    line-height: 1.7;
    text-align: center;
}

footer {
    background: #1976d2;
    color: #fff;
    padding: 1.2rem 0 0.5rem 0;
    text-align: center;
    margin-top: auto;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
    margin: 0.5rem 0 0 0;
    padding: 0;
}

.footer-links li a {
    color: #fff;
    text-decoration: underline;
    font-size: 0.98rem;
}

@media (max-width: 700px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .nav-links {
        flex-direction: column;
        gap: 0.6rem;
        width: 100%;
    }
    .hero h1 {
        font-size: 2rem;
    }
} 
/* 下拉菜单样式 */
.has-dropdown {
    position: relative;
}
.has-dropdown > a:after {
    content: ' ▼';
    font-size: 0.7em;
}
.dropdown {
    display: none !important;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 180px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(25,118,210,0.10);
    border-radius: 6px;
    z-index: 100;
    padding: 0.5rem 0;
    list-style: none;
}
.dropdown li {
    width: 100%;
    list-style: none;
}
.dropdown li a {
    color: #1976d2;
    background: #fff;
    padding: 0.4rem 0.8rem;
    display: block;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.dropdown li a:hover {
    background: #e3f2fd;
    color: #1976d2;
}
.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown {
    display: block !important;
}

/* 移动端下拉菜单适配 */
@media (max-width: 700px) {
    .nav-links {
        flex-direction: column;
    }
    .has-dropdown .dropdown {
        display: none !important;
        position: static;
        box-shadow: none;
        border-radius: 0 0 10px 10px;
        background: #f7faff;
        padding-left: 1.2rem;
    }
    .has-dropdown:hover > .dropdown,
    .has-dropdown:focus-within > .dropdown {
        display: block !important;
    }
    .has-dropdown > a:after {
        content: '';
    }
}

.recently-added {
    background: #f9fafc;
    padding: 2.5rem 0 2rem 0;
}
.recently-added h2 {
    color: #1976d2;
    margin-bottom: 1.5rem;
    text-align: center;
}
.recently-img {
    width: 170px;
    height: 170px;
    object-fit: contain;
    display: block;
    margin: 0 auto 12px auto;
    border-radius: 16px;
    background: #fff;
}
.recently-title {
    font-size: 1.08rem;
    color: #1976d2;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.recently-title a {
    font-size: 1.08rem;
    color: #1976d2;
    font-weight: 600;
    margin-bottom: 0.2rem;

}
.recently-desc {
    font-size: 0.98rem;
    color: #888;
    margin-bottom: 0;
}
.recently-meta {
    font-size: 0.95rem;
    color: #888;
    margin-top: 0.2rem;
    text-align: center;
}

.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header-top {
    background: #f9fafc;
    border-bottom: 1px solid #e3f2fd;
}
.header-top .logo {
    color: #1976d2;
}
.header-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
}
.header-actions {
    display: flex;
    gap: 1rem;
}
.header-btn {
    background: #fff;
    color: #1976d2;
    border-radius: 6px;
    padding: 0.35rem 1.1rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #fff;
    transition: background 0.2s, color 0.2s, border 0.2s;
    box-shadow: 0 1px 4px rgba(25,118,210,0.07);
}
.header-btn:hover {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}
@media (max-width: 700px) {
    .header-top-inner {
        flex-direction: column;
        height: auto;
        padding: 0.5rem 0;
        gap: 0.5rem;
    }
    .header-actions {
        gap: 0.5rem;
    }
}

.detail-flex {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
}
.detail-preview {
    flex: 0 0 400px;
    max-width: 400px;
    height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}
.detail-preview-pdf {
    flex: 0 0 400px;
    max-width: 400px;
    height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}
.detail-preview img {
    width: 100%;
    height:100%;
    max-width: 100%;
    max-height: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(25,118,210,0.08);
    display: block;
    margin: 0 auto;
}
.detail-info {
    flex: 1 1 0;
    min-width: 0;
}
@media (max-width: 900px) {
    .detail-flex {
        flex-direction: column;
        gap: 1.5rem;
        align-items: stretch;
    }
    .detail-preview {
        max-width: 100%;
        margin: 0 auto;
    }
}

.worksheet-detail {
    padding-top: 1.5rem;
}

.detail-title {
    color: #1976d2;
    margin-bottom: 1.5rem;
    text-align: left;
    font-size: 1.5rem;
    font-weight: 700;
}

.related-worksheets h2 {
    color: #1976d2;
   
    text-align: left;
    font-size: 1.5rem;
    font-weight: 700;
}

.detail-download {
    width: 100%;
    margin: 1.2rem 0 0 0;
    display: flex;
    justify-content: center;
}
.detail-download .header-btn {
    background: #1976d2;
    color: #fff;
    border: 1px solid #1976d2;
}
.detail-download .header-btn:hover {
    background: #1565c0;
    color: #fff;
    border: 1px solid #1565c0;
}

.related-worksheets {
    margin-top: -3rem;
}

.footer-center {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.footer-center p {
    margin: 0;
}
.vip-modal {
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vip-modal-content {
  background: #fff;
  border-radius: 8px;
  padding: 24px 32px;
  position: relative;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  text-align: center;
}
.vip-modal-close {
  position: absolute;
  right: 12px;
  top: 8px;
  font-size: 28px;
  color: #888;
  cursor: pointer;
}

main {
    flex: 1;
    margin-top: 100px;
}

/* 分页组件样式 */
.pages {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    padding: 1rem 0;
}

.pages ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.pages li {
    margin: 0;
}

.pages li a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #fff;
    color: #1976d2;
    text-decoration: none;
    border: 1px solid #e3f2fd;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 60px;
    text-align: center;
}

.pages li a:hover {
    background: #1976d2;
    color: #fff;
    border-color: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.2);
}

.pages li a:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(25, 118, 210, 0.15);
}

/* 当前页信息样式 */
.pages li:last-child,
.pages li:nth-last-child(2) {
    color: #666;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.pages li span {
    color: #1976d2;
    font-weight: 600;
}

/* 禁用状态样式 */
.pages li a.disabled,
.pages li a[href="#"] {
    color: #ccc;
    background: #f5f5f5;
    border-color: #e0e0e0;
    cursor: not-allowed;
    pointer-events: none;
}

.pages li a.disabled:hover,
.pages li a[href="#"]:hover {
    background: #f5f5f5;
    color: #ccc;
    transform: none;
    box-shadow: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .pages ul {
        gap: 0.3rem;
    }
    
    .pages li a {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        min-width: 50px;
    }
    
    .pages li:last-child,
    .pages li:nth-last-child(2) {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .pages ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .pages li a {
        width: 100%;
        max-width: 200px;
    }
    
    .pages li:last-child,
    .pages li:nth-last-child(2) {
        text-align: center;
        width: 100%;
        max-width: 200px;
    }
}