/**
 * PC端专用样式
 * 专为桌面端优化的布局和交互
 */

 :root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-radius: 8px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    --header-height: 64px;
    --sidebar-width: 240px;
    --content-max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    min-height: 100vh;
}

/* ==================== 顶部导航栏 ==================== */
.web-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
}

.logo svg {
    color: var(--primary-color);
}

.logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* 简洁用户信息 */
.user-info-simple {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* 积分链接 */
.points-link {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 14px;
    transition: color 0.2s;
    padding: 6px 12px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.points-link:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(147, 51, 234, 0.15) 100%);
    border-color: rgba(59, 130, 246, 0.5);
}

.points-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.points-number {
    color: var(--primary-color);
    font-weight: 600;
}

/* 头像菜单 */
.user-avatar-menu {
    position: relative;
}

.avatar-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    background: transparent;
    transition: all 0.2s;
    position: relative;
}

.avatar-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.avatar-btn:hover::after {
    border-color: var(--primary-color);
}

.avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-char {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

/* 下拉菜单 */
.avatar-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 140px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s;
    z-index: 1000;
    overflow: hidden;
    padding: 4px 0;
}

.user-avatar-menu:hover .avatar-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 14px;
    transition: background 0.2s;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: var(--bg-hover);
}

.dropdown-item-danger {
    color: var(--danger-color);
}

.dropdown-item-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ==================== 主容器 ==================== */
.web-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 24px;
    min-height: calc(100vh - var(--header-height));
}

.web-main-content {
    width: 100%;
}

/* ==================== 页面头部 ==================== */
.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

/* ==================== 内容卡片 ==================== */
.content-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

/* ==================== 模式标签 ==================== */
.mode-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 16px;
}

.mode-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: all 0.2s;
    position: relative;
}

.mode-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.mode-tab.active {
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
}

.mode-tab.active::after {
    content: '';
    position: absolute;
    bottom: -18px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

/* ==================== 表单样式 ==================== */
.form-section {
    margin-bottom: 24px;
}

.form-label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.label-text {
    margin-right: 4px;
}

.label-required {
    color: var(--danger-color);
}

.label-hint {
    margin-left: auto;
    font-size: 12px;
    font-weight: normal;
    color: var(--text-muted);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all 0.2s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.form-col {
    display: block;
    width: 100%;
}

.radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all 0.2s;
}

.radio-label:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
}

.radio-label input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.radio-label input[type="radio"]:checked + span {
    color: var(--primary-color);
    font-weight: 500;
}

.radio-label:has(input[type="radio"]:checked) {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary-color);
}

/* ==================== 上传区域 ==================== */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 48px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-secondary);
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
}

.upload-content svg {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.upload-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.image-preview {
    position: relative;
    display: inline-block;
    margin-top: 16px;
}

.image-preview img {
    max-width: 300px;
    max-height: 300px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.btn-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--danger-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all 0.2s;
}

.btn-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* ==================== 积分信息 ==================== */
.points-info {
    display: flex;
    gap: 24px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: 24px;
}

.points-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.points-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.points-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.points-unit {
    font-size: 14px;
    color: var(--text-muted);
}

/* ==================== 按钮样式 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-large {
    padding: 14px 32px;
    font-size: 16px;
}

.btn-text {
    background: transparent;
    color: var(--text-secondary);
}

.btn-text:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.btn-link {
    background: transparent;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    text-decoration: underline;
}

.btn-link:hover {
    color: var(--primary-hover);
}

.form-actions {
    margin-top: 32px;
    text-align: center;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==================== 页脚 ==================== */
.web-footer {
    margin-top: 64px;
    padding: 48px 0 24px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 32px;
}

.footer-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.footer-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-link-active {
    border: 1px solid #ef4444 !important;
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--text-secondary) !important;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
    .web-container {
        padding: 16px;
    }
    
    .content-card {
        padding: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 16px;
    }
    
    .header-nav {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}
