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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: rgba(255, 255, 255, 0.95);
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* 移动端适配 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
}

/* 小精灵样式 */
.sprite-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    pointer-events: none;
}

@media (max-width: 768px) {
    .sprite-container {
        bottom: 10px;
        right: 10px;
        transform: scale(0.8);
    }
}

.sprite-character {
    position: relative;
    animation: float 3s ease-in-out infinite;
}

#model-container {
    width: 200px !important;
    height: 200px !important;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
    pointer-events: auto;
}

#model-container canvas {
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
}

#sprite-image:hover {
    transform: scale(1.1);
}

.sprite-speech {
    position: fixed;
    top: 50%;
    right: 240px;
    transform: translateY(-50%) translateX(20px) scale(0.8);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    color: white;
    padding: 18px 24px;
    border-radius: 20px;
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4), 0 0 20px rgba(255, 255, 255, 0.1) inset;
    max-width: 280px;
    font-size: 15px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
    z-index: 1000;
    text-align: left;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    line-height: 1.6;
    letter-spacing: 0.5px;
}

.sprite-speech.show {
    opacity: 1;
    transform: translateY(-50%) translateX(0) scale(1);
}

.sprite-speech::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -12px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 12px solid rgba(102, 126, 234, 0.95);
    filter: drop-shadow(2px 0 4px rgba(0, 0, 0, 0.1));
}

@media (max-width: 768px) {
    .sprite-speech {
        position: fixed;
        top: 20px;
        left: 10px;
        right: 10px;
        transform: translateY(-10px) scale(0.9);
        max-width: none;
        font-size: 13px;
        padding: 12px 16px;
        text-align: center;
    }
    
    .sprite-speech.show {
        transform: translateY(0) scale(1);
    }
    
    .sprite-speech::after {
        display: none;
    }
}

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

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    padding: 30px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    margin-top: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    animation: fadeIn 0.5s ease-in-out;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin-top: 80px;
        border-radius: 15px;
        max-width: 95%;
    }
}

/* 标签页样式 */
.tab-container {
    display: flex;
    margin-bottom: 25px;
    border-radius: 12px;
    background: #f7fafc;
    padding: 5px;
    gap: 5px;
}

.tab-btn {
    flex: 1;
    padding: 12px 15px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #718096;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn.active {
    background: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.tab-btn:hover:not(.active) {
    background: #e2e8f0;
    color: #4a5568;
}

@media (max-width: 768px) {
    .tab-container {
        margin-bottom: 20px;
        padding: 3px;
    }
    
    .tab-btn {
        padding: 10px 8px;
        font-size: 14px;
        gap: 6px;
    }
    
    .tab-btn i {
        font-size: 16px;
    }
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

header {
    text-align: center;
    margin-bottom: 30px;
    background: none;
    color: inherit;
    padding: 0;
}

header h1 {
    color: #4a5568;
    font-size: 2.2em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
}

header h1 i {
    color: #667eea;
}

.subtitle {
    color: #718096;
    font-size: 1.1em;
    margin: 0;
}

.todo-form {
    display: flex;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

#todo-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

#todo-input:focus {
    border-color: #5e72e4;
}

#add-button {
    background-color: #5e72e4;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
        gap: 8px;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .todo-form {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    #todo-input {
        border-radius: 8px;
        font-size: 16px;
        padding: 12px 15px;
    }
    
    #add-button {
        border-radius: 8px;
        padding: 12px 20px;
        font-size: 16px;
    }
}

#add-button:hover {
    background-color: #4a5bd1;
}

.filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

.filter-btn {
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 3px;
    transition: all 0.3s;
}

.filter-btn:hover {
    color: #5e72e4;
}

.filter-btn.active {
    color: #5e72e4;
    font-weight: 600;
}

#clear-completed {
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.3s;
}

#clear-completed:hover {
    color: #e45e5e;
}

#todo-list {
    list-style-type: none;
    max-height: 400px;
    overflow-y: auto;
}

.todo-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    animation: slideIn 0.3s ease-in-out;
    transition: background-color 0.3s;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.todo-item:hover {
    background-color: #f9f9f9;
}

.todo-item.completed {
    background-color: #f8f9fa;
}

.todo-checkbox {
    margin-right: 15px;
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.todo-checkbox:checked {
    background-color: #5e72e4;
    border-color: #5e72e4;
}

.todo-checkbox:checked::after {
    content: '\2713';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.todo-text {
    flex: 1;
    font-size: 16px;
    transition: color 0.3s, text-decoration 0.3s;
}

.completed .todo-text {
    color: #999;
    text-decoration: line-through;
}

.delete-btn {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.3s;
    padding: 5px;
}

.delete-btn:hover {
    color: #e45e5e;
}

.todo-stats {
    padding: 15px 20px;
    color: #777;
    font-size: 14px;
    text-align: center;
    border-top: 1px solid #eee;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .filter-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-buttons {
        margin-bottom: 10px;
    }
    
    #todo-input, #add-button {
        font-size: 14px;
        padding: 10px;
    }
    
    header h1 {
        font-size: 24px;
    }
}

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

#todo-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#todo-list::-webkit-scrollbar-thumb {
    background: #c3cfe2;
    border-radius: 4px;
}

#todo-list::-webkit-scrollbar-thumb:hover {
    background: #a5b4d9;
}

/* 空列表提示 */
.empty-list {
    text-align: center;
    padding: 30px 20px;
    color: #999;
    font-style: italic;
}

/* 编辑模式 */
.edit-mode .todo-text {
    display: none;
}

.todo-edit-input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    outline: none;
    display: none;
}

.edit-mode .todo-edit-input {
    display: block;
}

/* 拖拽样式 */
.dragging {
    opacity: 0.5;
    background-color: #f0f4ff;
}

/* 动画效果 */
.todo-item.removing {
    animation: slideOut 0.3s ease-in-out forwards;
}

@keyframes slideOut {
    to { opacity: 0; transform: translateX(20px); }
}

/* 名言警句样式 */
.quotes-container {
    text-align: center;
    padding: 20px;
}

.quote-display {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.3);
}

#quote-text {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 15px;
    font-style: italic;
}

#quote-author {
    font-weight: 600;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .quotes-container {
        padding: 15px;
    }
    
    .quote-display {
        padding: 20px;
        min-height: 120px;
        border-radius: 12px;
    }
    
    #quote-text {
        font-size: 1.1em;
        line-height: 1.5;
        margin-bottom: 12px;
    }
    
    #quote-author {
        font-size: 0.9em;
    }
}

.heart-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    color: #ff6b6b;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.heart-btn:hover {
    opacity: 1;
    transform: scale(1.2);
    background: rgba(255, 107, 107, 0.1);
}

.heart-btn.favorited {
    color: #e74c3c;
    opacity: 1;
    animation: heartBeat 0.6s ease-in-out;
}

@media (max-width: 768px) {
    .heart-btn {
        font-size: 20px;
        padding: 8px;
        top: 8px;
        right: 8px;
    }
    
    .heart-btn:hover {
        transform: scale(1.1);
    }
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* 收藏夹管理界面 */
.favorites-manager {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .favorites-manager {
        padding: 15px;
        border-radius: 12px;
        margin-top: 15px;
    }
    
    .favorites-stats {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .favorites-list {
        max-height: 250px;
    }
    
    .favorite-item {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .favorite-text {
        font-size: 13px;
        margin-bottom: 6px;
        padding-right: 60px;
    }
    
    .favorite-author {
        font-size: 11px;
    }
    
    .favorite-actions {
        top: 8px;
        right: 8px;
        flex-direction: column;
        gap: 3px;
    }
    
    .action-btn {
        font-size: 12px;
        padding: 4px;
    }
}

.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.favorites-header h3 {
    margin: 0;
    color: #667eea;
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.favorites-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
}

.favorites-stats span {
    color: #667eea;
    font-weight: 500;
}

.clear-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.favorites-list {
    max-height: 300px;
    overflow-y: auto;
}

.favorite-item {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.favorite-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.favorite-text {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.5;
}

.favorite-author {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.favorite-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
}

.action-btn {
    background: none;
    border: none;
    padding: 5px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.action-btn.show-btn {
    color: #667eea;
}

.action-btn.show-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

.action-btn.delete-btn {
    color: #e74c3c;
}

.action-btn.delete-btn:hover {
    background: rgba(231, 76, 60, 0.1);
}

.no-favorites {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-style: italic;
}

.quote-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.quote-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 100px;
}

@media (max-width: 768px) {
    .quote-buttons {
        gap: 8px;
        flex-direction: column;
        align-items: center;
    }
    
    .quote-btn {
        padding: 12px 20px;
        font-size: 0.9em;
        min-width: 120px;
        width: 100%;
        max-width: 200px;
    }
}

.quote-btn.primary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.quote-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.quote-btn.primary:hover {
    box-shadow: 0 6px 20px rgba(240, 147, 251, 0.5);
}

.quote-display {
    transition: transform 0.3s ease;
}

/* 聊天功能样式 */
/* 碎碎念功能样式 */
.thoughts-container {
    height: 500px;
    display: flex;
    flex-direction: column;
}

.thoughts-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
}

.thoughts-header h3 {
    margin: 0 0 5px 0;
    font-size: 1.2em;
}

.thoughts-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9em;
}

.thoughts-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 15px;
    max-height: 300px;
}

@media (max-width: 768px) {
    .thoughts-container {
        height: 400px;
    }
    
    .thoughts-header {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .thoughts-header h3 {
        font-size: 1.1em;
    }
    
    .thoughts-subtitle {
        font-size: 0.85em;
    }
    
    .thoughts-list {
        padding: 8px;
        max-height: 250px;
        margin-bottom: 12px;
    }
}

.no-thoughts {
    text-align: center;
    color: #666;
    padding: 40px 20px;
    font-style: italic;
}

.thought-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.thought-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.thought-content {
    font-size: 1em;
    line-height: 1.5;
    color: #333;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.thought-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8em;
    color: #666;
    border-top: 1px solid #eee;
    padding-top: 8px;
}

.thought-time {
    flex: 1;
}

.thought-mood {
    margin: 0 10px;
    font-size: 1.2em;
}

.delete-thought {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1em;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.delete-thought:hover {
    opacity: 1;
}

.thoughts-input-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#thoughts-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.3s ease;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
}

#thoughts-input:focus {
    border-color: #667eea;
}

@media (max-width: 768px) {
    .thought-item {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .thought-content {
        font-size: 0.95em;
        margin-bottom: 8px;
    }
    
    .thought-meta {
        font-size: 0.75em;
        padding-top: 6px;
    }
    
    .thoughts-input-container {
        gap: 8px;
    }
    
    #thoughts-input {
        padding: 10px 12px;
        min-height: 50px;
        font-size: 16px;
    }
    
    .no-thoughts {
        padding: 30px 15px;
    }
}

#thoughts-add {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    align-self: flex-end;
}

#thoughts-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}