/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 漫画容器 */
.comic-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.comic-header {
    text-align: center;
    margin-bottom: 40px;
    animation: bounceIn 1s ease-out;
}

.main-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 
        4px 4px 0px #000,
        -1px -1px 0px #000,
        1px -1px 0px #000,
        -1px 1px 0px #000,
        1px 1px 0px #000,
        0px 0px 10px rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
    transform: perspective(500px) rotateX(15deg);
}

.subtitle {
    font-size: 1.2rem;
    color: #ffd700;
    font-weight: 700;
    text-shadow: 2px 2px 0px #000;
}

/* 一周容器 */
.week-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* 日期卡片 */
.day-card {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 4px solid #2d3748;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.day-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.day-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.day-card:hover::before {
    opacity: 1;
    animation: shine 0.5s ease-in-out;
}

.day-card:active {
    transform: translateY(-5px) scale(1.02);
}

/* 日期头部 */
.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #e2e8f0;
}

.day-header h2 {
    font-size: 1.8rem;
    font-weight: 900;
    color: #2d3748;
    text-shadow: 2px 2px 0px #fff;
}

.mood-indicator {
    font-size: 2rem;
    animation: bounce 2s infinite;
}

/* 角色容器 */
.character-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.character-svg {
    width: 150px;
    height: 150px;
    transition: all 0.3s ease;
}

.day-card:hover .character-svg {
    transform: scale(1.1);
}

/* 心情文本 */
.mood-text {
    text-align: center;
}

.mood-text h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
    text-shadow: 1px 1px 0px #fff;
}

.mood-text p {
    font-size: 1rem;
    color: #4a5568;
    font-weight: 600;
    font-style: italic;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 特定日期的颜色主题 */
.day-card[data-day="monday"] {
    border-color: #e53e3e;
    background: linear-gradient(145deg, #fed7d7, #feb2b2);
}

.day-card[data-day="tuesday"] {
    border-color: #dd6b20;
    background: linear-gradient(145deg, #feebc8, #fbd38d);
}

.day-card[data-day="wednesday"] {
    border-color: #805ad5;
    background: linear-gradient(145deg, #e9d8fd, #d6bcfa);
}

.day-card[data-day="thursday"] {
    border-color: #3182ce;
    background: linear-gradient(145deg, #bee3f8, #90cdf4);
}

.day-card[data-day="friday"] {
    border-color: #38a169;
    background: linear-gradient(145deg, #c6f6d5, #9ae6b4);
}

.day-card[data-day="saturday"] {
    border-color: #d69e2e;
    background: linear-gradient(145deg, #faf089, #f6e05e);
}

.day-card[data-day="sunday"] {
    border-color: #9f7aea;
    background: linear-gradient(145deg, #e9d8fd, #d6bcfa);
}

/* 模态框样式 */
.detail-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: linear-gradient(145deg, #ffffff, #f7fafc);
    margin: 5% auto;
    padding: 30px;
    border: 4px solid #2d3748;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease;
    position: relative;
}

.close-btn {
    color: #718096;
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close-btn:hover {
    color: #2d3748;
    transform: scale(1.2);
}

.modal-body {
    text-align: center;
    padding-top: 20px;
}

.modal-body h2 {
    font-size: 2.5rem;
    font-weight: 900;
    color: #2d3748;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0px #fff;
}

#modalCharacter {
    margin: 20px 0;
}

#modalCharacter .character-svg {
    width: 200px;
    height: 200px;
}

#modalDescription {
    font-size: 1.2rem;
    color: #4a5568;
    margin-bottom: 20px;
    font-weight: 600;
}

.mood-tips {
    background: linear-gradient(145deg, #edf2f7, #e2e8f0);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #cbd5e0;
    margin-top: 20px;
}

.mood-tips h4 {
    color: #2d3748;
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.mood-tips p {
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.6;
}

/* 页脚样式 */
.comic-footer {
    text-align: center;
    padding: 30px 20px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    margin-top: 40px;
}

.comic-footer p {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-shadow: 1px 1px 0px #000;
    margin-bottom: 15px;
}

.sound-control button {
    background: linear-gradient(145deg, #4299e1, #3182ce);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.sound-control button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* 动画定义 */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-100px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 角色动画 */
.monday-character {
    animation: shake 0.5s infinite;
}

.tuesday-character {
    animation: tense 1s infinite;
}

.wednesday-character {
    animation: sway 2s infinite;
}

.thursday-character {
    animation: think 1.5s infinite;
}

.friday-character {
    animation: celebrate 0.8s infinite;
}

.saturday-character {
    animation: chill 3s infinite;
}

.sunday-character {
    animation: nervous 1s infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

@keyframes tense {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes sway {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-2deg); }
    75% { transform: rotate(2deg); }
}

@keyframes think {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes celebrate {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.05) rotate(-2deg); }
    75% { transform: scale(1.05) rotate(2deg); }
}

@keyframes chill {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

@keyframes nervous {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-1px); }
    75% { transform: translateX(1px); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .week-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .day-card {
        padding: 20px;
    }
    
    .character-svg {
        width: 120px;
        height: 120px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .modal-body h2 {
        font-size: 2rem;
    }
    
    #modalCharacter .character-svg {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .day-header h2 {
        font-size: 1.5rem;
    }
    
    .mood-indicator {
        font-size: 1.5rem;
    }
    
    .character-svg {
        width: 100px;
        height: 100px;
    }
}