* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-image: url('img/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* 固定背景，不随滚动而移动 */
    min-height: 100vh;
    overflow-x: hidden;
}

/* 页眉样式 */
header {
    display: flex;
    align-items: center;
    padding: 15px 30px;
    background-color: rgba(128, 128, 128, 0.7); /* 透明灰色 */
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(5px);
}

.avatar {
    width: 120px;
    height: 120px;
    overflow: hidden;
    border-radius: 50%; /* 圆形头像 */
    border: 4px solid #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
    margin-right: 25px;
    transition: transform 0.3s;
}

.avatar:hover {
    transform: rotate(360deg) scale(1.1);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-title {
    flex: 1;
    text-align: center;
    perspective: 500px;
    overflow: hidden;
}

.ghost-text {
    font-size: 4.5rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 10px #ff0000, 0 0 20px #00ff00, 0 0 30px #0000ff;
    letter-spacing: 2px;
    animation: ghost-text 1s infinite alternate;
    display: inline-block;
    position: relative;
    transform-style: preserve-3d;
}

.ghost-text::before {
    content: "柿子左大人";
    position: absolute;
    left: 0;
    top: 0;
    color: rgba(255, 0, 0, 0.7);
    animation: ghost-text-before 0.5s infinite alternate;
    z-index: -1;
}

.ghost-text::after {
    content: "柿子左大人";
    position: absolute;
    left: 0;
    top: 0;
    color: rgba(0, 0, 255, 0.7);
    animation: ghost-text-after 0.5s infinite alternate;
    z-index: -1;
}

@keyframes ghost-text {
    0% {
        transform: scale(1) rotate(0deg) translateZ(0);
        text-shadow: 0 0 10px #ff0000, 0 0 20px #00ff00, 0 0 30px #0000ff;
        filter: hue-rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(-5deg) translateZ(10px);
        text-shadow: 0 0 15px #00ff00, 0 0 25px #0000ff, 0 0 35px #ff0000;
        filter: hue-rotate(90deg) brightness(1.2);
    }
    50% {
        transform: scale(0.9) rotate(5deg) translateZ(-10px);
        text-shadow: 0 0 15px #0000ff, 0 0 25px #ff0000, 0 0 35px #00ff00;
        letter-spacing: 8px;
        filter: hue-rotate(180deg) contrast(1.5);
    }
    75% {
        transform: scale(1.2) rotate(-3deg) translateZ(15px) skewX(10deg);
        text-shadow: 0 0 15px #ff00ff, 0 0 25px #ffff00, 0 0 35px #00ffff;
        filter: hue-rotate(270deg) saturate(2);
    }
    100% {
        transform: scale(1) rotate(3deg) translateZ(0) skewX(-10deg);
        text-shadow: 0 0 20px #ff0000, 0 0 30px #00ff00, 0 0 40px #0000ff;
        letter-spacing: -2px;
        filter: hue-rotate(360deg) blur(1px);
    }
}

@keyframes ghost-text-before {
    0% {
        transform: translateX(-5px) translateY(-5px);
        opacity: 0.7;
    }
    100% {
        transform: translateX(5px) translateY(5px);
        opacity: 0.3;
    }
}

@keyframes ghost-text-after {
    0% {
        transform: translateX(5px) translateY(5px);
        opacity: 0.7;
    }
    100% {
        transform: translateX(-5px) translateY(-5px);
        opacity: 0.3;
    }
}

.spacer {
    width: 120px; /* 与头像宽度相同，保持平衡 */
}

/* 主内容区域 */
main {
    padding: 30px;
}

/* 图片网格 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 一行四个图片 */
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.image-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s;
    background-color: rgba(255, 255, 255, 0.1);
    aspect-ratio: 1 / 1; /* 保持正方形 */
}

.image-container:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    filter: brightness(1.2);
}

.image-container.active {
    animation: pulse 0.5s infinite alternate;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.7);
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease-in-out;
}

.image-container:hover img {
    transform: rotate(360deg) scale(1.1);
    transition: transform 0.8s ease-in-out;
}

/* 鬼畜风格动画 */
@keyframes pulse {
    0% {
        transform: scale(1) rotate(0deg);
        filter: hue-rotate(0deg);
    }
    100% {
        transform: scale(1.05) rotate(3deg);
        filter: hue-rotate(90deg);
    }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .image-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .ghost-text {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    header {
        padding: 10px;
    }
    
    .avatar {
        width: 90px;
        height: 90px;
    }
    
    .spacer {
        width: 90px;
    }
    
    .ghost-text {
        font-size: 3.5rem;
    }
}

@media (max-width: 480px) {
    .image-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .avatar {
        width: 70px;
        height: 70px;
    }
    
    .spacer {
        width: 70px;
    }
    
    .ghost-text {
        font-size: 2.8rem;
    }
} 