/* 用户页面样式 */
:root {
    --primary-color: #4CAF50;
    --primary-hover: #45a049;
    --secondary-color: #3498db;
    --bg-color: #f8fafc;
    --text-color: #2c3e50;
    --text-secondary: #34495e;
    --border-color: #E5E7EB;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* 主要内容区域 */
body {
    background: #f8f9fa;
}

main {
    min-height: calc(100vh - 60px);
    padding: 2rem 0;
}

.user-profile {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 用户信息卡片 */
.user-info {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.user-info h2 {
    color: #4CAF50;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.user-info p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.user-info .icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #4CAF50;
}

/* 统计卡片 */
.user-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card h3 {
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.stat-card p {
    color: #4CAF50;
    font-size: 2rem;
    font-weight: 600;
}

/* 历史记录 */
.recent-history {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.recent-history h2 {
    color: #4CAF50;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.history-list {
    min-height: 200px;
}

/* 加载状态 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
}

.empty-state p {
    font-size: 1rem;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .user-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .user-info,
    .stat-card,
    .recent-history {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    main {
        padding: 1rem 0;
    }

    .user-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .user-profile {
        padding: 0 0.75rem;
    }
}

/* 用户页面头部样式 */
.profile-header {
    background: white;
    padding: 0.75rem 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.profile-header .logo {
    display: flex;
    align-items: center;
}

.profile-header .logo h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.profile-header .user-section {
    display: flex;
    align-items: center;
}

.profile-header .user-menu {
    position: relative;
    padding: 0.5rem;
    cursor: pointer;
}

.profile-header #username {
    font-size: 0.875rem;
    color: #2c3e50;
    font-weight: 500;
}

.profile-header .user-menu-content {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    min-width: 120px;
    display: none;
    z-index: 1000;
}

.profile-header .user-menu:hover .user-menu-content {
    display: block;
}

.profile-header .user-menu-content a {
    display: block;
    padding: 0.75rem 1rem;
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

.profile-header .user-menu-content a:hover {
    background-color: #f8f9fa;
}

.profile-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.profile-header {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-info h1 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.user-info p {
    margin: 10px 0 0;
    color: #666;
}

.stats-section {
    margin-bottom: 30px;
}

.stats-section h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

.history-section {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.history-section h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-item {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    transition: transform 0.2s;
}

.history-item:hover {
    transform: translateX(2px);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.history-date {
    color: #666;
    font-size: 14px;
}

.history-type {
    background-color: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.history-text {
    color: #333;
    margin-bottom: 10px;
    line-height: 1.5;
}

.history-actions {
    display: flex;
    gap: 10px;
}

.download-button {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
}

.download-button:hover {
    background-color: #0056b3;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    text-align: center;
} 