/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #FF6B6B;
    --primary-dark: #EE5A5A;
    --secondary: #4ECDC4;
    --accent: #FFE66D;
    --dark: #2C3E50;
    --light: #F7F9FC;
    --gray: #95A5A6;
    --success: #2ECC71;
    --warning: #F39C12;
    --error: #E74C3C;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-sm: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

/* 导航栏 */
.navbar {
    background: white;
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.logo i {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 30px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.nav-links li {
    flex-shrink: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
    line-height: 1;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 15px;
}

#nav-not-logged {
    display: flex;
    align-items: center;
}

#nav-logged {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-points {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--accent);
    font-weight: 500;
    font-size: 0.9rem;
}

.user-menu {
    position: relative;
}

#username-display {
    color: var(--dark);
    font-weight: 500;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    transition: background 0.3s;
}

#username-display:hover {
    background: var(--light);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    margin-top: 10px;
    overflow: hidden;
    z-index: 1001;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: var(--dark);
    text-decoration: none;
    transition: background 0.3s;
}

.user-dropdown a:hover {
    background: var(--light);
}

.user-dropdown .dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 5px 0;
}

.user-dropdown .logout-link {
    color: var(--error);
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* 主内容区 */
#main-content {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}

.page {
    display: none;
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 首页英雄区 */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 60px 0;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 30px;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    color: var(--gray);
    font-size: 0.9rem;
}

.hero-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    position: relative;
}

.hero-image-main,
.hero-image-secondary {
    position: relative;
}

.hero-image-main img,
.hero-image-secondary img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s;
    object-fit: cover;
}

.hero-image-main img {
    height: 350px;
    transform: rotate(-2deg);
}

.hero-image-secondary img {
    height: 280px;
    transform: rotate(2deg);
    margin-top: 40px;
}

.hero-image-main:hover img,
.hero-image-secondary:hover img {
    transform: rotate(0deg) scale(1.02);
}

/* QQ群信息 */
.qq-group-section {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    margin-top: 40px;
    box-shadow: var(--shadow);
    text-align: center;
}

.qq-group-section h2 {
    color: var(--primary);
    margin-bottom: 30px;
}

.qq-group-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.qq-info {
    text-align: left;
}

.qq-info p {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.qq-info .fa-qq {
    color: #12B7F5;
    font-size: 1.5rem;
}

.qq-qr img {
    width: 150px;
    height: 150px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}

/* 图库页面 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-header h2 {
    font-size: 2rem;
}

.filter-tabs {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid var(--gray);
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

/* 图库工具栏 */
.gallery-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-box {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: var(--primary);
}

.search-box button {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: var(--primary-dark);
}

.sort-dropdown select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    background: white;
}

.sort-dropdown select:focus {
    border-color: var(--primary);
}

/* 分页控件 */
.gallery-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    margin-bottom: 40px;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 100;
    position: relative;
}

.gallery-pagination .pagination-info {
    color: white;
    font-size: 16px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.pagination-info {
    color: var(--gray);
    font-size: 14px;
}

.pagination-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    padding: 12px 24px;
    background: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 600;
    min-width: 80px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.pagination-btn:hover:not(:disabled) {
    background: #ff6b6b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,107,107,0.4);
}

.pagination-btn:disabled {
    background: rgba(255,255,255,0.5);
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .gallery-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
}

/* 照片网格 */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.photo-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.photo-card-image {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 200px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: #f0f0f0;
}

.img-loading-container img {
    width: 40px !important;
    height: 40px !important;
    object-fit: contain;
}

.photo-card-stats {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 20px 15px 10px;
    display: flex;
    gap: 15px;
    opacity: 1;
}

.photo-card-stats .stat-item {
    color: white;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.photo-card-stats .stat-item i {
    font-size: 0.8rem;
}

.photo-card-info {
    padding: 15px;
}

.photo-card-title {
    font-weight: 600;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-card-meta {
    display: flex;
    justify-content: space-between;
    color: var(--gray);
    font-size: 0.85rem;
}

.photo-card-type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.photo-card-type.cat {
    color: var(--secondary);
}

.photo-card-type.dog {
    color: var(--primary);
}

.photo-card-type.daily {
    color: #9B59B6;
}

/* 上传页面 */
.upload-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.upload-container h2 {
    text-align: center;
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed var(--gray);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 25px;
    position: relative;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: rgba(255, 107, 107, 0.05);
}

.upload-placeholder i {
    font-size: 3rem;
    color: var(--gray);
    margin-bottom: 15px;
}

.upload-placeholder p {
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 5px;
}

.upload-placeholder span {
    color: var(--gray);
    font-size: 0.85rem;
}

.upload-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: white;
    border-radius: var(--radius);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--gray);
    font-size: 0.85rem;
}

/* 密码输入框 */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 5px;
    font-size: 1rem;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: var(--primary);
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
}

.radio-label:hover {
    border-color: var(--primary);
}

.radio-label input:checked + span {
    color: var(--primary);
}

.radio-label input:checked {
    accent-color: var(--primary);
}

.upload-status {
    margin-bottom: 20px;
}

.ai-checking {
    background: #f0f0f0;
    padding: 20px;
    border-radius: var(--radius-sm);
    text-align: center;
}

.ai-checking i {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* 个人中心 */
.profile-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

.profile-sidebar {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    text-align: center;
    height: fit-content;
}

.profile-avatar {
    font-size: 5rem;
    color: var(--gray);
    margin-bottom: 15px;
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    cursor: pointer;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-upload-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s;
}

.profile-avatar:hover .avatar-upload-overlay {
    opacity: 1;
}

/* 导航栏消息图标 */
.nav-notifications, .nav-messages {
    position: relative;
    cursor: pointer;
    padding: 8px;
    margin-right: 10px;
    color: var(--gray);
    transition: color 0.3s;
}

.nav-notifications:hover, .nav-messages:hover {
    color: var(--primary);
}

.notification-badge, .message-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--error);
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* 消息提醒列表 */
.notifications-list {
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
}

.notification-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #fff3cd;
}

.notification-item.unread:hover {
    background: #ffeaa7;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.notification-icon.like {
    background: #ffeaa7;
    color: #fdcb6e;
}

.notification-icon.comment {
    background: #74b9ff;
    color: #0984e3;
}

.notification-content {
    flex: 1;
}

.notification-content p {
    margin: 0;
    color: var(--dark);
}

.notification-content small {
    color: var(--gray);
}

.notifications-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* 私聊界面 */
.messages-container {
    display: flex;
    height: 500px;
    margin-top: 20px;
}

.messages-sidebar {
    width: 250px;
    border-right: 1px solid #eee;
    padding-right: 15px;
}

.messages-sidebar h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.messages-contacts {
    overflow-y: auto;
    max-height: 420px;
}

.contact-item {
    position: relative;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.contact-item-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    cursor: pointer;
    background: white;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.contact-item-wrap:hover, .contact-item.active .contact-item-wrap {
    background: #f8f9fa;
}

.contact-delete-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fee;
    color: #e74c3c;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
    margin-right: 8px;
}

.contact-delete-btn:hover {
    background: #e74c3c;
    color: white;
}
    border-radius: 0 var(--radius) var(--radius) 0;
    z-index: 0;
}

.contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--gray);
}

.contact-info {
    flex: 1;
}

.contact-name {
    font-weight: 500;
    color: var(--dark);
}

.contact-preview {
    font-size: 0.85rem;
    color: var(--gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-unread {
    background: var(--error);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
}

.messages-chat {
    flex: 1;
    padding-left: 15px;
    display: flex;
    flex-direction: column;
}

.chat-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray);
}

.chat-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.chat-header {
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.chat-message {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.chat-message.own {
    flex-direction: row-reverse;
}

.chat-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--gray);
    flex-shrink: 0;
}

.chat-message-content {
    max-width: 70%;
}

.chat-message-bubble {
    padding: 10px 15px;
    border-radius: 18px;
    background: #f1f2f6;
    color: var(--dark);
}

.chat-message.own .chat-message-bubble {
    background: var(--primary);
    color: white;
}

.chat-message-time {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 5px;
    text-align: right;
}

.chat-message-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 5px;
}

.chat-message-meta .chat-message-time {
    margin-top: 0;
}

.chat-message-read {
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
}

.chat-message-read.read {
    color: #4facfe;
}

.chat-message-read.unread {
    color: var(--gray);
}

.chat-input-area {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.chat-input-area input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
}

.chat-input-area input:focus {
    border-color: var(--primary);
}

.profile-sidebar h3 {
    margin-bottom: 5px;
}

.profile-points {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.profile-points i {
    color: var(--accent);
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.profile-stat {
    text-align: center;
}

.profile-stat span {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.profile-stat label {
    color: var(--gray);
    font-size: 0.85rem;
}

.profile-content {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.profile-tabs,
.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    color: var(--gray);
    position: relative;
    transition: color 0.3s;
}

.tab-btn.active,
.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.settings-form {
    max-width: 400px;
}

/* 后台管理 */
.admin-container {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.admin-container h2 {
    margin-bottom: 25px;
}

.admin-search {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.admin-search input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-sm);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    font-weight: 600;
    color: var(--gray);
    font-size: 0.9rem;
}

.admin-table img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.admin-table .btn {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-large {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--dark);
}

.auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid #eee;
}

.auth-tab {
    flex: 1;
    padding: 15px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    color: var(--gray);
    position: relative;
    transition: color 0.3s;
}

.auth-tab.active {
    color: var(--primary);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
}

.form-error {
    color: var(--error);
    font-size: 0.9rem;
    margin-bottom: 15px;
    min-height: 20px;
}

/* 照片详情 */
.photo-detail {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.photo-detail-image img {
    width: 100%;
    border-radius: var(--radius);
}

.photo-detail-info h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.photo-detail-info p {
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.8;
}

.photo-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
    padding: 15px;
    background: var(--light);
    border-radius: var(--radius-sm);
}

.photo-meta span {
    color: var(--gray);
    font-size: 0.9rem;
}

.photo-actions-row {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    align-items: center;
}

.photo-actions-row .btn {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.photo-actions-row .btn i {
    margin-right: 4px;
}

/* 旧的photo-actions样式保留兼容 */
.photo-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* 提示消息 */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--dark);
    color: white;
    padding: 15px 30px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: all 0.3s;
    z-index: 3000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast i {
    color: var(--success);
}

.toast.error i {
    color: var(--error);
}

/* 提示框 */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.alert-info {
    background: #e3f2fd;
    color: #1976d2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-success {
    background: #e8f5e9;
    color: #388e3c;
}

.alert-error {
    background: #ffebee;
    color: #d32f2f;
}

.alert-warning {
    background: #fff3e0;
    color: #f57c00;
}

/* 加载中 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

.loading i {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-image {
        order: -1;
    }
    
    .profile-container {
        grid-template-columns: 1fr;
    }
    
    .photo-detail {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-links {
        display: flex;
        gap: 15px;
        font-size: 0.9rem;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .nav-links li {
        flex-shrink: 0;
    }

    .nav-links a {
        padding: 5px 8px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .logo i {
        font-size: 1.4rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .qq-group-content {
        flex-direction: column;
    }
    
    .qq-info {
        text-align: center;
    }
}

/* 照片详情弹窗样式 */
.photo-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.photo-actions .btn-danger {
    background: var(--error);
    color: white;
    border-color: var(--error);
}

.photo-actions .btn-danger:hover {
    background: #c0392b;
}

#like-btn.liked {
    background: var(--error);
    color: white;
    border-color: var(--error);
}

#like-btn.liked i {
    font-weight: 900;
}

/* 评论区样式 */
.comments-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.comments-header h4 {
    margin: 0;
    color: var(--dark);
}

#comment-toggle-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.comments-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.comment-item {
    padding: 12px;
    background: var(--light);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: var(--primary);
}

.comment-author.clickable {
    cursor: pointer;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.comment-author.clickable:hover {
    opacity: 0.8;
}

.uploader-name {
    transition: color 0.2s;
}

.uploader-name:hover {
    color: var(--primary);
}

/* 上传者头像样式 */
.uploader-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.uploader-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

/* 聊天头部头像样式 */
.chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

/* 评论用户信息样式 */
.comment-user-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.comment-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.comment-time {
    font-size: 0.8rem;
    color: var(--gray);
}

.comment-content {
    color: var(--dark);
    line-height: 1.5;
}

.comment-actions {
    margin-top: 8px;
}

.comment-actions button {
    font-size: 0.8rem;
    padding: 4px 8px;
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
}

.comment-actions button:hover {
    color: var(--error);
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-sm);
    resize: vertical;
    font-family: inherit;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.comment-login-tip {
    text-align: center;
    padding: 15px;
    background: var(--light);
    border-radius: var(--radius-sm);
    color: var(--gray);
}

.comment-login-tip a {
    color: var(--primary);
    text-decoration: none;
}

@media (max-width: 480px) {
    .nav-container {
        height: 60px;
    }
    
    .nav-links {
        gap: 8px;
        font-size: 0.8rem;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .nav-links li {
        flex-shrink: 0;
    }

    .nav-links a {
        padding: 4px 6px;
    }
    
    .nav-links li:nth-child(1) a::before {
        content: '\f015';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        margin-right: 4px;
    }
    
    .logo span {
        display: none;
    }
    
    #login-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .photo-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    /* 手机端弹窗优化 */
    .modal {
        padding: 10px;
        align-items: flex-start;
    }
    
    .modal-content {
        padding: 20px;
        max-height: 95vh;
        margin: 10px 0;
    }
    
    .modal-large {
        max-height: 95vh;
    }
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-approved {
    background: #e8f5e9;
    color: #388e3c;
}

.status-pending {
    background: #fff3e0;
    color: #f57c00;
}

.status-rejected {
    background: #ffebee;
    color: #d32f2f;
}

/* 文本辅助 */
.text-muted {
    color: var(--gray);
    font-size: 0.9rem;
}

/* ===== 应用推荐导航链接 ===== */
.apps-nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--dark);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s;
}
.apps-nav-link:hover {
    color: var(--primary);
}
.apps-nav-link i {
    font-size: 0.9rem;
}

/* ===== 应用推荐列表页 ===== */
.apps-page-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.apps-page-header {
    text-align: center;
    margin-bottom: 48px;
}

.apps-page-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.apps-page-header p {
    color: var(--gray);
    font-size: 1.05rem;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.app-card {
    background: white;
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}

.app-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.app-card-coming {
    cursor: default;
    opacity: 0.7;
}

.app-card-coming:hover {
    transform: none;
    box-shadow: var(--shadow);
}

.app-card-icon {
    padding: 28px 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-icon-emoji {
    font-size: 3.2rem;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
}

.app-card-body {
    padding: 0 22px 16px;
    flex: 1;
}

.app-card-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 2px;
}

.app-card-tagline {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 10px;
}

.app-card-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 14px;
}

.app-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.app-tag {
    background: #f0f2f5;
    color: #555;
    font-size: 0.78rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.app-tag-lg {
    font-size: 0.85rem;
    padding: 4px 14px;
}

.app-card-footer {
    border-top: 1px solid #f0f0f0;
    padding: 12px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-card-author {
    font-size: 0.82rem;
    color: var(--gray);
}

.app-card-author i {
    margin-right: 4px;
}

.app-card-btn {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.app-card-coming-label {
    font-size: 0.82rem;
    color: var(--gray);
}

/* ===== 应用详情页 ===== */
.app-detail-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px 80px;
}

.app-detail-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.btn-back {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    transition: color 0.2s;
}

.btn-back:hover {
    color: var(--primary);
}

.btn-download {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102,126,234,0.5);
    color: white !important;
}

.app-detail-hero {
    background: white;
    border-radius: 20px;
    padding: 36px;
    display: flex;
    align-items: flex-start;
    gap: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.app-detail-icon {
    width: 90px;
    height: 90px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    flex-shrink: 0;
    box-shadow: 0 6px 20px rgba(102,126,234,0.3);
}

.app-detail-hero-info h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 6px;
}

.app-detail-subtitle {
    color: #666;
    font-size: 1rem;
    margin-bottom: 14px;
    line-height: 1.6;
}

.app-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.app-detail-meta span {
    font-size: 0.85rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 5px;
}

.app-detail-meta i {
    color: #667eea;
}

.app-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* 详情页各 section */
.app-detail-section {
    background: white;
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.app-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-section-title i {
    color: #667eea;
}

/* 快速开始步骤 */
.app-quickstart {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.quickstart-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.step-num {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.step-content strong {
    color: var(--dark);
    font-size: 0.95rem;
    display: block;
    margin-bottom: 3px;
}

.step-content p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.step-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #667eea;
}

/* 功能卡片网格 */
.app-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.feature-card {
    background: #f8f9ff;
    border-radius: 14px;
    padding: 20px 20px 16px;
    border: 1px solid #eeefff;
}

.feature-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    font-size: 0.85rem;
    color: #555;
    padding: 3px 0;
    padding-left: 14px;
    position: relative;
}

.feature-list li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: 700;
}

/* 同步步骤 */
.app-sync-steps {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.sync-step {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9ff;
    border: 1px solid #eeefff;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 0.88rem;
    color: var(--dark);
}

.sync-step i {
    color: #667eea;
    font-size: 1rem;
}

.sync-arrow {
    color: #c0c8e8;
    font-size: 1rem;
}

.sync-note {
    background: #f0f4ff;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    color: #555;
}

.sync-note i {
    color: #667eea;
    margin-top: 2px;
    flex-shrink: 0;
}

/* 数据存储 */
.data-storage-box {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 20px 24px;
    border: 1px solid #eeefff;
}

.storage-path {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e8eaf6;
}

.storage-path i {
    color: #667eea;
    font-size: 1.1rem;
}

.storage-path code {
    background: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.88rem;
    color: #667eea;
    border: 1px solid #dde2ff;
}

.storage-files {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.storage-file {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: #555;
}

.storage-file i {
    color: #667eea;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.faq-q {
    background: #f8f9ff;
    padding: 12px 18px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.faq-q i {
    color: #667eea;
}

.faq-a {
    background: white;
    padding: 12px 18px;
    font-size: 0.88rem;
    color: #666;
    line-height: 1.6;
}

/* 技术支持 */
.app-support-section {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 18px 28px !important;
    background: #f8f9ff !important;
    border: 1px solid #eeefff;
    font-size: 0.9rem;
    color: #666;
}

.app-support-section i {
    color: #667eea;
}

.app-support-section a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.app-support-section a:hover {
    text-decoration: underline;
}

.support-slogan {
    margin-left: auto;
    color: var(--gray);
    font-style: italic;
}

/* 底部下载 */
.app-detail-download-footer {
    text-align: center;
    padding: 40px 0 0;
}

.btn-download-lg {
    font-size: 1.1rem !important;
    padding: 14px 40px !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    box-shadow: 0 6px 25px rgba(102,126,234,0.45) !important;
}

.download-hint {
    margin-top: 12px;
    color: var(--gray);
    font-size: 0.88rem;
}

@media (max-width: 600px) {
    .app-detail-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px 20px;
    }
    .app-detail-meta {
        justify-content: center;
    }
    .app-detail-tags {
        justify-content: center;
    }
    .app-sync-steps {
        flex-direction: column;
        align-items: flex-start;
    }
    .sync-arrow {
        transform: rotate(90deg);
    }
    .app-detail-topbar {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    .apps-page-header h2 {
        font-size: 1.5rem;
    }
    .app-features-grid {
        grid-template-columns: 1fr;
    }
}
