* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2a3a, #0d1b2a);
    color: #e0e0e0;
    min-height: 100vh;
    padding-bottom: 40px;
}

header {
    background: rgba(10, 20, 30, 0.85);
    backdrop-filter: blur(8px);
    padding: 10px 4%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    position: sticky;
    top: 0;
    z-index: 100;
}


.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 0;
}

.header-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
}


.logo-icon {
    font-size: 2.5rem;
    color: #4CAF50;
}

.logo-text {
    line-height: 1.2;
}

.logo h1 {
    font-size: 1.8rem;
    background: linear-gradient(to right, #4CAF50, #8BC34A);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    white-space: nowrap;
}

.logo p {
    color: #a0a0a0;
    font-size: 0.85rem;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1;
    max-width: 800px;
    justify-content: flex-end;
}

.search-container {
    position: relative;
    flex-grow: 1;
    min-width: 250px;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #8BC34A;
    z-index: 2;
}


.search-container input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border-radius: 30px;
    border: none;
    background: rgba(30, 40, 50, 0.7);
    color: white;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.search-container input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border-radius: 30px;
    border: none;
    background: rgba(30, 40, 50, 0.7);
    color: white;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.search-container i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #8BC34A;
}

.filters {
    display: flex;
    gap: 8px;
    align-items: center;
}


.filter-btn {
    background: rgba(40, 50, 60, 0.7);
    border: 1px solid #4CAF50;
    color: #e0e0e0;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.filter-btn:hover, .filter-btn.active {
    background: #4CAF50;
    color: white;
}

main {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

.stats {
    background: rgba(30, 40, 50, 0.5);
    border-radius: 15px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.stat-card {
    background: rgba(40, 50, 60, 0.7);
    border-radius: 10px;
    padding: 15px;
    min-width: 150px;
    text-align: center;
    flex: 1;
}

.stat-card h3 {
    font-size: 1.8rem;
    color: #4CAF50;
    margin-bottom: 5px;
}

.stat-card p {
    color: #a0a0a0;
    font-size: 0.9rem;
}

.modpacks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.modpack-card {
    background: rgba(30, 40, 50, 0.7);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.modpack-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(76, 175, 80, 0.5);
}

.card-header {
    position: relative;
}

.modpack-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.modpack-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(10, 20, 30, 0.9));
    padding: 20px 15px 10px;
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
}

.card-content {
    padding: 20px;
}

.modpack-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.version {
    background: rgba(76, 175, 80, 0.2);
    color: #8BC34A;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
}

.team {
    color: #a0a0a0;
    font-size: 0.9rem;
    max-width: 60%;
    text-align: right;
}

.modpack-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    background: rgba(40, 50, 60, 0.9);
    color: #8BC34A;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.modpack-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.link-btn {
    flex: 1;
    min-width: 120px;
    background: rgba(40, 50, 60, 0.9);
    color: #e0e0e0;
    border: 1px solid #4CAF50;
    padding: 8px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.link-btn:hover {
    background: #4CAF50;
    color: white;
}


.download-available {
    display: inline-block;
    background: #4CAF50;
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-top: 10px;
}

.download-not-available {
    display: inline-block;
    background: #f44336;
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-top: 10px;
}

footer {
    text-align: center;
    padding: 30px 20px 0;
    color: #a0a0a0;
    font-size: 0.9rem;
    
}

/* 移动端优化 */
@media (max-width: 900px) {
    .header-row {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .logo {
        justify-content: center;
        padding-bottom: 5px;
        text-align: center;
    }
    
    .logo-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .controls {
        justify-content: center;
    }


    .search-container {
        width: 100%;
        max-width: 100%;
    }
}


/* 小屏幕设备优化 */
@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo-icon {
        font-size: 2rem;
    }
    
    .search-container {
        min-width: 100%;
    }
    
    .filters {
        width: 100%;
        justify-content: center;
    }
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
    color: #8BC34A;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 15px;
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-height: 40px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.filters.expanded {
    max-height: 500px; 
}

/* 图标 */
.icon {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    vertical-align: middle;
}


.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-height: 40px;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  

  header:hover .filters {
    max-height: 500px;
  }
  

          #lv-container {
            display: none;
            position: fixed;
            bottom: 70px;
            right: 20px;
            width: 360px;
            height: 400px;
            background: white;
            box-shadow: 0 0 8px rgba(0,0,0,0.25);
            border-radius: 8px;
            overflow: auto;
            z-index: 9999;
          }
      

          #comment-icon {
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 48px;
            height: 48px;
            background-color: #007bff;
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            cursor: pointer;
            box-shadow: 0 0 8px rgba(0,0,0,0.3);
            z-index: 10000;
            user-select: none;
          }
      
          #comment-icon:hover {
            background-color: #0056b3;
          }

.i18n-version {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #a0a0a0;
}

.i18n-version span:first-child {
    font-weight: bold;
    color: #8BC34A;
}


/* 懒加载指示器 */
.lazy-load-indicator {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: #8BC34A;
    display: none;
}

/* 无结果提示 */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #8BC34A;
}

/* 渲染优化 */
.modpacks-grid {
    contain: strict layout;
    will-change: transform;
}

.modpack-card {
    will-change: transform, opacity;
}

/* 图片加载过渡 */
.modpack-img {
    background: linear-gradient(45deg, #1a2a3a, #0d1b2a);
    transition: opacity 0.3s;
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #8BC34A;
    font-size: 1.2rem;
}

.modpack-img {
    transition: opacity 0.5s ease;
    opacity: 0;
    background: linear-gradient(45deg, #1a2a3a, #0d1b2a);
}

.modpack-img.loaded {
    opacity: 1;
}

/* 添加以下样式到现有CSS文件中 */

/* 上传按钮 */
#upload-icon {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 48px;
    height: 48px;
    background-color: #4CAF50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
    z-index: 10000;
    user-select: none;
    transition: background-color 0.3s;
}

#upload-icon:hover {
    background-color: #3d8b40;
    transform: scale(1.05);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
    animation: fadeIn 0.3s;
}

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

.modal-content {
    background: linear-gradient(135deg, #1a2a3a, #0d1b2a);
    margin: 10% auto;
    padding: 25px;
    border: 1px solid #4CAF50;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    color: #e0e0e0;
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #fff;
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 10px;
    color: #8BC34A;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modal-subtitle {
    text-align: center;
    color: #a0a0a0;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

/* 上传区域 */
.upload-area {
    border: 2px dashed rgba(76, 175, 80, 0.5);
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    background: rgba(30, 40, 50, 0.3);
}

.upload-area.dragover {
  border-color: #4CAF50;
  background-color: rgba(76, 175, 80, 0.1);
  transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #8BC34A;
}

.upload-area p {
    margin: 10px 0;
}

.select-file-btn {
    background: rgba(40, 50, 60, 0.7);
    color: #e0e0e0;
    border: 1px solid #4CAF50;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    margin: 15px 0;
}

.select-file-btn:hover {
  background: #4CAF50;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.select-file-btn, .filter-btn, .link-btn {
  transition: all 0.2s ease-in-out;
}

.file-type-hint {
    color: #a0a0a0;
    font-size: 0.85rem;
    margin-top: 10px;
}

#file-input {
    display: none;
}

/* 文件信息 */
.file-info {
    background: rgba(40, 50, 60, 0.5);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    display: none;
}

.file-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
}

.file-info i {
    color: #8BC34A;
    width: 20px;
    text-align: center;
}

/* 进度条 */
.progress-container {
    width: 100%;
    height: 20px;
    background: rgba(30, 40, 50, 0.7);
    border-radius: 10px;
    margin: 20px 0;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, #00c9ff, #92fe9d);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d1b2a;
    font-weight: bold;
    font-size: 0.9rem;
}

/* 按钮区域 */
.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.modal-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#start-upload-btn {
    background: linear-gradient(to right, #00b09b, #96c93d);
    color: white;
}

#start-upload-btn:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.7;
}

.cancel-btn {
    background: rgba(244, 67, 54, 0.8);
    color: white;
}

.cancel-btn:hover {
    background: #f44336;
}

/* 上传结果 */
.upload-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
}

.upload-result div {
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4CAF50;
    color: #8BC34A;
}

.result-error {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid #f44336;
    color: #ff6b6b;
}

.upload-result a {
    color: #00c9ff;
    text-decoration: none;
    word-break: break-all;
}

.upload-result a:hover {
    text-decoration: underline;
}