/* 可爱的儿童主题样式 */
:root {
    --primary: #FF6B6B;
    --secondary: #4ECDC4;
    --accent: #FFD166;
    --background: #F7F9FC;
    --surface: #FFFFFF;
    --text-primary: #2B2D42;
    --text-light: #8D99AE;
    --success: #06D6A0;
    --warning: #FFB74D;
    --error: #EF476F;
    --bubblegum: #FF9AA2;
    --sky: #A0E7E5;
    --lemon: #FFFDA2;
    --lavender: #B4B8FF;
    --mint: #A0E7C5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', 'Roboto', sans-serif;
    background: linear-gradient(135deg, var(--background) 0%, #E6F7FF 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 1rem 2rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    font-family: 'Comic Sans MS', cursive;
}

.nav-items {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    transition: all 0.3s;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 按钮样式 */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-accent {
    background: var(--accent);
    color: var(--text-primary);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--text-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.form-textarea {
    width: 100%;
    min-height: 200px;
    padding: 0.75rem;
    border: 2px solid var(--text-light);
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    font-family: inherit;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

/* 网格布局 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* 响应式 */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-items {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .container {
        padding: 1rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
}

/* 动画 */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.bounce {
    animation: bounce 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, var(--secondary), var(--primary));
}

/* 选择文本样式 */
::selection {
    background: var(--accent);
    color: var(--text-primary);
}

/* 链接样式 */
a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s;
}

a:hover {
    color: var(--secondary);
}

/* 输入框占位符 */
::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

/* 模态框背景 */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}