/* 全局样式 */
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #5f27cd;
    --accent-color: #48dbfb;
    --background-color: #f9f9f9;
    --card-color: #ffffff;
    --text-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito', 'Helvetica', sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* 背景动画 */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(120deg, #e0f7fa 0%, #f3e5f5 100%);
    opacity: 0.7;
}

.background-animation::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%239C92AC' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
}

/* 头部样式 */
header {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(95, 39, 205, 0.1) 100%);
    border-bottom: 3px solid rgba(255, 107, 107, 0.3);
    position: relative;
    overflow: hidden;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.maple-leaf {
    position: relative;
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

.leaf-body {
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: var(--primary-color);
    border-radius: 0 50% 50% 50%;
    transform: rotate(45deg);
    top: 0;
    left: 5px;
}

.leaf-stem {
    position: absolute;
    width: 5px;
    height: 15px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 17.5px;
}

header h1 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    text-shadow: 2px 2px 4px var(--shadow-color);
    font-weight: 800;
    letter-spacing: 1px;
}

.slogan {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-top: 0.5rem;
    font-style: italic;
}

/* 主要内容区域 */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 搜索框 */
.search-container {
    display: flex;
    margin: 2rem auto;
    max-width: 600px;
    box-shadow: 0 4px 15px var(--shadow-color);
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

#search-input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    font-size: 1rem;
    outline: none;
    background-color: var(--card-color);
}

#search-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 25px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#search-button:hover {
    background-color: #ff5252;
}

/* 工具区域 */
.tools-container {
    margin-top: 3rem;
}

.tools-container h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--secondary-color);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.sparkle {
    position: absolute;
    top: -5px;
    right: -20px;
    width: 15px;
    height: 15px;
    background-color: var(--accent-color);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: twinkle 1.5s infinite alternate;
}

@keyframes twinkle {
    0% {
        opacity: 0.5;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 2rem;
}

.tool-card {
    background-color: var(--card-color);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* 修改后的工具图标样式 */
.tool-icon {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* 修改后的工具图片样式 */
.tool-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-img {
    transform: scale(1.1);
}

/* 保留原有的图标样式（用于非图片图标） */
.tool-icon i {
    font-size: 2.5rem;
    color: var(--secondary-color);
}

.tool-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.tool-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.tool-tag {
    background-color: rgba(95, 39, 205, 0.1);
    color: var(--secondary-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* 页脚 */
footer {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(95, 39, 205, 0.1) 100%);
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
    border-top: 3px solid rgba(255, 107, 107, 0.3);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.social-links {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.social-icon {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin: 0 10px;
    transition: transform 0.3s;
}

.social-icon:hover {
    transform: scale(1.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .search-container {
        flex-direction: column;
        border-radius: 15px;
    }
    
    #search-input {
        width: 100%;
        border-radius: 15px 15px 0 0;
    }
    
    #search-button {
        width: 100%;
        padding: 10px;
        border-radius: 0 0 15px 15px;
    }
    
    /* 响应式调整图标尺寸 */
    .tool-icon {
        width: 80px;
        height: 80px;
    }
}

/* 动画效果 */
@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

.tool-card:nth-child(odd) {
    animation: float 5s ease-in-out infinite;
}

.tool-card:nth-child(even) {
    animation: float 6s ease-in-out infinite;
    animation-delay: 1s;
}

/* 主站链接样式 */
.main-site {
    margin-top: 15px;
}

.main-site a {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

.main-site a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(95, 39, 205, 0.4);
}

/* 支持与联系部分 */
.support-section {
    padding: 3rem 1rem;
    background: linear-gradient(135deg, rgba(95, 39, 205, 0.05) 0%, rgba(255, 107, 107, 0.05) 100%);
    margin-top: 3rem;
}

.support-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.support-container h2 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.support-container h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

.support-options {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.support-card {
    width: 280px;
    height: 350px;
    perspective: 1000px;
    cursor: pointer;
}

.support-card .card-front,
.support-card .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

.support-card .card-front {
    background-color: white;
    transform: rotateY(0deg);
    z-index: 2;
}

.support-card .card-back {
    background-color: white;
    transform: rotateY(180deg);
}

.support-card:hover .card-front {
    transform: rotateY(180deg);
}

.support-card:hover .card-back {
    transform: rotateY(0deg);
}

.support-card i {
    font-size: 3rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.support-card.donate i {
    color: var(--primary-color);
}

.support-card.contact i {
    color: var(--secondary-color);
}

.support-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.support-card p {
    color: #666;
    font-size: 1rem;
}

.qr-code {
    width: 180px;
    height: 180px;
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    cursor: pointer;
}

.qr-code img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.qr-code:hover img {
    filter: brightness(0.8);
}

.view-full {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
}

.view-full i {
    font-size: 2rem;
    margin-bottom: 5px;
    color: white;
}

.view-full span {
    font-size: 0.9rem;
    font-weight: 600;
}

.qr-code:hover .view-full {
    opacity: 1;
}

.card-back p {
    font-weight: 600;
    color: var(--secondary-color);
}

/* 图片查看器模态框 */
.image-viewer-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
    transition: opacity 0.3s ease;
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 80%;
    max-width: 700px;
    text-align: center;
    top: 50%;
    transform: translateY(-50%);
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 10px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--primary-color);
}

#fullSizeImage {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border: 5px solid white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

#imageCaption {
    color: white;
    font-size: 1.2rem;
    margin-top: 15px;
    font-weight: 600;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .support-options {
        flex-direction: column;
        align-items: center;
    }
    
    .support-card {
        width: 250px;
        height: 320px;
        margin-bottom: 20px;
    }
    
    .qr-code {
        width: 150px;
        height: 150px;
    }
    
    .modal-content {
        width: 95%;
        padding: 10px;
    }
}

/* 添加一些悬停效果 */
.support-card:hover {
    transform: translateY(-5px);
}

.support-card .card-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px 20px 0 0;
}

.support-card.donate .card-front::before {
    background: linear-gradient(90deg, var(--primary-color), #ff9a9e);
}

.support-card.contact .card-front::before {
    background: linear-gradient(90deg, var(--secondary-color), #a29bfe);
}

/* 模态框动画 */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-60%);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(-50%);
    }
}

.modal-content {
    animation: zoomIn 0.3s ease forwards;
}

