/* 全局样式 */
* {
    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;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
}

/* 浮动爱心动画 */
.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.heart {
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 182, 193, 0.6);
    transform: rotate(45deg);
    animation: float 6s ease-in-out infinite;
}

.heart::before,
.heart::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 182, 193, 0.6);
    border-radius: 50%;
}

.heart::before {
    top: -10px;
    left: 0;
}

.heart::after {
    top: 0;
    left: -10px;
}

.heart:nth-child(1) { left: 10%; animation-delay: 0s; }
.heart:nth-child(2) { left: 20%; animation-delay: 1s; }
.heart:nth-child(3) { left: 30%; animation-delay: 2s; }
.heart:nth-child(4) { left: 40%; animation-delay: 3s; }
.heart:nth-child(5) { left: 50%; animation-delay: 4s; }

@keyframes float {
    0%, 100% {
        transform: rotate(45deg) translateY(0px);
        opacity: 0.6;
    }
    50% {
        transform: rotate(45deg) translateY(-20px);
        opacity: 1;
    }
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
}

.title {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    }
    to {
        text-shadow: 2px 2px 20px rgba(255, 255, 255, 0.8);
    }
}

.date-display {
    font-size: 1.2rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 25px;
    display: inline-block;
    backdrop-filter: blur(10px);
}

/* 主要内容 */
.main-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* 思念指数介绍 */
.love-intro {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    grid-column: 1 / -1;
}

.love-intro h2 {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
}

.romantic-text {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: center;
    margin-bottom: 30px;
    font-style: italic;
}

.index-breakdown h3 {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.breakdown-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.breakdown-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

.breakdown-item:hover {
    transform: translateY(-3px);
}

.item-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

.item-title {
    display: block;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.item-desc {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* 思念指数卡片 */
.love-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.love-card:hover {
    transform: translateY(-5px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h2 {
    color: #333;
    font-size: 1.5rem;
}

.heart-icon {
    font-size: 2rem;
    animation: pulse 1.5s ease-in-out infinite;
}

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

.index-display {
    margin: 30px 0;
}

.index-number {
    font-size: 4rem;
    font-weight: bold;
    color: #e91e63;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.index-unit {
    font-size: 1.5rem;
    color: #666;
    margin-left: 10px;
}

.index-description {
    color: #666;
    font-style: italic;
    margin-top: 15px;
}

.index-details {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 0;
}

.detail-label {
    color: #666;
    font-size: 0.9rem;
}

.detail-value {
    color: #e91e63;
    font-weight: bold;
    font-size: 1rem;
}

/* 留言板 */
.message-board {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.message-board h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

#loveMessage {
    width: 100%;
    height: 120px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#loveMessage:focus {
    outline: none;
    border-color: #e91e63;
}

.save-btn {
    background: linear-gradient(45deg, #e91e63, #ff6b9d);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 15px;
    transition: transform 0.3s ease;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.save-btn:hover {
    transform: scale(1.05);
}

/* 留言记录 */
.message-history {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.message-history h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.history-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #e91e63;
    transition: transform 0.3s ease;
}

.history-item:hover {
    transform: translateX(5px);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.history-date {
    font-weight: bold;
    color: #333;
    font-size: 0.9rem;
}

.history-time {
    color: #666;
    font-size: 0.8rem;
}

.history-message {
    color: #555;
    line-height: 1.6;
    font-style: italic;
}

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

/* 自定义滚动条 */
.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #e91e63;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #c2185b;
}

/* 趋势图 */
.trend-chart {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* 全宽趋势图区域 */
.trend-section {
    width: 100%;
    margin: 40px 0;
    padding: 0 20px;
}

.trend-chart-full {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.trend-chart-full h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5em;
}

.chart-container {
    width: 100%;
    height: 400px;
    margin-bottom: 20px;
    position: relative;
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
}

#trendCanvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
}

/* 时间段选择器 */
.time-range-selector {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.range-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-weight: 500;
    color: #333;
}

.range-info span {
    padding: 5px 10px;
    background: white;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.range-slider {
    position: relative;
    height: 40px;
    margin: 20px 0;
    background: #e9ecef;
    border-radius: 20px;
    padding: 10px 0;
}

.slider {
    position: absolute;
    width: 100%;
    height: 20px;
    background: transparent;
    outline: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #e91e63;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 2px solid white;
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #e91e63;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 2px solid white;
}

.slider::-webkit-slider-track {
    background: transparent;
    height: 20px;
}

.slider::-moz-range-track {
    background: transparent;
    height: 20px;
}

.range-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.range-btn {
    background: linear-gradient(45deg, #e91e63, #ff6b9d);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.3);
}

.range-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.4);
}

.range-btn:active {
    transform: translateY(0);
}

/* 移除旧的趋势图样式 */
.trend-chart.full-width {
    display: none;
}

.trend-chart h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

#trendCanvas {
    width: 100%;
    height: auto;
    border-radius: 10px;
    background: #f8f9fa;
    cursor: pointer;
}

/* 图表控制按钮 */
.chart-controls {
    margin-bottom: 15px;
}

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

.chart-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #6c757d;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.chart-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.chart-btn.active {
    background: #e91e63;
    border-color: #e91e63;
    color: white;
}

/* 工具提示样式 */
.chart-tooltip {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    font-weight: 500;
}

.tooltip-date {
    font-weight: bold;
    margin-bottom: 4px;
}

.tooltip-value {
    color: #e91e63;
}

/* 数据点详情模态框 */
.point-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #e91e63;
}

.detail-label {
    font-weight: 500;
    color: #495057;
}

.detail-value {
    font-weight: bold;
    color: #e91e63;
    font-size: 1.1em;
}

/* 特殊日期 */
.special-dates {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.special-dates h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.date-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.date-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.date-item:hover {
    transform: translateX(5px);
}

.date {
    font-weight: bold;
    color: #333;
}

.event {
    color: #666;
    font-style: italic;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 30px 0;
    color: #fff;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .love-card,
    .message-board,
    .trend-chart,
    .special-dates {
        padding: 20px;
    }
    
    .index-number {
        font-size: 3rem;
    }
    
    .date-item {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .breakdown-items {
        grid-template-columns: 1fr;
    }
    
    .detail-item {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .history-header {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .heart {
        width: 15px;
        height: 15px;
    }
    
    .heart::before,
    .heart::after {
        width: 15px;
        height: 15px;
    }
    
    .heart::before {
        top: -7.5px;
    }
    
    .heart::after {
        left: -7.5px;
    }
    
    /* 移动端趋势图适配 */
    .trend-section {
        padding: 0 10px;
        margin: 20px 0;
    }
    
    .trend-chart-full {
        padding: 15px;
    }
    
    .chart-container {
        height: 250px;
        border-radius: 8px;
    }
    
    .time-range-selector {
        padding: 12px;
        margin-top: 15px;
    }
    
    .range-info {
        flex-direction: column;
        gap: 5px;
        font-size: 12px;
    }
    
    .range-info span {
        padding: 3px 8px;
        font-size: 11px;
    }
    
    .range-slider {
        height: 30px;
        margin: 15px 0;
    }
    
    .slider::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
    }
    
    .slider::-moz-range-thumb {
        width: 20px;
        height: 20px;
    }
    
    .range-controls {
        flex-direction: column;
        gap: 8px;
        margin-top: 12px;
    }
    
    .range-btn {
        width: 100%;
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }
    
    .index-number {
        font-size: 2.5rem;
    }
    
    .date-display {
        font-size: 1rem;
        padding: 8px 16px;
    }
}

/* 数据管理功能样式 */
.data-management {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.data-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.data-btn {
    padding: 12px 20px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.data-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #764ba2, #667eea);
}

/* 历史记录模态框样式 */
.history-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 90%;
    max-height: 80%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(45deg, #e91e63, #ff6b9d);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.history-table {
    overflow-x: auto;
}

.history-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.history-table th {
    background: #f8f9fa;
    color: #333;
    padding: 15px 10px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #e9ecef;
    position: sticky;
    top: 0;
}

.history-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e9ecef;
    color: #666;
}

.history-table tr:hover {
    background: #f8f9fa;
}

.history-table tr:nth-child(even) {
    background: #fafafa;
}

/* 服务器状态样式 */
.status-info {
    padding: 20px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.status-item:last-child {
    border-bottom: none;
}

.status-label {
    font-weight: bold;
    color: #333;
    font-size: 1rem;
}

.status-value {
    color: #e91e63;
    font-weight: bold;
    font-size: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .title {
        font-size: 2.5rem;
    }

    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .love-card,
    .message-board,
    .message-history,
    .trend-chart,
    .special-dates {
        padding: 20px;
    }

    .index-number {
        font-size: 3rem;
    }

    .date-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .breakdown-items {
        grid-template-columns: 1fr;
    }

    .detail-item {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }

    .history-header {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }

    .heart {
        width: 15px;
        height: 15px;
    }

    .heart::before,
    .heart::after {
        width: 15px;
        height: 15px;
    }

    .heart::before {
        top: -7.5px;
    }

    .heart::after {
        left: -7.5px;
    }

    /* 数据管理按钮响应式 */
    .data-buttons {
        flex-direction: column;
        align-items: center;
    }

    .data-btn {
        width: 100%;
        max-width: 200px;
    }

    /* 模态框响应式 */
    .modal-content {
        max-width: 95%;
        max-height: 90%;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-header h3 {
        font-size: 1.5rem;
    }

    .modal-body {
        padding: 20px;
    }

    .history-table {
        font-size: 0.8rem;
    }

    .history-table th,
    .history-table td {
        padding: 8px 5px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }

    .index-number {
        font-size: 2.5rem;
    }

    .date-display {
        font-size: 1rem;
        padding: 8px 15px;
    }
}

/* 加载状态样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid #ff6b9d;
}

.loading-spinner {
    margin-bottom: 20px;
}

.heart-spinner {
    font-size: 3rem;
    animation: heartSpin 1.5s ease-in-out infinite;
    display: inline-block;
}

@keyframes heartSpin {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 0.7;
    }
}

.loading-text {
    font-size: 1.2rem;
    color: #333;
    font-weight: 500;
    font-family: 'Noto Sans SC', sans-serif;
}

/* 思念指数加载动画 */
.index-number.loading {
    animation: numberPulse 1.5s ease-in-out infinite;
    color: #ff6b9d;
    position: relative;
}

.index-number.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ff6b9d;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes numberPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

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

/* 移动端加载样式优化 */
@media (max-width: 768px) {
    .loading-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .heart-spinner {
        font-size: 2.5rem;
    }
    
    .loading-text {
        font-size: 1rem;
    }
    
    .index-number.loading::after {
        width: 16px;
        height: 16px;
        margin: -8px 0 0 -8px;
    }
}

@media (max-width: 480px) {
    .loading-content {
        padding: 25px 15px;
    }
    
    .heart-spinner {
        font-size: 2rem;
    }
    
    .loading-text {
        font-size: 0.9rem;
    }
}

/* 留言管理样式 */
.history-actions {
    display: flex !important;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: relative;
    z-index: 10;
    visibility: visible;
}

.history-item:hover .history-actions {
    opacity: 1;
}

/* 确保按钮在移动端始终可见 */
@media (max-width: 768px) {
    .history-actions {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

.edit-btn, .delete-btn {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    visibility: visible !important;
    opacity: 1 !important;
}

.edit-btn {
    color: #2196F3;
}

.edit-btn:hover {
    background: rgba(33, 150, 243, 0.1);
    transform: scale(1.1);
}

.delete-btn {
    color: #f44336;
}

.delete-btn:hover {
    background: rgba(244, 67, 54, 0.1);
    transform: scale(1.1);
}

.edit-form {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    border: 2px solid #2196F3;
}

.edit-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s ease;
}

.edit-textarea:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.edit-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: flex-end;
}

.save-edit-btn, .cancel-edit-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.save-edit-btn {
    background: #2196F3;
    color: white;
}

.save-edit-btn:hover {
    background: #1976D2;
    transform: translateY(-1px);
}

.cancel-edit-btn {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.cancel-edit-btn:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .history-actions {
        opacity: 1 !important;
        gap: 6px;
        visibility: visible !important;
    }
    
    .edit-btn, .delete-btn {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
    
    .edit-form {
        padding: 12px;
    }
    
    .edit-textarea {
        min-height: 70px;
        font-size: 1rem;
    }
    
    .edit-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .save-edit-btn, .cancel-edit-btn {
        width: 100%;
        padding: 10px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .history-actions {
        align-self: flex-end;
    }
    
    .edit-form {
        padding: 10px;
    }
    
    .edit-textarea {
        min-height: 60px;
    }
}

/* 临时强制显示编辑按钮 - 调试用 */
.history-actions {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
}

.edit-btn, .delete-btn {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid #ddd !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
} 