* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    font-size: clamp(0.75rem, 2vw, 1rem);
}

/* ===== 头部样式 ===== */
header {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(0.75rem, 2vw, 1rem) 0;
    min-height: 3.5rem;
}


.logo {
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.join-btn {
    background: linear-gradient(135deg, var(--success-color), #219653);
    color: var(--text-white);
    border: none;
    padding: clamp(0.5rem, 1.5vw, 0.75rem) clamp(0.5rem, 3vw, 0.75rem);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
    font-size: clamp(1.6rem, 2vw, 2em);
    box-shadow: 0 0.125rem 0.5rem rgba(39, 174, 96, 0.3);
    position: relative;
    overflow: hidden;
}

.join-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.join-btn:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.75rem rgba(39, 174, 96, 0.4);
    background: linear-gradient(135deg, #219653, var(--success-color));
}

.join-btn:hover::before {
    left: 100%;
}

.join-btn:active {
    transform: translateY(0);
}

.container {
    width: 100%;
    max-width: 75rem;
    margin: 0 auto;
    padding: 0.5rem 0.9375rem;
}


.filter-buttons {
    gap: clamp(0.5rem, 1.5vw, 0.75rem);
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
    justify-content: center;
}

.filter-btn {
    padding: clamp(0.5rem, 1.5vw, 0.75rem) clamp(1rem, 2.5vw, 1.5rem);
    background: white;
    border: clamp(0.125rem, 0.3vw, 0.25rem) solid #ddd;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: clamp(0.75rem, 1.8vw, 1rem);
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(15rem, 25vw, 20rem), 1fr));
    gap: clamp(1rem, 3vw, 1.5rem);
    border: clamp(0.0625rem, 0.15vw, 0.125rem) solid #000000;
    border-radius: clamp(0.75rem, 2vw, 1rem);
}

.image-card {
    background: white;
    border-radius: clamp(0.75rem, 2vw, 1rem);
    overflow: hidden;
    box-shadow: 0 clamp(0.25rem, 0.6vw, 0.5rem) clamp(0.75rem, 1.8vw, 1.5rem) rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.image-card:hover {
    transform: translateY(clamp(-0.3125rem, -0.8vw, -0.625rem));
    box-shadow: 0 clamp(0.5rem, 1.2vw, 1rem) clamp(1.5625rem, 3.5vw, 2.5rem) rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: clamp(10rem, 20vw, 15rem);
    object-fit: cover;
    display: block;
}

.card-content {
    padding: clamp(0.75rem, 2vw, 1rem);
}

.card-title {
    font-size: clamp(0.9375rem, 2.2vw, 1.25rem);
    margin-bottom: clamp(0.5rem, 1.2vw, 0.75rem);
    color: #2c3e50;
    font-weight: 600;
}

.card-description {
    color: #7f8c8d;
    font-size: clamp(0.75rem, 1.8vw, 1rem);
    margin-bottom: clamp(0.75rem, 1.8vw, 1rem);
    line-height: 1.5;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: clamp(0.6875rem, 1.6vw, 0.875rem);
    color: #95a5a6;
    border-top: clamp(0.0625rem, 0.15vw, 0.125rem) solid #eee;
    padding-top: clamp(0.75rem, 1.8vw, 1rem);
}

.card-category {
    background: #f8f9fa;
    padding: clamp(0.25rem, 0.6vw, 0.5rem) clamp(0.75rem, 1.8vw, 1rem);
    border-radius: clamp(0.9375rem, 2.2vw, 1.25rem);
    font-size: clamp(0.625rem, 1.5vw, 0.8rem);
}

@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(clamp(12.5rem, 22vw, 16rem), 1fr));
        gap: clamp(0.75rem, 2.5vw, 1.25rem);
    }
    
    .filter-buttons {
        gap: clamp(0.375rem, 1.2vw, 0.6rem);
    }
    
    .filter-btn {
        padding: 0.38rem clamp(0.5rem, 2vw, 0.8rem);
        font-size: clamp(1.5rem, 1.6vw, 1.8rem);
    }
}

@media (max-width: 480px) {
    .image-grid {
        grid-template-columns: 1fr;
        gap: clamp(0.625rem, 2vw, 1rem);
    }
    
    .card-content {
        padding: clamp(0.625rem, 1.8vw, 0.875rem);
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #e0e0e0;
    }
    
    .image-card {
        background: #1e1e1e;
        box-shadow: 0 clamp(0.25rem, 0.6vw, 0.5rem) clamp(0.75rem, 1.8vw, 1.5rem) rgba(0, 0, 0, 0.3);
    }
    
    .card-title {
        color: #e0e0e0;
    }
    
    .card-description {
        color: #b0b0b0;
    }
    
    .filter-btn {
        background: #2d2d2d;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .card-category {
        background: #2d2d2d;
    }
}

.modal {
    display: none;
    position: fixed;
    top: 10vh;
    left: 0;
    width: 100%;
    height: 80vh;
    background: #f5f5f5;
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-height: 90%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.modal-close {
    position: absolute;
    top: clamp(1rem, 2.5vw, 2rem);
    right: clamp(1rem, 2.5vw, 2rem);
    color: #000000;
    font-size: clamp(4rem, 3.5vw, 5rem);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.5);
    border: clamp(0.0625rem, 0.15vw, 0.125rem) solid #000000;
    padding: clamp(0.5rem, 1.2vw, 1rem);
    border-radius: 50%;
    width: clamp(2.5rem, 6vw, 4rem);
    height: clamp(2.5rem, 6vw, 4rem);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    transition: background-color 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    padding: clamp(0.5rem, 1.2vw, 1rem);
    border-radius: 50%;
    width: clamp(3rem, 7vw, 4.5rem);
    height: clamp(3rem, 7vw, 4.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: background-color 0.3s, transform 0.3s;
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.modal-nav.prev {
    left: clamp(1rem, 2.5vw, 2rem);
}

.modal-nav.next {
    right: clamp(1rem, 2.5vw, 2rem);
}

.modal-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.modal-nav:disabled:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(-50%);
}

.modal-info {
    position: fixed;
    bottom: clamp(5rem, 2.5vw, 8rem);
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: clamp(0.5rem, 1.2vw, 1rem) clamp(1rem, 2.5vw, 2rem);
    border-radius: clamp(1.25rem, 3vw, 2rem);
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 80%;
    z-index: 1001;
}

.modal-title {
    font-weight: 600;
    margin-bottom: clamp(0.25rem, 0.6vw, 0.5rem);
}

.modal-counter {
    font-size: clamp(1rem, 2vw, 1.2rem);
    opacity: 0.8;
}