body {
    font-family: 'Arial', sans-serif;
    background-color: #282c34;
    color: #ffffff;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.ad-container {
    width: 200px;
    margin: 20px;
    padding: 10px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    position: fixed;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
}

.ad-container img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.ad-container a {
    color: #61dafb;
    text-decoration: none;
}

.ad-container a:hover {
    color: #f5f5f5;
}

.codeimg-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

.codeimg {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.container {
    display: flex;
    flex: 1;
    width: 80%;
    max-width: 1200px;
    margin: 20px auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.sidebar {
    width: 250px;
    background-color: #20232a;
    padding: 20px;
    position: relative;
}

.sidebar h2 {
    color: #61dafb;
    margin-bottom: 10px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    margin-bottom: 10px;
    position: relative;
}

.sidebar ul li a {
    color: #61dafb;
    text-decoration: none;
    font-size: 18px;
    display: block;
    padding: 10px;
    border-radius: 5px;
}

.sidebar ul li a:hover {
    color: #21a1f1;
    background-color: #333;
}

.sidebar ul li ul {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #282c34;
    border-left: 2px solid #61dafb;
}

.sidebar ul li:hover > ul {
    display: block;
}

.sidebar ul li ul li {
    margin: 0;
}

.sidebar ul li ul li a {
    padding: 10px 20px;
    font-size: 16px;
}

.sidebar ul li:hover > a {
    background-color: #333;
}

.content {
    flex: 1;
    background-color: #ffffff;
    color: #282c34;
    padding: 20px;
}

.content h1 {
    color: #21a1f1;
    margin-bottom: 20px;
}

.content ul {
    list-style: none;
    padding: 0;
}

.content ul li {
    margin-bottom: 10px;
}

.content a {
    display: inline-block;
    margin-top: 5px;
    text-decoration: none;
    border-radius: 5px;
}

/* Download button styling */
.download-btn {
    background-color: #2196F3;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.download-btn:hover {
    background-color: #1976D2;
}


.description {
    margin-top: 20px;
}

.description h2 {
    color: #21a1f1;
    margin-bottom: 10px;
}

.description img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.software-image {
    margin: 20px 0;
    text-align: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.software-image img {
    max-width: 100%;
    height: auto;
    max-height: 600px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    background-color: #fff;
    padding: 5px;
}

.software-image img:hover {
    transform: scale(1.05);
    cursor: zoom-in;
}

@media (max-width: 768px) {
    .software-image {
        max-width: 100%;
        padding: 10px;
    }
    
    .software-image img {
        max-height: 400px;
    }
}

.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
    justify-content: center;
}

.gallery-item {
    flex: 1 1 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: auto;
    max-width: 1200px;
    max-height: 1200px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .gallery-item img {
        width: 300px;
        max-height: 500px;
    }
}

@media (max-width: 600px) {
    .gallery-item img {
        width: 300px;
        max-height: 400px;
    }
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.gallery-item img:hover {
    transform: scale(1.05);
    cursor: zoom-in;
}

@media (min-width: 600px) {
    .gallery-item {
        flex: 1 1 calc(100% - 15px);
        max-width: calc(100% - 15px);
    }
    
    .gallery-item img {
        max-width: 600px;
        max-height: 600px;
    }
}

@media (max-width: 600px) {
    .gallery-item {
        padding: 8px;
    }
    
    .gallery-item img {
        max-height: 400px;
    }
}

.footer {
    background-color: #20232a;
    color: #61dafb;
    text-align: center;
    padding: 20px;
    width: 100%;
}

.footer h2 {
    margin-bottom: 10px;
}

.footer ul {
    list-style: none;
    padding: 0;
}

.footer ul li {
    display: inline;
    margin-right: 10px;
}

.footer ul li a {
    color: #61dafb;
    text-decoration: none;
}

.footer ul li a:hover {
    color: #21a1f1;
}

.icp-record {
    color: #888;
}

/* Software Grid Layout */
.software-grid {
    margin-top: 30px;
}

.software-grid h2 {
    color: #21a1f1;
    margin-bottom: 20px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 10px;
}

.software-card {
    background-color: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.software-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    height: 100%;
}

.card-content {
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    box-sizing: border-box;
    position: relative;
    width: 100%;
}

.card-content p {
    margin: 4px 0;
    padding: 0;
}

@media (max-width: 768px) {
    .card-content {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .card-content {
        padding: 10px;
    }
}

.software-name {
    color: #21a1f1;
    margin-bottom: 10px;
    font-size: 20px;
    background-color: #f5f5f5;
    border-radius: 4px;
    display: inline-block;
}

.software-meta {
    background-color: #f5f5f5;
    border-radius: 4px;
}

.software-meta span {
    display: block;
    width: 100%;
    color: #333;
    font-size: 14px;
    margin: 2px 0;
    padding: 6px;
    background-color: transparent;
    border-radius: 3px;
    box-shadow: none;
}

/* Modal样式 */
.modal {
    display: none; /* 初始隐藏 */
    position: fixed; /* 定位到屏幕上 */
    z-index: 1; /* 顶层显示 */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* 半透明背景 */
    overflow: auto; /* 允许滚动 */
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 600px;
    margin: auto;
}

.close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}