* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    opacity: 0.9;
    z-index: -1;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 50px 10px;
    flex: 1;
}

.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 50px;
    gap: 15px;
}

.search-input {
    width: 400px;
    padding: 15px 20px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    font-size: 16px;
    outline: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.add-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.add-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.manage-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin-left: 10px;
}

.manage-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: clamp(30px, 4vw, 60px);
    justify-items: center;
    align-items: start;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.site-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.site-item:hover {
    transform: translateY(-5px);
}

.site-name {
    font-size: 14px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    max-width: 100px;
    word-wrap: break-word;
}



/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    margin: 10% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #000;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.modal-content input:focus {
    border-color: #667eea;
}

.modal-content button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.modal-content button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* 备案信息样式 */
.footer {
    margin-top: auto;
    padding: 20px 0;
    text-align: center;
    flex-shrink: 0;
}

.beian-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.beian-info a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.beian-info a:hover {
    color: white;
}

.separator {
    margin: 0 15px;
}

.beian-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 5px;
}

/* 响应式设计 */
@media (min-width: 1800px) {
    .sites-grid {
        grid-template-columns: repeat(7, 1fr) !important;
        max-width: 1800px !important;
        gap: clamp(80px, 7vw, 150px) !important;
        padding: 0 80px !important;
    }
    
    .container {
        padding: 80px 40px !important;
    }
}

@media (min-width: 1400px) and (max-width: 1799px) {
    .sites-grid {
        grid-template-columns: repeat(7, 1fr) !important;
        max-width: 1600px !important;
        gap: clamp(50px, 5vw, 80px) !important;
        padding: 0 60px !important;
    }
    
    .container {
        padding: 60px 30px !important;
    }
}

@media (max-width: 1399px) {
    .sites-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
        gap: clamp(25px, 3.5vw, 50px) !important;
        padding: 0 30px !important;
        max-width: 1200px !important;
    }
}

@media (max-width: 900px) {
    .sites-grid {
        grid-template-columns: repeat(auto-fit, minmax(max(85px, calc((100vw - 80px) / 5)), 1fr)) !important;
        gap: clamp(18px, 2.5vw, 35px) !important;
        padding: 0 25px !important;
        justify-content: center !important;
    }
}
        padding: 0 10px;
    }
}

@media (max-width: 768px) {
    .search-input {
        width: 300px;
    }
    
    .sites-grid {
        grid-template-columns: repeat(auto-fit, minmax(max(80px, calc((100vw - 60px) / 4)), 1fr));
        gap: clamp(10px, 2vw, 25px);
        padding: 0 10px;
    }
    
    .icon-container {
        width: 56px;
        height: 56px;
    }
    
    .beian-info {
        font-size: 12px;
        padding: 0 20px;
    }
    
    .separator {
        display: block;
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    .search-input {
        width: 250px;
    }
    
    .sites-grid {
        grid-template-columns: repeat(auto-fit, minmax(max(70px, calc((100vw - 40px) / 3)), 1fr));
        gap: clamp(8px, 1.5vw, 18px);
        padding: 0 8px;
    }
    
    .icon-container {
        width: 48px;
        height: 48px;
    }
    
    .site-name {
        font-size: 12px;
    }
    
    .beian-info {
        font-size: 11px;
    }
}
/* 加载和错误状态样式 */
.loading, .error, .empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: white;
    font-size: 18px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.error {
    color: #ff6b6b;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes slowRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 消息提示样式 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 2000;
    animation: slideIn 0.3s ease-out;
}

.message.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.message.error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
/* 图标容器样式 */
.icon-container {
    position: relative;
    width: 64px;
    height: 64px;
    margin-bottom: 8px;
}

.site-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: all 0.3s ease, opacity 0.3s ease;
    animation: slowRotate 20s linear infinite;
}

.site-item:hover .site-icon {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
    animation-play-state: paused;
}

/* 移除原来的site-icon样式重复定义 */
/* 管理模态框样式 */
.manage-modal {
    max-width: 90%;
    width: 1000px;
    max-height: 80vh;
    overflow: hidden;
}

.manage-content {
    max-height: 60vh;
    overflow-y: auto;
}

.sites-table-container {
    overflow-x: auto;
}

.sites-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.sites-table th,
.sites-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.sites-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sites-table td {
    color: #555;
}

.sites-table tr:hover {
    background: #f8f9fa;
}

.site-icon-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.site-url {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-edit,
.btn-delete {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #007bff;
    color: white;
}

.btn-edit:hover {
    background: #0056b3;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

/* 响应式表格 */
@media (max-width: 768px) {
    .manage-modal {
        width: 95%;
        max-width: none;
    }
    
    .sites-table {
        font-size: 14px;
    }
    
    .sites-table th,
    .sites-table td {
        padding: 8px 4px;
    }
    
    .site-url {
        max-width: 120px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }
}
/* 复选框样式 */
.checkbox-container {
    margin: 15px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label:hover .checkmark {
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* 置顶标识样式 */
.top-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: bold;
}