/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 0 0 20px 20px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(255, 105, 180, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #ff69b4;
}

.neko-icon {
    font-size: 32px;
    color: #ff69b4;
    animation: paw-bounce 2s infinite;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background: #ff69b4;
    color: white;
    transform: translateY(-2px);
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    color: #ff69b4;
    cursor: pointer;
}

/* 主内容区域 */
main {
    margin-bottom: 50px;
}

section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(255, 105, 180, 0.1);
    backdrop-filter: blur(10px);
}

section h2 {
    color: #ff69b4;
    margin-bottom: 30px;
    font-size: 28px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(255, 105, 180, 0.2);
}

/* 首页区域 */
.home-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 60px 40px;
}

.character-container {
    position: relative;
    margin-bottom: 40px;
}

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

.character-img {
    width: 300px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.3);
}

.speech-bubble {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 15px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 250px;
    font-size: 16px;
    font-weight: 500;
    color: #666;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid white;
}

.welcome-text h1 {
    font-size: 42px;
    margin-bottom: 20px;
    color: #333;
}

.text-pink {
    color: #ff69b4;
}

.welcome-text p {
    font-size: 18px;
    margin-bottom: 30px;
    color: #666;
}

.primary-btn {
    background: linear-gradient(45deg, #ff69b4, #ff85c0);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.3);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.4);
}

/* 互动区域 */
.interaction-box {
    background: rgba(255, 240, 245, 0.5);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
}

.message-container {
    height: 300px;
    overflow-y: auto;
    padding: 10px;
    margin-bottom: 20px;
}

.message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
    position: relative;
    transition: all 0.3s ease;
}

.message.user {
    background: #dcf8c6;
    margin-left: auto;
    border-bottom-right-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.message.bot {
    background: white;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.message.typing {
    background: linear-gradient(135deg, #f5f5f5 0%, #f0f0f0 100%);
    color: #999;
    font-style: italic;
    display: flex;
    align-items: center;
    padding: 15px;
    min-height: 45px;
}

.message.typing i {
    margin-right: 10px;
    color: #ff69b4;
    font-size: 18px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.input-area {
    display: flex;
    gap: 10px;
}

#user-input {
    flex: 1;
    padding: 15px;
    border: 2px solid #ffb6c1;
    border-radius: 30px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

#user-input:focus {
    border-color: #ff69b4;
}

.send-btn {
    background: #ff69b4;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.send-btn:hover {
    background: #ff85c0;
    transform: translateY(-2px);
}

.interaction-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.action-btn {
    background: rgba(255, 105, 180, 0.1);
    border: 2px solid #ff69b4;
    color: #ff69b4;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    background: #ff69b4;
    color: white;
    transform: translateY(-2px);
}

/* 语音区域 */
.voice-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#voice-text {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #ffb6c1;
    border-radius: 15px;
    font-size: 16px;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s ease;
}

#voice-text:focus {
    border-color: #ff69b4;
}

.voice-options {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

#voice-type {
    padding: 10px;
    border: 2px solid #ffb6c1;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

#voice-type:focus {
    border-color: #ff69b4;
}

.slider {
    flex: 1;
    max-width: 200px;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff69b4;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 105, 180, 0.5);
}

.audio-player {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 240, 245, 0.5);
    border-radius: 15px;
    text-align: center;
}

/* 换装区域 */
.dressup-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    align-items: center;
}

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

.dressup-img {
    width: 300px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.3);
    transition: all 0.3s ease;
}

.outfit-options h3 {
    color: #ff69b4;
    margin-bottom: 20px;
    text-align: center;
}

.outfit-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.outfit-item {
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 15px;
}

.outfit-item:hover,
.outfit-item.active {
    background: rgba(255, 105, 180, 0.1);
    transform: translateY(-5px);
}

.outfit-item img {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    object-fit: cover;
    margin-bottom: 10px;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.outfit-item.active img {
    border-color: #ff69b4;
}

/* 设置区域 */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.setting-group h3 {
    color: #ff69b4;
    margin-bottom: 20px;
}

.theme-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.theme-btn {
    padding: 10px 20px;
    border: 2px solid #ddd;
    border-radius: 15px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-btn:hover,
.theme-btn.active {
    border-color: #ff69b4;
    color: #ff69b4;
}

#character-select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ffb6c1;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
}

.checkbox-label {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

/* 页脚样式 */
footer {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px 20px 0 0;
    padding: 30px;
    text-align: center;
    box-shadow: 0 -4px 20px rgba(255, 105, 180, 0.2);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-info p {
    margin-bottom: 5px;
    color: #666;
}

.social-link {
    display: inline-block;
    margin: 0 10px;
    font-size: 24px;
    color: #ff69b4;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-3px);
    color: #ff85c0;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: modal-appear 0.3s ease;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #ff69b4;
}

.modal-btn {
    background: #ff69b4;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    background: #ff85c0;
    transform: translateY(-2px);
}

/* 动画效果 */
@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

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

@keyframes modal-appear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 10px;
        order: 3;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .home-section {
        padding: 40px 20px;
    }
    
    .character-img,
    .dressup-img {
        width: 200px;
    }
    
    .welcome-text h1 {
        font-size: 32px;
    }
    
    .interaction-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .voice-options {
        flex-direction: column;
        align-items: stretch;
    }
    
    .outfit-grid {
        grid-template-columns: 1fr;
    }
}