/* 基本样式 */
body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    transition: all 0.5s ease;
}

header {
    padding: 20px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

main {
    max-width: 800px;
    width: 100%;
    padding: 20px;
}

.note-section {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.note-section h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.note-input {
    width: 100%;
    padding: 10px;
    border: 2px solid #ffccd5;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 10px;
}

.btn {
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    margin-right: 10px;
}

.btn:hover {
    opacity: 0.8;
}

.delete-btn {
    background-color: #ff6b6b;
    color: white;
}

.delete-btn:hover {
    background-color: #ff4c4c;
}

.edit-btn {
    background-color: #6bafff;
    color: white;
}

.edit-btn:hover {
    background-color: #4c9fff;
}

.notes-display {
    margin-top: 20px;
}

.notes-display li {
    list-style: none;
    background-color: #fff8f8;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.note-category, .note-tags, .note-timestamp {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 5px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.social-links a {
    color: #6a4a3c;
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #ffccd5;
}

footer {
    padding: 10px;
    width: 100%;
    text-align: center;
    margin-top: auto;
    font-size: 0.9rem;
}

/* 可爱浪漫主题 */
body.romantic {
    background-color: #fdf6e4;
    color: #333;
}

body.romantic header {
    background-color: #ffccd5;
}

body.romantic .btn {
    background-color: #ffccd5;
    color: #6a4a3c;
}

body.romantic .social-links a {
    color: #6a4a3c;
}

body.romantic .social-links a:hover {
    color: #ffccd5;
}

/* 机械风主题 */
body.mechanical {
    background-color: #1f1f1f;
    color: #e0e0e0;
}

body.mechanical header {
    background-color: #3a3a3a;
}

body.mechanical .btn {
    background-color: #3a3a3a;
    color: #e0e0e0;
}

body.mechanical .social-links a {
    color: #e0e0e0;
}

body.mechanical .social-links a:hover {
    color: #ffccd5;
}

/* 主题切换效果 */
body.cyber {
    background-color: #0a0a2a;
    color: #fff;
}

body.forest {
    background-color: #e8f5e9;
    color: #1b5e20;
}

/* 天体和星空效果 */
.sky-body {
    position: absolute;
    top: 10%;
    right: 20%;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    animation: move-body 10s infinite alternate ease-in-out;
    z-index: -1;
}

@keyframes move-body {
    0% { transform: translateX(-20px); }
    100% { transform: translateX(20px); }
}

.sun {
    background: radial-gradient(circle, #ffdd85 40%, #ffa726 90%);
    box-shadow: 0 0 30px 10px #ffc107, 0 0 60px 30px rgba(255, 223, 130, 0.6);
}

.moon {
    background: radial-gradient(circle, #fffae3 60%, #e6e6e6 100%);
    box-shadow: 0 0 15px #ffefa0, 0 0 30px #ffc107;
}

/* 机器人样式 */
.robot-mascot {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffebd4, #fff9f2);
    border: 4px solid #ff6b6b;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 3px 3px 10px #d9c7b7, -3px -3px 10px #ffffff;
    transition: transform 0.5s ease;
    cursor: pointer;
    margin: 20px auto;
}

.robot-mascot:hover {
    transform: scale(1.1) rotate(5deg);
}

.robot-mascot:hover .eye {
    animation: blink 0.3s ease;
}

.robot-mascot .face {
    width: 80px;
    height: 80px;
    background: #fff;
    border: 3px solid #ff6b6b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.robot-mascot .eye {
    width: 15px;
    height: 15px;
    background: #333;
    border-radius: 50%;
    position: absolute;
}

.robot-mascot .eye.left {
    left: 20%;
}

.robot-mascot .eye.right {
    right: 20%;
}

.robot-mascot .mouth {
    width: 25px;
    height: 5px;
    background: #333;
    position: absolute;
    bottom: 15px;
    border-radius: 10px;
    transition: 0.3s ease;
}

@keyframes blink {
    50% { height: 3px; }
}

/* 星空背景 */
.star {
    position: absolute;
    background: #ffd700;
    border-radius: 50%;
    animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* 流星效果 */
.shooting-star {
    position: absolute;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0));
    animation: shoot 5s infinite linear;
}

@keyframes shoot {
    0% {
        transform: translate(-200px, -200px) rotate(45deg);
        opacity: 1;
    }
    100% {
        transform: translate(200vw, 200vh) rotate(45deg);
        opacity: 0;
    }
}

/* 主题切换效果 */
body.day {
    background-color: #fdf6e4;
    color: #333;
}

body.night {
    background-color: #0a0a2a;
    color: #fff;
}

/* 发光文字效果 */
body.night h1 {
    color: #ffdd85;
    text-shadow: 2px 2px 10px #ffaa33, -2px -2px 10px #ff6600;
    animation: glow 1.5s infinite;
}

@keyframes glow {
    0%, 100% {
        text-shadow: 2px 2px 10px #ffaa33, -2px -2px 10px #ff6600;
    }
    50% {
        text-shadow: 2px 2px 20px #ffe687, -2px -2px 20px #ffd700;
    }
}

/* 欢迎页面特定样式 */
.welcome-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.menu-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    max-width: 800px;
}

.menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 25px;
    text-decoration: none;
    color: #6a4a3c;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.menu-btn:hover {
    transform: translateY(-5px);
    background: #ffccd5;
}

.btn-icon {
    font-size: 1.3em;
}

/* 悬浮效果 */
.hover-float {
    transition: transform 0.3s ease;
}

.hover-float:hover {
    transform: translateY(-5px);
}

/* 主题按钮样式 */
.theme-option {
    padding: 10px 20px;
    border-radius: 20px;
    border: none;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 动画类 */
.animate__animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

/* 机器人消息样式 */
.robot-message {
    transition: all 0.3s ease;
    pointer-events: none;
    user-select: none;
}

/* 夜间模式下的机器人样式调整 */
body.night .robot-mascot {
    background: linear-gradient(145deg, #2a2a4a, #1a1a3a);
    border-color: #8a8aff;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3), -3px -3px 10px rgba(255, 255, 255, 0.1);
}

body.night .robot-mascot .face {
    background: #1a1a3a;
    border-color: #8a8aff;
}

body.night .robot-mascot .eye {
    background: #fff;
}

body.night .robot-mascot .mouth {
    background: #fff;
}

/* 添加点击特效 */
.robot-mascot:active {
    transform: scale(0.95);
}

.robot-mascot:hover .mouth {
    height: 8px;
    border-radius: 5px 5px 10px 10px;
}

/* ========== 二次元风格增强 ========== */

/* 樱花飘落效果 */
#sakura-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.sakura {
    position: absolute;
    top: -20px;
    animation: sakura-fall linear forwards;
}

@keyframes sakura-fall {
    0% {
        transform: translateY(0) rotate(0deg) translateX(0);
    }
    25% {
        transform: translateY(25vh) rotate(90deg) translateX(20px);
    }
    50% {
        transform: translateY(50vh) rotate(180deg) translateX(-20px);
    }
    75% {
        transform: translateY(75vh) rotate(270deg) translateX(20px);
    }
    100% {
        transform: translateY(110vh) rotate(360deg) translateX(-20px);
    }
}

/* 二次元按钮效果 */
.anime-btn {
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    background: linear-gradient(145deg, #fff9f2, #ffebd4);
    transition: all 0.3s ease;
}

.anime-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.anime-btn:hover::before {
    left: 100%;
}

.anime-btn:hover {
    border-color: #ff6b9d;
    box-shadow: 0 0 20px rgba(255, 107, 157, 0.4);
    transform: translateY(-5px) scale(1.02);
}

/* 卡片展示区域 */
.card-section {
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(255, 107, 157, 0.2);
    border: 2px solid #ffccd5;
    transition: all 0.5s ease;
}

.card-section.hidden {
    display: none;
}

.card-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-section-header h2 {
    font-size: 1.5rem;
    color: #ff6b9d;
    margin: 0;
}

.close-card-btn {
    background: #ff6b9d;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.close-card-btn:hover {
    background: #ff4785;
    transform: rotate(90deg);
}

/* 卡片Swiper样式 */
.card-swiper {
    width: 100%;
    padding: 20px 0;
}

.anime-card {
    background: linear-gradient(145deg, #fff, #fff9f9);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.15);
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #ffd6e0;
    transition: transform 0.3s ease;
}

.anime-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(255, 107, 157, 0.25);
}

.anime-card img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

/* 社交链接二次元风格 */
.social-card {
    background: linear-gradient(145deg, #fff, #fff5f7);
    border: 2px solid #ffd6e0;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.1);
}

.social-card:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: #ff6b9d;
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.2);
}

.social-icon {
    font-size: 1.3em;
}

.social-name {
    color: #6a4a3c;
    font-weight: 500;
}

/* 标题二次元风格 */
.glow-text {
    background: linear-gradient(135deg, #ff6b9d, #ff8fab, #ffc3d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    font-size: 3rem;
    font-weight: bold;
    animation: title-glow 2s ease-in-out infinite alternate;
}

@keyframes title-glow {
    0% {
        filter: drop-shadow(0 0 10px rgba(255, 107, 157, 0.5));
    }
    100% {
        filter: drop-shadow(0 0 20px rgba(255, 107, 157, 0.8));
    }
}

.subtitle {
    color: #ff8fab;
    font-size: 1.2rem;
    margin-top: 10px;
}

/* 夜间模式二次元风格 */
body.night .card-section {
    background: rgba(26, 26, 58, 0.95);
    border-color: #8a8aff;
}

body.night .card-section-header h2 {
    color: #a8a8ff;
}

body.night .close-card-btn {
    background: #8a8aff;
}

body.night .anime-card {
    background: linear-gradient(145deg, #2a2a4a, #1a1a3a);
    border-color: #6a6aaa;
}

body.night .social-card {
    background: linear-gradient(145deg, #2a2a4a, #1a1a3a);
    border-color: #6a6aaa;
}

body.night .social-name {
    color: #e0e0ff;
}

body.night .glow-text {
    background: linear-gradient(135deg, #a8a8ff, #c8c8ff, #e8e8ff);
    -webkit-background-clip: text;
    background-clip: text;
}

body.night .subtitle {
    color: #a8a8ff;
}

body.night .anime-btn {
    background: linear-gradient(145deg, #2a2a4a, #3a3a5a);
    color: #e0e0ff;
}

body.night .anime-btn:hover {
    border-color: #8a8aff;
    box-shadow: 0 0 20px rgba(138, 138, 255, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .menu-buttons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        padding: 0 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .menu-btn {
        flex: 0 0 calc(50% - 4px);
        justify-content: center;
        padding: 10px 12px;
        font-size: 0.85rem;
        min-height: 44px;
    }

    .btn-icon {
        font-size: 1.1rem;
    }

    /* 隐藏B站、抖音、YouTube */
    .social-links a[href*="bilibili"],
    .social-links a[href*="douyin"],
    .social-links a[href*="youtube"] {
        display: none;
    }

    /* Link3按钮样式统一为上面按钮的风格 */
    .social-links {
        justify-content: center;
        gap: 8px;
        padding: 0 16px;
        width: 100%;
        box-sizing: border-box;
        margin-top: 20px;
    }

    .social-card {
        flex: 0 0 calc(50% - 4px);
        justify-content: center;
        padding: 10px 12px;
        font-size: 0.85rem;
        min-height: 44px;
        border-radius: 25px;
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    .social-card .social-name {
        color: #6a4a3c;
        font-weight: normal;
    }

    .social-card .social-icon {
        font-size: 1.1em;
    }

    .glow-text {
        font-size: 1.6rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .card-section {
        margin: 10px 16px;
        width: calc(100% - 32px);
        max-height: 70vh;
        overflow-y: auto;
        box-sizing: border-box;
    }

    .card-swiper {
        padding: 10px 0;
    }

    /* 游戏按钮移动端 - 2列网格 */
    .game-buttons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .game-buttons .menu-btn {
        padding: 10px 6px;
        font-size: 0.75rem;
        min-height: 50px;
        flex-direction: column;
        gap: 3px;
        justify-content: center;
    }

    .game-buttons .btn-icon {
        font-size: 1.2rem;
    }
}

/* 超小屏幕优化 */
@media (max-width: 380px) {
    .menu-btn {
        flex: 1 1 100%;
        min-width: unset;
    }

    .game-buttons {
        grid-template-columns: 1fr;
    }

    .glow-text {
        font-size: 1.5rem;
    }
}
