/* ============================================
   帕鲁大世界 - 门户页面样式
   移动端优先设计
   ============================================ */

:root {
    --pw-hub-primary: #6c5ce7;
    --pw-hub-primary-light: #a29bfe;
    --pw-hub-primary-dark: #5348c0;
    --pw-hub-accent: #fd79a8;
    --pw-hub-bg: #f5f6fa;
    --pw-hub-card-bg: #ffffff;
    --pw-hub-text: #2d3436;
    --pw-hub-text-secondary: #636e72;
    --pw-hub-text-muted: #b2bec3;
    --pw-hub-border: #dfe6e9;
    --pw-hub-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --pw-hub-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --pw-hub-radius: 16px;
    --pw-hub-radius-sm: 10px;
}

/* 暗色主题 */
body.dark-theme {
    --pw-hub-bg: #1a1a2e;
    --pw-hub-card-bg: #16213e;
    --pw-hub-text: #e0e0e0;
    --pw-hub-text-secondary: #a0a0b0;
    --pw-hub-text-muted: #606070;
    --pw-hub-border: #2a2a4a;
    --pw-hub-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --pw-hub-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* 主容器 */
.pw-hub {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 0 40px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    color: var(--pw-hub-text);
    box-sizing: border-box;
}

.pw-hub * {
    box-sizing: border-box;
}

/* ============================================
   Hero 区域
   ============================================ */
.pw-hub-hero {
    position: relative;
    border-radius: var(--pw-hub-radius);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--pw-hub-shadow);
}

.pw-hub-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 40%, #fd79a8 100%);
    z-index: 0;
}

.pw-hub-hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(255,255,255,0.1) 0%, transparent 40%);
}

.pw-hub-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.2) 100%);
}

.pw-hub-hero-content {
    position: relative;
    z-index: 1;
    padding: 32px 24px;
    text-align: center;
    color: #fff;
}

.pw-hub-hero-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.pw-hub-hero-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(255,255,255,0.2);
}

.pw-hub-hero-title h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    letter-spacing: 1px;
}

.pw-hub-hero-subtitle {
    margin: 0 0 24px;
    font-size: 14px;
    opacity: 0.9;
    font-weight: 400;
}

.pw-hub-hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pw-hub-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.pw-hub-stat-value {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
}

.pw-hub-stat-label {
    font-size: 11px;
    opacity: 0.85;
    margin-top: 2px;
}

.pw-hub-stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,0.25);
    margin: 0 4px;
}

/* ============================================
   区块通用
   ============================================ */
.pw-hub-section {
    margin-bottom: 24px;
}

.pw-hub-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.pw-hub-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--pw-hub-text);
    margin: 0 0 12px;
    padding-left: 12px;
    border-left: 3px solid var(--pw-hub-primary);
    line-height: 1.4;
}

.pw-hub-section-header .pw-hub-section-title {
    margin: 0;
}

/* ============================================
   功能导航卡片
   ============================================ */
.pw-hub-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.pw-hub-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--pw-hub-card-bg);
    border-radius: var(--pw-hub-radius-sm);
    box-shadow: var(--pw-hub-shadow);
    text-decoration: none;
    color: var(--pw-hub-text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.pw-hub-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 0;
    transition: opacity 0.3s;
}

.pw-hub-card-server::before { background: linear-gradient(90deg, #00b894, #00cec9); }
.pw-hub-card-task::before { background: linear-gradient(90deg, #6c5ce7, #a29bfe); }
.pw-hub-card-shop::before { background: linear-gradient(90deg, #fd79a8, #e84393); }
.pw-hub-card-detail::before { background: linear-gradient(90deg, #fdcb6e, #e17055); }
.pw-hub-card-wiki::before { background: linear-gradient(90deg, #0984e3, #74b9ff); }
.pw-hub-card-pass::before { background: linear-gradient(90deg, #e17055, #d63031); }

.pw-hub-card:not(.pw-hub-card-disabled):hover,
.pw-hub-card:not(.pw-hub-card-disabled):active {
    transform: translateY(-3px);
    box-shadow: var(--pw-hub-shadow-hover);
}

.pw-hub-card:not(.pw-hub-card-disabled):hover::before,
.pw-hub-card:not(.pw-hub-card-disabled):active::before {
    opacity: 1;
}

.pw-hub-card-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pw-hub-card-server .pw-hub-card-icon { background: linear-gradient(135deg, #00b894, #00cec9); }
.pw-hub-card-task .pw-hub-card-icon { background: linear-gradient(135deg, #6c5ce7, #a29bfe); }
.pw-hub-card-shop .pw-hub-card-icon { background: linear-gradient(135deg, #fd79a8, #e84393); }
.pw-hub-card-detail .pw-hub-card-icon { background: linear-gradient(135deg, #fdcb6e, #e17055); }
.pw-hub-card-wiki .pw-hub-card-icon { background: linear-gradient(135deg, #0984e3, #74b9ff); }
.pw-hub-card-pass .pw-hub-card-icon { background: linear-gradient(135deg, #e17055, #d63031); }

.pw-hub-card-icon svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

.pw-hub-card-body {
    flex: 1;
    min-width: 0;
}

.pw-hub-card-body h4 {
    margin: 0 0 2px;
    font-size: 15px;
    font-weight: 700;
    color: var(--pw-hub-text);
}

.pw-hub-card-body p {
    margin: 0;
    font-size: 12px;
    color: var(--pw-hub-text-secondary);
    line-height: 1.4;
}

.pw-hub-card-arrow {
    flex-shrink: 0;
    font-size: 20px;
    color: var(--pw-hub-text-muted);
    font-weight: 300;
    line-height: 1;
}

.pw-hub-card-badge {
    flex-shrink: 0;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(108, 92, 231, 0.1);
    color: var(--pw-hub-primary);
}

.pw-hub-card-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

body.dark-theme .pw-hub-card-badge {
    background: rgba(108, 92, 231, 0.2);
}

/* ============================================
   每日任务概览
   ============================================ */
.pw-hub-daily-progress {
    font-size: 13px;
    font-weight: 700;
    color: var(--pw-hub-primary);
}

.pw-hub-daily-bar {
    width: 100%;
    height: 8px;
    background: var(--pw-hub-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.pw-hub-daily-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00b894, #00cec9);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.pw-hub-daily-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pw-hub-daily-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--pw-hub-card-bg);
    border-radius: var(--pw-hub-radius-sm);
    box-shadow: var(--pw-hub-shadow);
}

.pw-hub-daily-item-status {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.pw-hub-daily-item.done .pw-hub-daily-item-status {
    background: #00b894;
    color: #fff;
}

.pw-hub-daily-item.pending .pw-hub-daily-item-status {
    background: var(--pw-hub-border);
    color: var(--pw-hub-text-muted);
}

.pw-hub-daily-item-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--pw-hub-text);
}

.pw-hub-daily-item.done .pw-hub-daily-item-name {
    color: var(--pw-hub-text-muted);
    text-decoration: line-through;
}

.pw-hub-daily-item-reward {
    font-size: 11px;
    color: var(--pw-hub-text-secondary);
    background: var(--pw-hub-bg);
    padding: 2px 8px;
    border-radius: 4px;
}

/* ============================================
   赛季通行证概览
   ============================================ */
.pw-hub-pass-status {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(253, 121, 168, 0.1);
    color: #e84393;
}

.pw-hub-pass-card {
    padding: 16px;
    background: var(--pw-hub-card-bg);
    border-radius: var(--pw-hub-radius-sm);
    box-shadow: var(--pw-hub-shadow);
}

.pw-hub-pass-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pw-hub-pass-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
}

.pw-hub-pass-level-num {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.pw-hub-pass-level-label {
    font-size: 10px;
    opacity: 0.85;
    margin-top: 2px;
}

.pw-hub-pass-exp-info {
    flex: 1;
}

.pw-hub-pass-exp-bar {
    width: 100%;
    height: 10px;
    background: var(--pw-hub-border);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 4px;
}

.pw-hub-pass-exp-fill {
    height: 100%;
    background: linear-gradient(90deg, #6c5ce7, #a29bfe);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.pw-hub-pass-exp-text {
    font-size: 11px;
    color: var(--pw-hub-text-secondary);
}

/* ============================================
   快捷入口
   ============================================ */
.pw-hub-quick-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.pw-hub-quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 8px;
    background: var(--pw-hub-card-bg);
    border-radius: var(--pw-hub-radius-sm);
    box-shadow: var(--pw-hub-shadow);
    text-decoration: none;
    color: var(--pw-hub-text);
    transition: all 0.3s;
    cursor: pointer;
}

.pw-hub-quick-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--pw-hub-shadow-hover);
}

.pw-hub-quick-icon {
    font-size: 28px;
    line-height: 1;
}

.pw-hub-quick-link span:last-child {
    font-size: 12px;
    font-weight: 600;
    color: var(--pw-hub-text-secondary);
}

.pw-hub-quick-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pw-hub-quick-disabled:hover {
    transform: none;
    box-shadow: var(--pw-hub-shadow);
}

/* ============================================
   公告栏
   ============================================ */
.pw-hub-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.06), rgba(253, 121, 168, 0.06));
    border-radius: var(--pw-hub-radius-sm);
    border: 1px solid rgba(108, 92, 231, 0.12);
}

body.dark-theme .pw-hub-notice {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(253, 121, 168, 0.1));
    border-color: rgba(108, 92, 231, 0.2);
}

.pw-hub-notice-icon {
    flex-shrink: 0;
    font-size: 22px;
    line-height: 1.4;
}

.pw-hub-notice-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--pw-hub-text);
    margin-bottom: 2px;
}

.pw-hub-notice-text {
    font-size: 12px;
    color: var(--pw-hub-text-secondary);
    line-height: 1.5;
}

/* ============================================
   登录提示
   ============================================ */
.pw-hub-login-required {
    text-align: center;
    padding: 60px 20px;
}

.pw-hub-login-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.pw-hub-login-required h3 {
    font-size: 20px;
    color: var(--pw-hub-text);
    margin: 0 0 8px;
}

.pw-hub-login-required p {
    font-size: 14px;
    color: var(--pw-hub-text-secondary);
    margin: 0 0 24px;
}

.pw-hub-login-btn {
    display: inline-block;
    padding: 12px 32px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    border-radius: 24px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.3s;
}

.pw-hub-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4);
}

/* ============================================
   加载动画
   ============================================ */
@keyframes pw-hub-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pw-hub-loading {
    animation: pw-hub-pulse 1.5s ease-in-out infinite;
}

/* ============================================
   Steam 绑定卡片
   ============================================ */
.pw-hub-bind-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.06), rgba(108, 92, 231, 0.06));
    border-radius: var(--pw-hub-radius-sm);
    border: 1px solid rgba(0, 184, 148, 0.15);
}

body.dark-theme .pw-hub-bind-card {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.1), rgba(108, 92, 231, 0.1));
    border-color: rgba(0, 184, 148, 0.2);
}

.pw-hub-bind-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #00b894, #00cec9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pw-hub-bind-icon svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

.pw-hub-bind-content {
    flex: 1;
    min-width: 0;
}

.pw-hub-bind-content h4 {
    margin: 0 0 2px;
    font-size: 15px;
    font-weight: 700;
    color: var(--pw-hub-text);
}

.pw-hub-bind-content p {
    margin: 0;
    font-size: 12px;
    color: var(--pw-hub-text-secondary);
    line-height: 1.4;
}

.pw-hub-bind-toggle {
    flex-shrink: 0;
    padding: 8px 20px;
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.pw-hub-bind-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.4);
}

.pw-hub-bind-form {
    flex: 1 1 100%;
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.pw-hub-bind-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--pw-hub-border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--pw-hub-card-bg);
    color: var(--pw-hub-text);
    outline: none;
    transition: border-color 0.3s;
}

.pw-hub-bind-form input:focus {
    border-color: var(--pw-hub-primary);
}

.pw-hub-bind-btn {
    flex-shrink: 0;
    padding: 10px 20px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.pw-hub-bind-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

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

/* ============================================
   响应式 - 平板
   ============================================ */
@media (min-width: 600px) {
    .pw-hub-hero-content {
        padding: 40px 32px;
    }

    .pw-hub-hero-title h2 {
        font-size: 32px;
    }

    .pw-hub-hero-subtitle {
        font-size: 15px;
    }

    .pw-hub-stat-value {
        font-size: 28px;
    }

    .pw-hub-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }

    .pw-hub-card {
        flex-direction: column;
        text-align: center;
        padding: 20px 12px;
    }

    .pw-hub-card-arrow {
        display: none;
    }

    .pw-hub-card-body p {
        white-space: normal;
    }

    .pw-hub-quick-links {
        grid-template-columns: repeat(6, 1fr);
    }

    .pw-hub-section-title {
        font-size: 18px;
    }
}

/* ============================================
   响应式 - 桌面
   ============================================ */
@media (min-width: 900px) {
    .pw-hub-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .pw-hub-hero-content {
        padding: 48px 40px;
    }

    .pw-hub-hero-title h2 {
        font-size: 36px;
    }

    .pw-hub-stat-value {
        font-size: 32px;
    }

    .pw-hub-stat {
        min-width: 100px;
    }
}
