/*
Theme Name: 梗嗨开放平台
Theme URI: https://sudda.cn
Author: 速哒哒
Author URI: https://sudda.cn
Description: 梗嗨开放平台WordPress主题
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: genhi
*/

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 主要容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

/* 头部样式 */
.site-header {
    background: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.site-branding {
    text-align: center;
    margin-bottom: 20px;
}

.site-title {
    font-size: 2em;
    margin: 0;
}

.site-title a {
    color: #333;
    text-decoration: none;
}

.site-description {
    color: #666;
    margin: 10px 0 0;
}

/* 导航菜单 */
.main-navigation {
    margin: 20px 0;
    background: #f8f9fa;
    padding: 10px 0;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.main-navigation a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.main-navigation a:hover {
    background: #e9ecef;
    color: #000;
}

/* 文章样式 */
.entry-header {
    margin-bottom: 20px;
}

.entry-title {
    font-size: 1.8em;
    margin: 0 0 10px;
}

.entry-title a {
    color: #333;
    text-decoration: none;
}

.entry-meta {
    color: #666;
    font-size: 0.9em;
}

.entry-meta span {
    margin-right: 15px;
}

.entry-content {
    margin: 20px 0;
}

.entry-content p {
    margin-bottom: 1.5em;
}

.entry-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 0.9em;
}

/* 侧边栏样式 */
.widget-area {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
}

.widget {
    margin-bottom: 30px;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.2em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

/* 分页导航 */
.navigation {
    margin: 30px 0;
    text-align: center;
}

.nav-links {
    display: inline-flex;
    gap: 10px;
}

.page-numbers {
    padding: 5px 10px;
    background: #f8f9fa;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.page-numbers.current {
    background: #007bff;
    color: #fff;
}

/* 404页面 */
.error-404 {
    text-align: center;
    padding: 50px 0;
}

.error-404 .page-title {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.error-404 .page-content {
    max-width: 600px;
    margin: 0 auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }

    .main-navigation ul {
        flex-direction: column;
        align-items: center;
    }

    .entry-title {
        font-size: 1.5em;
    }
}

/* 会员中心样式优化 */
.member-center {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f1c40f;
    --text-color: #2c3e50;
    --border-color: #ecf0f1;
    --bg-color: #f9fafb;
    --card-shadow: 0 2px 4px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    
    background-color: var(--bg-color);
    min-height: 100vh;
    padding: 2rem 0;
}

.member-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 侧边栏样式 */
.member-sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.user-info {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.avatar-wrap {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    position: relative;
}

.avatar-wrap img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    transition: var(--transition);
}

.avatar-wrap:hover img {
    transform: scale(1.05);
}

.user-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.user-role {
    color: var(--primary-color);
    font-size: 0.875rem;
}

.member-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.member-menu li {
    margin-bottom: 0.5rem;
}

.member-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.member-menu a:hover,
.member-menu a.active {
    background: var(--primary-color);
    color: #fff;
    transform: translateX(5px);
}

.member-menu a.active::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: var(--primary-color);
    border-radius: 2px;
}

.member-menu i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

/* 主内容区域 */
.member-content {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

/* 内容区域显示控制 */
.member-content > div[id^="member-"] {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.member-content > div[id^="member-"].active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* 仪表盘卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-title {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-desc {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52,152,219,0.1);
    outline: none;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--secondary-color);
    color: #fff;
}

.btn-success:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger-color);
    color: #fff;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* 文章列表样式 */
.post-list {
    display: grid;
    gap: 1.5rem;
}

.post-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition);
}

.post-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--card-shadow);
}

.post-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
}

.post-actions {
    display: flex;
    gap: 1rem;
}

/* 订单列表样式 */
.order-list {
    display: grid;
    gap: 1.5rem;
}

.order-item {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.order-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--card-shadow);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.order-number {
    font-weight: 500;
    color: var(--text-color);
}

.order-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.order-status.pending {
    background: #fff3cd;
    color: #856404;
}

.order-status.completed {
    background: #d4edda;
    color: #155724;
}

.order-status.failed {
    background: #f8d7da;
    color: #721c24;
}

/* 余额记录样式 */
.balance-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    border: 2px solid var(--primary-color);
}

.balance-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.balance-label {
    color: #666;
    font-size: 1rem;
}

.record-list {
    display: grid;
    gap: 1rem;
}

.record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.record-item:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.record-info {
    flex: 1;
}

.record-type {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.record-date {
    font-size: 0.875rem;
    color: #666;
}

.record-amount {
    font-weight: 600;
}

.record-amount.positive {
    color: var(--secondary-color);
}

.record-amount.negative {
    color: var(--danger-color);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .member-wrapper {
        grid-template-columns: 1fr;
    }
    
    .member-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .member-center {
        padding: 1rem 0;
    }
    
    .member-content {
        padding: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .balance-amount {
        font-size: 2rem;
    }

    .member-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .member-menu a {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

    .member-menu a.active::before {
        left: 0;
        top: auto;
        bottom: -0.5rem;
        width: 100%;
        height: 3px;
        transform: none;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.member-content > * {
    animation: fadeIn 0.3s ease-out;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(52,152,219,0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 提示框样式 */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* 标签输入样式 */
.tags-input {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-height: 45px;
}

.tag {
    display: inline-flex;
    align-items: center;
    background: var(--primary-color);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.tag .remove {
    margin-left: 0.5rem;
    cursor: pointer;
}

.tags-input input {
    border: none;
    outline: none;
    padding: 0.25rem;
    flex: 1;
    min-width: 120px;
}

/* 文件上传样式 */
.file-upload {
    position: relative;
    display: inline-block;
}

.file-upload input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.file-upload-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* 图片预览样式 */
.image-preview {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1rem;
    position: relative;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.image-preview:hover img {
    transform: scale(1.05);
}

/* 密码强度指示器 */
.password-strength {
    height: 4px;
    border-radius: 2px;
    margin-top: 0.5rem;
    background: #eee;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: var(--transition);
}

.strength-weak {
    background: var(--danger-color);
    width: 33.33%;
}

.strength-medium {
    background: var(--warning-color);
    width: 66.66%;
}

.strength-strong {
    background: var(--secondary-color);
    width: 100%;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.page-numbers:hover,
.page-numbers.current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.prev.page-numbers,
.next.page-numbers {
    width: auto;
    padding: 0 1rem;
    border-radius: 20px;
}

/* 工具提示 */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: rgba(0,0,0,0.8);
    color: #fff;
    border-radius: 4px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

[data-tooltip]:hover:before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* 内容切换动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.member-content > div[id^="member-"].active {
    animation: fadeInUp 0.3s ease forwards;
}

/* 确保内容区域最小高度 */
.member-content {
    min-height: 500px;
    position: relative;
}

/* 加载状态指示器 */
.content-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.content-loading.active {
    display: block;
}

/* 平滑滚动效果 */
html {
    scroll-behavior: smooth;
} 