/* 主样式文件 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    width: 160px;
    height: 40px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-right: 30px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    color: #6c63ff;
}

.user-actions {
    display: flex;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #6c63ff;
    color: #fff;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
    cursor: pointer;
}

.btn:hover {
    background-color: #5a52d5;
}

.lang {
    margin-left: 20px;
    font-size: 14px;
    color: #666;
}

/* 主内容样式 */
main {
    padding: 40px 0;
}

main h1 {
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 600;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.tool-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.tool-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
    min-height: 90px;
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #6c63ff;
}

.tool-card:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    background: rgba(108, 99, 255, 0.05);
    z-index: 0;
    pointer-events: none;
}

.tool-card * {
    position: relative;
    z-index: 1;
}

.tool-header {
    display: table !important;
    width: 100%;
    margin-bottom: 10px;
}

.tool-icon {
    display: table-cell !important;
    vertical-align: middle !important;
    padding-right: 10px;
    width: 32px;
}

.tool-icon img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.tool-card h3 {
    display: table-cell !important;
    vertical-align: middle !important;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.tool-card:hover h3 {
    color: #6c63ff;
    text-decoration: none;
}

.tool-card p {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    transition: color 0.3s ease;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-card:hover p {
    color: #333;
}

/* 底部样式 */
footer {
    background-color: #fff;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid #eee;
}

footer .container {
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        width: 100%;
    }
    
    .tool-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .tool-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    nav {
        margin: 20px 0;
    }
    
    .user-actions {
        align-self: flex-end;
        margin-top: -50px;
    }
    
    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .tool-grid {
        grid-template-columns: 1fr;
    }
}