/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #ffd460;
    background-color: #121212;
}

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

/* 导航栏 */
.navbar {
    background-color: #000000;
    color: #ffd460;
    padding: 20px 0;
    box-shadow: 0 2px 4px rgba(255,212,96,0.1);
}

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

.logo {
    font-size: 2rem;
    font-weight: bold;
}

.search-box {
    display: flex;
    align-items: center;
}

#search-input {
    padding: 10px;
    border: none;
    border-radius: 4px 0 0 4px;
    width: 300px;
    font-size: 1rem;
}

#search-btn {
    padding: 10px 20px;
    background-color: #ffd460;
    color: #000000;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 1rem;
}

#search-btn:hover {
    background-color: #e6c055;
}

/* 照片轮播 */
.carousel {
    position: relative;
    margin: 30px 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.carousel-container {
    position: relative;
    height: 300px;
}

.carousel-slide {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255,255,255,0.8);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background-color: white;
    transform: translateY(-50%) scale(1.1);
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

/* 主容器布局 */
.main-container {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* 左侧分类栏 */
.sidebar {
    width: 250px;
    flex-shrink: 0;
}

.sidebar h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #2d4059;
}

.category-tree {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-item {
    margin-bottom: 10px;
}

.category-title {
    font-weight: bold;
    padding: 10px;
    background-color: #000000;
    color: #ffd460;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-title:hover {
    background-color: #222222;
}

.subcategories {
    margin-left: 20px;
    margin-top: 10px;
    display: none;
}

.subcategories.show {
    display: block;
}

.subcategory-item {
    padding: 8px 0;
    cursor: pointer;
    border-bottom: 1px solid #333333;
    color: #ffd460;
}

.subcategory-item:hover {
    color: #ffffff;
}

/* 右侧主内容 */
.content {
    flex: 1;
    min-width: 0;
}

/* 工具展示 */
.tools {
    margin: 0;
}

.tools h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #3090a1;
}

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

.tool-card {
    background-color: #222222;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(255,212,96,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255,212,96,0.2);
}

.tool-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #ffd460;
.tool-description {
    margin-bottom: 15px;
    color: #cccccc;
    flex: 1;
}

.tool-category {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 15px;
}

.tool-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: #ffffff;
    color: #000000;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.tool-link:hover {
    background-color: #e6e6e6;
}

/* 页脚 */
.footer {
    background-color: #000000;
    color: #ffd460;
    padding: 20px 0;
    margin-top: 40px;
}

.footer .container {
    text-align: center;
}

.footer-links {
    margin-top: 15px;
}

.footer-links a {
    color: #ffd460;
    text-decoration: none;
    margin: 0 10px;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-links span {
    color: #666;
    margin: 0 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }

    .search-box {
        width: 100%;
        justify-content: center;
    }

    #search-input {
        width: 100%;
        max-width: 300px;
    }

    .carousel-container {
        height: 300px;
    }

    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        margin-bottom: 30px;
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .carousel-container {
        height: 200px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .sidebar h2,
    .tools h2 {
        font-size: 1.2rem;
    }

    .tool-grid {
        gap: 15px;
    }

    .tool-card {
        padding: 15px;
    }
}