* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
}

.container {
    max-width: 1000px;  /* 增加容器宽度以适应一行10个 */
    margin: 0 auto;
    padding: 20px;
}

.site-grid {
    display: grid;
    grid-template-columns: repeat(10, 80px); /* 修改为10列 */
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.site-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    height: 80px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.site-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    background-color: #f8f9fa;
}

.site-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 5px;
    border-radius: 4px;
    object-fit: contain;
}

.site-name {
    font-size: 12px;
    text-align: center;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.delete-button {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff4444;
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    z-index: 1;
}

.site-item:hover .delete-button {
    display: block;
}

.add-button {
    display: none; /* 默认隐藏 */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.add-button.show {
    display: flex; /* 当需要显示时添加show类 */
}

.add-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.button-group button {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.cancel-btn {
    background: #f5f5f5;
    color: #333;
}

.submit-btn {
    background: #1a73e8;
    color: white;
} 