/* 复古风格 CSS */
:root {
    --primary-color: #3a86ff;
    --secondary-color: #8ecae6;
    --accent-color: #ffbe0b;
    --bg-color: #e0e0e0;
    --card-bg: #f8f9fa;
    --text-color: #333333;
    --border-color: #3a86ff;
    --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    --grid-spacing: 20px;
    --card-radius: 8px;
    --retro-font: 'VT323', 'Press Start 2P', monospace;
}

@font-face {
    font-family: 'PixelFont';
    src: url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
    font-weight: normal;
    font-style: normal;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--retro-font);
    background-color: var(--bg-color);
    background-image: 
        url("data:image/svg+xml,%3Csvg width='52' height='26' viewBox='0 0 52 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233a86ff' fill-opacity='0.2'%3E%3Cpath d='M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4v2c-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6zm25.464-1.95l8.486 8.486-1.414 1.414-8.486-8.486 1.414-1.414z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(135deg, var(--bg-color) 0%, #f5f5f5 100%);
    color: var(--text-color);
    min-height: 100vh;
    padding: 2rem;
    line-height: 1.6;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%233a86ff' d='M13.64,21.97C13.14,22.21 12.54,22 12.31,21.5L10.13,16.76L7.62,18.78C7.45,18.92 7.24,19 7,19A1,1 0 0,1 6,18V3A1,1 0 0,1 7,2C7.24,2 7.47,2.09 7.64,2.23L7.65,2.22L19.14,11.86C19.57,12.22 19.62,12.85 19.27,13.27C19.12,13.45 18.91,13.57 18.7,13.61L15.54,14.23L17.74,18.96C18,19.46 17.76,20.05 17.26,20.28L13.64,21.97Z'/%3E%3C/svg%3E"), auto;
}

/* 主题切换 */
.theme-transition {
    transition: background-color 0.5s, color 0.5s, box-shadow 0.5s;
}

.theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.theme-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--retro-font);
    font-size: 0.8rem;
    transition: all 0.3s;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

.theme-btn:hover {
    transform: translateY(-2px);
    box-shadow: 3px 3px 0 rgba(0,0,0,0.4);
}

.theme-btn.active {
    background-color: var(--accent-color);
    color: var(--text-color);
}

/* 点击效果 */
.click-effect {
    position: absolute;
    border: 2px solid var(--accent-color);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    opacity: 1;
    pointer-events: none;
    animation: click-ripple 0.6s ease-out;
}

@keyframes click-ripple {
    0% {
        width: 5px;
        height: 5px;
        opacity: 1;
    }
    100% {
        width: 50px;
        height: 50px;
        opacity: 0;
        transform: translate(-50%, -50%);
    }
}

.container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--grid-spacing);
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 装饰元素 */
.decorative-star {
    position: fixed;
    width: 30px;
    height: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffbe0b' d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 2;
    animation: float 3s infinite alternate ease-in-out;
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-10px) rotate(10deg); }
}

/* 卡片基本样式 */
.card {
    background-color: var(--card-bg);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    overflow: visible;
    transition: box-shadow 0.3s ease;
    user-select: none;
    width: 280px;
    min-height: 200px;
    border: 3px solid var(--border-color);
    filter: drop-shadow(3px 3px 0px rgba(0, 0, 0, 0.3));
}

.card::before {
    content: "";
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffbe0b' d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    z-index: 2;
    pointer-events: none;
    transform: rotate(15deg);
    opacity: 0.8;
}

.card.profile-card::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24'%3E%3Cpath fill='%233a86ff' d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
}

.card.poetry-card::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24'%3E%3Cpath fill='%238ecae6' d='M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4z'/%3E%3C/svg%3E");
}

.card.message-card::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffbe0b' d='M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z'/%3E%3C/svg%3E");
}

.card.game-card::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24'%3E%3Cpath fill='%23fb5607' d='M21,6H3C1.9,6 1,6.9 1,8v8c0,1.1 0.9,2 2,2h18c1.1,0 2-0.9 2-2V8C23,6.9 22.1,6 21,6zM11,13H8v3H6v-3H3v-2h3V8h2v3h3V13zM15.5,15c-0.83,0 -1.5,-0.67 -1.5,-1.5s0.67,-1.5 1.5,-1.5s1.5,0.67 1.5,1.5S16.33,15 15.5,15zM19.5,12c-0.83,0 -1.5,-0.67 -1.5,-1.5S18.67,9 19.5,9s1.5,0.67 1.5,1.5S20.33,12 19.5,12z'/%3E%3C/svg%3E");
}

.card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 8px 8px 15px rgba(0, 0, 0, 0.3);
}

.card::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 50%);
    border-radius: calc(var(--card-radius) - 3px);
    pointer-events: none;
}

.card-header {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 10px 15px;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    border-bottom: 2px dashed #fff;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.card-content {
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
    border-radius: 0 0 var(--card-radius) var(--card-radius);
}

/* 游戏卡片样式 */
.game-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.game-area {
    border: 3px solid var(--primary-color);
    background-color: black;
}

.game-controls {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

.game-score {
    font-weight: bold;
    color: var(--primary-color);
}

/* Y2K特效和动画 */
.sparkle {
    position: absolute;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffbe0b' d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 3;
    animation: sparkle 2s infinite;
}

/* 鼠标跟踪闪光效果 */
.cursor-sparkle {
    position: fixed;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: rgba(58, 134, 255, 0.7);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: overlay;
    transform: translate(-50%, -50%);
    filter: blur(3px);
    animation: cursor-fade 1s forwards;
}

@keyframes cursor-fade {
    0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

/* Y2K装饰元素 */
.y2k-sparkle {
    position: fixed;
    width: 30px;
    height: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 24 24'%3E%3Cpath fill='%233a86ff' d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 1;
    opacity: 0.7;
    animation: sparkle 3s infinite, float 5s infinite, rotate 10s linear infinite;
}

/* Win98风格元素 */
.win98-button {
    background-color: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    color: #000000;
    padding: 4px 10px;
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.3);
}

.win98-button:active {
    border-color: #808080 #ffffff #ffffff #808080;
}

/* 动画和特效 */
@keyframes sparkle {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 贴纸拖动样式 */
.sticker-dragging {
    cursor: grabbing !important;
    z-index: 9999 !important;
}

/* 自定义通知样式 */
.cute-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(58, 134, 255, 0.6);
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 1000;
    animation: bounce 1s ease;
    border: 2px solid var(--primary-color);
}

/* 弹窗样式 */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.popup-container {
    background-color: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(255, 158, 210, 0.8);
    max-width: 90%;
    width: 350px;
    text-align: center;
    position: relative;
    border: 3px solid var(--primary-color);
    background: linear-gradient(135deg, #fff8fa 0%, #ffeaf8 100%);
    animation: popup-appear 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popup-appear {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 音乐播放器增强样式 */
.now-playing {
    position: relative;
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px;
    background-color: rgba(255, 158, 210, 0.2);
    animation: pulse 2s infinite alternate;
}

@keyframes pulse {
    0% { background-color: rgba(255, 158, 210, 0.2); }
    100% { background-color: rgba(255, 158, 210, 0.5); }
}

/* 辅助功能增强 */
.link-item:focus, .retro-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 158, 210, 0.5);
}

/* 响应式调整补充 */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .title-text {
        font-size: 20px;
    }
    
    .card-header {
        font-size: 0.8rem;
    }
}

@keyframes bounce {
    0% { transform: translateX(-50%) translateY(20px); opacity: 0; }
    50% { transform: translateX(-50%) translateY(-10px); }
    70% { transform: translateX(-50%) translateY(5px); }
    100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* 音乐播放器样式 */
.music-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding: 10px;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.7);
}

.music-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.music-controls button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0 5px;
}

.music-controls button:hover {
    background-color: var(--accent-color);
    transform: scale(1.1);
}

.music-info {
    text-align: center;
    font-size: 0.9rem;
}

/* 古诗词卡片 */
.poetry-content {
    font-size: 1rem;
    line-height: 1.8;
    letter-spacing: 1px;
    padding: 10px;
    border-left: 3px solid var(--accent-color);
    background-color: rgba(255, 255, 255, 0.7);
    margin: 10px 0;
}

.poetry-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.poetry-author {
    font-style: italic;
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

/* 留言卡片 */
.message-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.message-form input,
.message-form textarea {
    padding: 8px 12px;
    border: 2px solid var(--secondary-color);
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.7);
    font-family: var(--retro-font);
    transition: all 0.3s;
}

.message-form input:focus,
.message-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 5px rgba(58, 134, 255, 0.5);
}

.message-form button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--retro-font);
    transition: all 0.3s;
}

.message-form button:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.messages {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 15px;
    padding: 5px;
    border: 1px solid var(--secondary-color);
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.5);
}

.message-item {
    padding: 8px;
    margin-bottom: 8px;
    border-bottom: 1px dotted var(--secondary-color);
}

.message-name {
    font-weight: bold;
    color: var(--primary-color);
}

.message-date {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-left: 5px;
}

.message-text {
    margin-top: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 1rem; /* 手机端页面边距 */
        cursor: default; 
    }
    
    .container {
        padding: 1rem 0.5rem; /* 容器在手机上的内边距 */
        flex-direction: column; /* 强制卡片垂直排列 */
        align-items: center; /* 让卡片居中 */
        gap: 20px; /* 垂直间距 */
    }
    
    .card {
        width: 90%; /* 卡片宽度占满大部分屏幕 */
        min-width: unset; /* 取消最小宽度限制 */
        margin-bottom: 0; /* 靠 gap 控制间距 */
        /* cursor: grab; // 拖拽已移除，无需光标 */
    }

    /* 隐藏手机上的贴纸 */
    .sticker {
        display: none;
    }

    /* 隐藏电脑版的Y2K闪烁装饰 */
    .y2k-sparkle {
        display: none;
    }
    
    .theme-switcher {
        flex-direction: row; /* 手机上也许横向更好？或者保持 column */
        gap: 5px;
        right: 10px;
        top: 10px;
        background-color: rgba(255, 255, 255, 0.7); /* 加个背景，免得看不清 */
        padding: 5px;
        border-radius: 5px;
        display: none; /* 在手机端隐藏主题切换器 */
    }
    
    .theme-btn {
        padding: 3px 6px;
        font-size: 0.7rem;
    }

    /* 调整侧边栏在手机上的样式 */
    .sidebar {
        width: 85%; /* 侧边栏宽度增加 */
        left: -90%; /* 调整初始隐藏位置 */
        box-shadow: 2px 0px 10px rgba(0, 0, 0, 0.15);
    }

    .sidebar.active {
        left: 0;
    }

    .close-sidebar-btn {
        font-size: 20px;
        top: 8px;
        right: 8px;
    }

    /* 调整页脚 */
    .footer {
        width: calc(100% - 2rem); /* 调整宽度以适应 body padding */
        margin-top: 2rem;
        padding: 0.8rem;
        font-size: 0.8rem;
    }

    .footer .vintage-counter {
        font-size: 0.8rem;
    }

}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* 页面加载动画 */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-in {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes scale-in {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.page-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
    font-size: 2rem;
    position: relative;
    padding-bottom: 10px;
    animation: fade-in 1s ease-out;
}

.page-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color), var(--accent-color));
    border-radius: 3px;
    animation: slide-in 1.5s ease-out;
}

.page-subtitle {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 3rem;
    font-size: 1rem;
    animation: fade-in 1.5s ease-out;
}

/* 贴纸样式 */
.sticker {
    position: absolute;
    width: 60px;
    height: 60px;
    cursor: move;
    z-index: 10;
    transition: transform 0.3s;
    filter: drop-shadow(3px 3px 3px rgba(0,0,0,0.3));
    user-select: none;
}

.sticker:hover {
    transform: scale(1.2) rotate(10deg);
    z-index: 100;
}

.sticker1 {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 24 24'%3E%3Cpath fill='%233a86ff' d='M12,17.5C14.33,17.5 16.3,16.04 17.11,14H6.89C7.7,16.04 9.67,17.5 12,17.5M8.5,11A1.5,1.5 0 0,0 10,9.5A1.5,1.5 0 0,0 8.5,8A1.5,1.5 0 0,0 7,9.5A1.5,1.5 0 0,0 8.5,11M15.5,11A1.5,1.5 0 0,0 17,9.5A1.5,1.5 0 0,0 15.5,8A1.5,1.5 0 0,0 14,9.5A1.5,1.5 0 0,0 15.5,11M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z'/%3E%3C/svg%3E");
}

.sticker2 {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffbe0b' d='M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M7,9.5C7,8.7 7.7,8 8.5,8C9.3,8 10,8.7 10,9.5C10,10.3 9.3,11 8.5,11C7.7,11 7,10.3 7,9.5M12,17.23C10.25,17.23 8.71,16.5 7.81,15.42L9.23,14C9.68,14.72 10.75,15.23 12,15.23C13.25,15.23 14.32,14.72 14.77,14L16.19,15.42C15.29,16.5 13.75,17.23 12,17.23M15.5,11C14.7,11 14,10.3 14,9.5C14,8.7 14.7,8 15.5,8C16.3,8 17,8.7 17,9.5C17,10.3 16.3,11 15.5,11Z'/%3E%3C/svg%3E");
}

.sticker3 {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 24 24'%3E%3Cpath fill='%238ecae6' d='M21.5,10.8L13.2,2.5C12.5,1.8 11.5,1.8 10.8,2.5L2.5,10.8C1.8,11.5 1.8,12.5 2.5,13.2L10.8,21.5C11.5,22.2 12.5,22.2 13.2,21.5L21.5,13.2C22.1,12.5 22.1,11.5 21.5,10.8M12,20.8L3.3,12L12,3.2L20.8,12L12,20.8Z'/%3E%3C/svg%3E");
}

.sticker4 {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 24 24'%3E%3Cpath fill='%23ff006e' d='M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z'/%3E%3C/svg%3E");
}

/* 贴纸旋转动画 */
.sticker1 {
    transform: rotate(10deg);
}

.sticker2 {
    transform: rotate(-5deg);
}

.sticker3 {
    transform: rotate(15deg);
}

.sticker4 {
    transform: rotate(-10deg);
}

/* 配色方案按主题更改的响应式类 */
.retro-theme {
    --primary-color: #3a86ff;
    --secondary-color: #8ecae6;
    --accent-color: #ffbe0b;
    --bg-color: #e0e0e0;
    --card-bg: #f8f9fa;
    --text-color: #333333;
    --border-color: #3a86ff;
}

.matrix-theme {
    --primary-color: #00ff41;
    --secondary-color: #008f11;
    --accent-color: #0d0208;
    --bg-color: #0d0208;
    --card-bg: #000000;
    --text-color: #00ff41;
    --border-color: #00ff41;
}

.win98-theme {
    --primary-color: #000080;
    --secondary-color: #008080;
    --accent-color: #c0c0c0;
    --bg-color: #c0c0c0;
    --card-bg: #ece9d8;
    --text-color: #000000;
    --border-color: #868a8e;
}

.vapor-theme {
    --primary-color: #ff00ff;
    --secondary-color: #00ffff;
    --accent-color: #ff71ce;
    --bg-color: #001eff;
    --card-bg: #0e0b16;
    --text-color: #ffffff;
    --border-color: #ff00ff;
}

/* 留言侧边栏样式 */
.sidebar {
    position: fixed;
    left: -350px; /* 初始状态隐藏在左侧 */
    top: 0;
    width: 320px; /* 侧边栏宽度 */
    height: 100%;
    background-color: var(--card-bg); /* 使用卡片背景色 */
    border-right: 3px solid var(--primary-color);
    box-shadow: 5px 0px 15px rgba(0, 0, 0, 0.2);
    padding: 20px;
    padding-top: 50px; /* 为关闭按钮留出空间 */
    z-index: 1100; /* 比卡片层级高 */
    overflow-y: auto; /* 内容过多时可滚动 */
    transition: left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* 滑动动画 */
}

.sidebar.active {
    left: 0; /* 激活状态滑入屏幕 */
}

.sidebar h3 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.close-sidebar-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-color);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.close-sidebar-btn:hover {
    opacity: 1;
}

.messages-content {
    /* 保持 messages 的样式 */
    max-height: calc(100% - 80px); /* 限制高度以便滚动 */
    overflow-y: auto;
    border: 1px solid var(--secondary-color);
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.5);
    padding: 10px;
}

/* 调整留言板按钮布局 */
.message-buttons {
    display: flex;
    justify-content: space-between; /* 让两个按钮分开 */
    margin-top: 10px;
}

.message-buttons button {
    flex-basis: 48%; /* 让按钮大致平分空间 */
    /* 继承或复用 .win98-button 或其他按钮样式 */
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--retro-font);
    transition: all 0.3s;
}

#toggle-sidebar-btn {
    background-color: var(--secondary-color);
}

.message-buttons button:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

/* 页脚样式 */
.footer {
    width: 90%; /* 页脚宽度 */
    max-width: 800px; /* 最大宽度 */
    margin: 3rem auto 1rem auto; /* 上下外边距，左右自动居中 */
    padding: 1rem;
    text-align: center;
    color: var(--text-color);
    background-color: rgba(0, 0, 0, 0.05); /* 非常浅的背景色 */
    border-top: 2px dashed var(--secondary-color); /* 顶部虚线边框 */
    border-radius: 5px;
    opacity: 0.8; /* 轻微透明 */
    font-size: 0.9rem;
    order: 99; /* 确保在flex布局中排在最后 */
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer .vintage-counter {
    display: inline-flex; /* 改为 inline-flex 使其与文本对齐 */
    align-items: center;
    gap: 5px;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 2px 8px;
    border-radius: 3px;
}

.footer .counter-digits {
    font-weight: bold;
    letter-spacing: 1px;
}

/* 文本抖动动画 */
@keyframes text-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

.text-shaking {
    animation: text-shake 0.3s ease-in-out;
}