/* 导入Google字体以获得更好的视觉效果 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

body {
    font-family: 'Noto Sans SC', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: auto;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

h1 {
    text-align: center;
    color: #4a4a8c;
    margin-bottom: 30px;
    font-weight: 700;
    font-size: 2.2rem;
    position: relative;
}

h1::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, #667eea, #764ba2);
    margin: 10px auto;
    border-radius: 2px;
}

h2 {
    color: #5a5ac4;
    border-left: 4px solid #667eea;
    padding-left: 15px;
    margin-top: 30px;
    margin-bottom: 20px;
    font-weight: 600;
}

h3 {
    color: #6b6baf;
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 500;
}

/* 云端备份区域样式 */
#cloud-section {
    background: linear-gradient(135deg, #e8f5e8 0%, #d1f0d1 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid #c8e6c9;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

#cloud-section h3 {
    margin-top: 0;
    color: #2e7d32;
    text-align: center;
}

.cloud-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 15px 0;
}

#cloud-section button {
    background: linear-gradient(to bottom, #FF9800, #F57C00);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#cloud-section button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    background: linear-gradient(to bottom, #FFA726, #FB8C00);
}

#cloud-section button:active {
    transform: translateY(0);
}

/* 预设行为样式 */
.preset-behaviors {
    margin: 15px 0 20px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.preset-behaviors span {
    font-weight: 500;
    color: #6c757d;
    margin-right: 5px;
}

.preset-btn {
    background: linear-gradient(to bottom, #4ecdc4, #44a08d);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 400;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.preset-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    background: linear-gradient(to bottom, #5fddd5, #55b09c);
}

.preset-btn:active {
    transform: translateY(0);
}

/* 按钮组样式 */
.button-group {
    margin-top: 15px;
}



/* 模块卡片导航样式 */
.module-cards {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.module-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 200px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.module-card.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: translateY(-3px);
}

.module-card h3 {
    margin: 0 0 10px 0;
    color: inherit;
    font-size: 1.2rem;
}

.module-card p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.module-card.active h3,
.module-card.active p {
    color: white;
}

/* 模块内容区域 */
.module-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.module-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 成长日记样式 */
.diary-container {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.diary-list {
    display: grid;
    gap: 15px;
}

.diary-entry {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-left: 4px solid #667eea;
}

.diary-date {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.diary-content {
    color: #555;
    line-height: 1.5;
}

.diary-points {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 10px;
}

/* 用户认证区域样式 */
#auth-section {
    background: linear-gradient(135deg, #f0f4ff 0%, #e3e9ff 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid #d0d8ff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

#auth-section h3 {
    margin-top: 0;
    color: #3f51b5;
    text-align: center;
}

#auth-forms {
    display: flex;
    justify-content: center;
}

.auth-form {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 300px;
    text-align: center;
}

.auth-form input {
    width: 100%;
    margin-bottom: 15px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.auth-form input:focus {
    border-color: #3f51b5;
    box-shadow: 0 0 0 2px rgba(63, 81, 181, 0.2);
}

.auth-form button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(to bottom, #3f51b5, #303f9f);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    margin-bottom: 15px;
}

.auth-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    background: linear-gradient(to bottom, #5c6bc0, #3949ab);
}

.auth-form p {
    margin: 10px 0 0;
    color: #666;
    font-size: 14px;
}

.auth-form a {
    color: #3f51b5;
    text-decoration: none;
    font-weight: 500;
}

.auth-form a:hover {
    text-decoration: underline;
}

/* 积分显示区域 */
.points-display {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    text-align: center;
}

#login-status-card {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    margin-bottom: 25px;
}

#login-status-card .points-value {
    color: #9C27B0;
}

#login-status-card .points-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    min-width: 200px;
}

.points-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    min-width: 150px;
}

.points-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1976d2;
}

.points-label {
    font-size: 1rem;
    color: #666;
    margin-top: 5px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    border-left: 4px solid #4CAF50;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
    margin-bottom: 15px;
}

input {
    margin: 0;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    flex: 1;
    min-width: 200px;
}

input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

button {
    padding: 12px 24px;
    background: linear-gradient(to bottom, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    background: linear-gradient(to bottom, #45a049, #3d8b40);
}

button:active {
    transform: translateY(0);
}

.add-points-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.add-points-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #7688ef 0%, #865fb2 100%);
}

.add-points-btn:active {
    transform: translateY(0);
}

.add-gift-btn {
    background: linear-gradient(to bottom, #9C27B0, #7B1FA2);
}

.clear-data-btn {
    background: linear-gradient(to bottom, #f44336, #d32f2f);
}

/* 列表样式 */
ul {
    list-style-type: none;
    padding: 0;
}

li {
    background: white;
    margin: 10px 0;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid #4CAF50;
}

li:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.gift-item {
    border-left-color: #2196F3;
}

.redeemed-item {
    border-left-color: #9C27B0;
}

/* 已兑换礼物列表优化样式 */
.empty-redeemed-message {
    text-align: center;
    padding: 30px 15px;
    color: #999;
    font-size: 1rem;
    background: rgba(255,255,255,0.6);
    border-radius: 12px;
    margin: 15px 0;
}

.redeemed-stats {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
    color: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.3);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.stat-text {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.95;
}

.redeemed-gifts-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.redeemed-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-left: 5px solid #9C27B0;
    transition: all 0.3s ease;
    animation: slideInLeft 0.4s ease-out;
}

.redeemed-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.redeemed-icon {
    font-size: 2rem;
    margin-right: 15px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.redeemed-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.redeemed-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 4px;
}

.redeemed-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.redeemed-points {
    color: #f44336;
    font-weight: 500;
}

.points-badge {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.redeemed-date {
    color: #999;
    font-size: 0.85rem;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.redeem-btn {
    background: linear-gradient(to bottom, #2196F3, #1976D2);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 80px;
    text-align: center;
}

.redeem-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    background: linear-gradient(to bottom, #1976D2, #1565C0);
}

.redeem-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.redeem-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* 礼物列表图片和描述样式 */
.gift-image-container {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.gift-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gift-image:hover {
    transform: scale(1.05);
}

.gift-image-placeholder {
    font-size: 2.5rem;
}

.gift-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gift-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.category-badge {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.category-badge.small {
    padding: 2px 8px;
    font-size: 0.7rem;
}

.gift-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 5px;
}

/* 已兑换礼物图片和描述样式 */
.redeemed-image-container {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.redeemed-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.redeemed-image-placeholder {
    font-size: 2rem;
}

.redeemed-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.redeemed-description {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.3;
    margin-bottom: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
        font-size: 14px;
    }
    
    .container {
        padding: 15px;
        margin: 5px;
        border-radius: 12px;
    }
    
    h1 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    h1::after {
        width: 60px;
        height: 3px;
    }
    
    /* 模块卡片移动端优化 */
    .module-cards {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .module-card {
        min-width: auto;
        padding: 15px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        gap: 15px;
        text-align: left;
    }
    
    .module-card > div:first-child {
        font-size: 2rem !important;
        margin-bottom: 0 !important;
    }
    
    .module-card h3 {
        font-size: 1.1rem;
        margin-bottom: 5px !important;
    }
    
    .module-card p {
        font-size: 0.85rem;
    }
    
    /* 认证状态卡片优化 */
    #auth-status-card > div {
        padding: 10px !important;
        border-radius: 6px !important;
    }
    
    #auth-status-card .points-card {
        min-width: auto;
        padding: 10px !important;
    }
    
    #auth-status-card button {
        padding: 4px 8px !important;
        font-size: 0.7rem !important;
        min-width: 40px;
        width: auto;
    }
    
    /* 积分显示区域优化 */
    .points-display {
        flex-direction: row;
        gap: 10px;
        padding: 12px;
        margin-bottom: 15px;
        justify-content: space-between;
    }
    
    .points-card {
        min-width: auto;
        padding: 10px 8px;
        flex: 1;
        text-align: center;
    }
    
    .points-value {
        font-size: 1.3rem;
    }
    
    .points-label {
        font-size: 0.8rem;
        margin-top: 3px;
    }
    
    /* 表单区域优化 */
    .form-group {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 12px;
    }
    
    input {
        min-width: auto;
        width: 100%;
        padding: 10px 12px;
        font-size: 14px;
    }
    
    /* 预设行为按钮优化 */
    .preset-behaviors {
        padding: 8px;
        gap: 8px;
        margin: 10px 0 15px 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
    
    .preset-btn {
        padding: 6px 8px;
        font-size: 0.75rem;
        min-height: 32px;
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        border-radius: 4px;
        text-align: center;
    }
    
    /* 按钮组优化 */
    .button-group {
        gap: 8px;
        margin-top: 15px;
    }
    
    button,
    .add-points-btn,
    .add-gift-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 100%;
    }
    
    .cloud-buttons,
    .button-group {
        flex-direction: column;
    }
    
    #cloud-section button {
        width: 100%;
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    /* 模板链接优化 */
    .template-link {
        padding: 5px 10px !important;
        font-size: 0.75rem !important;
        margin-right: 4px !important;
        margin-bottom: 6px;
        display: inline-block;
        min-height: 28px;
        line-height: 1.1;
        max-width: 130px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* 列表项优化 */
    li {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
        margin: 8px 0;
    }
    
    .redeem-btn {
        align-self: stretch;
        width: 100%;
        margin-top: 8px;
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    /* 礼物列表移动端优化 */
    .gift-image-container {
        width: 50px;
        height: 50px;
        margin-right: 10px;
    }
    
    .gift-image-placeholder {
        font-size: 1.5rem;
    }
    
    .gift-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .gift-description {
        font-size: 0.8rem;
    }
    
    /* 已兑换礼物列表移动端优化 */
    .redeemed-stats {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    
    .stat-item {
        flex-direction: row;
        gap: 8px;
    }
    
    .stat-icon {
        font-size: 1.3rem;
        margin-bottom: 0;
    }
    
    .redeemed-item {
        flex-direction: column;
        text-align: center;
        padding: 15px 12px;
    }
    
    .redeemed-icon {
        margin-right: 0;
        margin-bottom: 8px;
        font-size: 1.8rem;
    }
    
    .redeemed-info {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
    
    .redeemed-date {
        font-size: 0.75rem;
    }
    
    /* 行为日志移动端优化 */
    .behavior-stats {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    
    .behavior-item {
        flex-direction: column;
        text-align: center;
        padding: 15px 12px;
    }
    
    .behavior-icon {
        margin-right: 0;
        margin-bottom: 8px;
        font-size: 1.8rem;
    }
    
    .behavior-meta {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
    
    .behavior-date {
        font-size: 0.75rem;
    }
    
    /* 历史记录页面移动端优化 */
    .history-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .history-section {
        padding: 15px;
    }
    
    .history-section .section-header {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .history-section .section-header h3 {
        font-size: 1.2rem;
    }
    
    /* 日记容器优化 */
    .diary-container {
        padding: 15px;
        margin-top: 15px;
    }
    
    .diary-entry {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .diary-date {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
    
    .diary-content {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    /* 认证表单优化 */
    .auth-form {
        padding: 20px;
        min-width: auto;
    }
    
    #auth-forms {
        flex-direction: column;
        align-items: center;
    }
    
    /* 云备份区域优化 */
    #cloud-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    #cloud-section h3 {
        font-size: 1.1rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 区域标题样式 */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
}

.section-badge {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 25px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.3);
}

/* 历史记录页面优化排版 */
.history-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.history-section {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.history-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.behavior-section {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.05), rgba(255, 255, 255, 0.8));
}

.redeemed-section {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.05), rgba(255, 255, 255, 0.8));
}

/* 历史记录页面标题样式优化 */
.history-section .section-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, transparent, currentColor, transparent) 1;
}

.behavior-section .section-header {
    border-bottom-color: #4CAF50;
}

.redeemed-section .section-header {
    border-bottom-color: #9C27B0;
}

.history-section .section-header h3 {
    font-size: 1.4rem;
    background: linear-gradient(135deg, #333, #666);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.behavior-section .section-header h3::before {
    content: '📋';
    margin-right: 10px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.redeemed-section .section-header h3::before {
    content: '🏆';
    margin-right: 10px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* 历史记录页面内容区域优化 */
.history-section #behavior-log,
.history-section #redeemed-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

/* 自定义滚动条样式 */
.history-section #behavior-log::-webkit-scrollbar,
.history-section #redeemed-list::-webkit-scrollbar {
    width: 6px;
}

.history-section #behavior-log::-webkit-scrollbar-track,
.history-section #redeemed-list::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 3px;
}

.history-section #behavior-log::-webkit-scrollbar-thumb,
.history-section #redeemed-list::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.history-section #behavior-log::-webkit-scrollbar-thumb:hover,
.history-section #redeemed-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.3);
}

/* 历史记录页面移动端适配 */
@media (max-width: 768px) {
    .history-container {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 15px;
    }
    
    .history-section {
        padding: 20px;
        border-radius: 12px;
    }
}

/* 行为日志优化样式 */
.empty-behavior-message {
    text-align: center;
    padding: 30px 15px;
    color: #999;
    font-size: 1rem;
    background: rgba(255,255,255,0.6);
    border-radius: 12px;
    margin: 15px 0;
}

.behavior-stats {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.behavior-log-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.behavior-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-left: 5px solid #4CAF50;
    transition: all 0.3s ease;
    animation: slideInLeft 0.4s ease-out;
}

.behavior-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.behavior-icon {
    font-size: 1.5rem;
    margin-right: 15px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.behavior-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.behavior-description {
    font-weight: 500;
    font-size: 1rem;
    color: #333;
    margin-bottom: 4px;
}

.behavior-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.positive-points {
    color: #4CAF50;
    font-weight: 600;
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
    padding: 2px 8px;
    border-radius: 12px;
}

.negative-points {
    color: #f44336;
    font-weight: 600;
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    padding: 2px 8px;
    border-radius: 12px;
}

.behavior-date {
    color: #999;
    font-size: 0.85rem;
}

.container {
    animation: fadeIn 0.6s ease-out;
}

li {
    animation: fadeIn 0.3s ease-out;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 礼物描述中的链接样式 */
.gift-description a {
    color: #2196F3;
    text-decoration: none;
    border-bottom: 2px solid #2196F3;
    padding-bottom: 1px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.gift-description a:hover {
    color: #1976D2;
    border-bottom-color: #1976D2;
    background-color: rgba(33, 150, 243, 0.1);
    border-radius: 2px;
}

.gift-description a:active {
    transform: scale(0.98);
}

/* Tab 导航样式 */
.tab-navigation {
    display: flex;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 5px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    gap: 5px;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    background: rgba(255,255,255,0.5);
    color: #495057;
    transform: translateY(-1px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.tab-btn.active .tab-icon {
    filter: drop-shadow(0 2px 4px rgba(255,255,255,0.3));
}

.tab-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.tab-btn.active .tab-icon {
    transform: scale(1.1);
}

.tab-text {
    font-weight: 600;
}

/* Tab 内容样式 */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

/* Tab 导航移动端优化 */
@media (max-width: 600px) {
    .tab-navigation {
        flex-direction: column;
        gap: 8px;
    }
    
    .tab-btn {
        justify-content: flex-start;
        padding: 15px 20px;
    }
}
