body {
    font-family: 'Microsoft YaHei', '微軟正黑體', sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
    min-height: 100vh;
    text-align: center;
}

h1 {
    text-align: center;
    color: white;
    background: linear-gradient(135deg, #9b4dca, #6b1da5);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

h1::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    to {
        left: 100%;
    }
}

.tools-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.tool-link {
    display: flex;
    align-items: center;
    padding: 25px;
    background-color: white;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    font-size: 16px;
    font-weight: 500;
}

.tool-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #9b4dca, #6b1da5);
    transition: width 0.3s ease;
}

.tool-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
    background-color: #fafafa;
}

.tool-link:hover::before {
    width: 100%;
    opacity: 0.1;
}

.visitor-count {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.9));
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.visitor-count div {
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.visitor-count span {
    color: #9b4dca;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 8px;
    border-radius: 4px;
}

/* 搜尋框樣式改進 */
.search-container {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
    display: flex;
    align-items: center;
}

#search-input {
    padding: 15px 20px;
    width: 100%;
    border: none;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: white;
    outline: none;
}

#search-input:focus {
    box-shadow: 0 4px 20px rgba(155, 77, 202, 0.3);
}

#search-button {
    position: absolute;
    right: 5px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #9b4dca, #6b1da5);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#search-button:hover {
    background: linear-gradient(135deg, #8a3cb9, #5a1895);
    transform: scale(1.05);
}

.no-results {
    grid-column: 1 / -1;
    padding: 30px;
    color: #666;
    font-size: 18px;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 24px;
        padding: 20px;
        margin-bottom: 30px;
    }

    .tools-container {
        gap: 15px;
    }

    .tool-link {
        padding: 20px;
    }

    .search-container {
        margin-bottom: 30px;
    }

    #search-input {
        padding: 12px 15px;
    }

    #search-button {
        padding: 8px 15px;
    }
}