/**
 * 幻兽帕鲁一键部署 — 游戏主题风格
 */
body.pw-body {
    background-color: #070b14;
    background-image:
        linear-gradient(180deg, rgba(7, 11, 20, 0.55) 0%, rgba(7, 11, 20, 0.72) 45%, rgba(7, 11, 20, 0.82) 100%),
        url('https://s1.guanxingyun.com/guanxingcloud/www/images/game/palworldbj.png');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
}

.pw-page {
    --pw-bg: transparent;
    --pw-bg-soft: rgba(12, 18, 32, 0.75);
    --pw-panel: rgba(14, 22, 38, 0.88);
    --pw-panel-border: rgba(56, 189, 248, 0.22);
    --pw-cyan: #38bdf8;
    --pw-cyan-glow: rgba(56, 189, 248, 0.45);
    --pw-amber: #fbbf24;
    --pw-amber-glow: rgba(251, 191, 36, 0.35);
    --pw-green: #34d399;
    --pw-red: #f87171;
    --pw-text: #e8f4ff;
    --pw-text-dim: #8ba3bc;
    --pw-text-muted: #5f7389;
    --pw-radius: 14px;
    --pw-radius-sm: 10px;
    --pw-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    --pw-font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--pw-bg);
    color: var(--pw-text);
    font-family: var(--pw-font);
    min-height: 100vh;
    overflow-x: hidden;
    background: transparent;
}

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

.pw-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Hero */
.pw-hero {
    position: relative;
    padding: 108px 0 72px;
    background: transparent;
    overflow: hidden;
}

.pw-hero-grid {
    position: relative;
    z-index: 1;
    display: block;
    max-width: 720px;
}

.pw-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: rgba(56, 189, 248, 0.08);
    color: var(--pw-cyan);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 18px;
}

.pw-badge i {
    font-size: 14px;
}

.pw-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.pw-hero h1 span {
    display: block;
    background: linear-gradient(135deg, #38bdf8 0%, #67e8f9 45%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pw-hero-desc {
    margin: 0 0 28px;
    max-width: 520px;
    font-size: 16px;
    line-height: 1.75;
    color: var(--pw-text-dim);
}

.pw-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.pw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.pw-btn:hover {
    transform: translateY(-2px);
}

.pw-btn-primary {
    color: #041018 !important;
    background: linear-gradient(135deg, #38bdf8 0%, #22d3ee 100%);
    box-shadow: 0 8px 28px var(--pw-cyan-glow);
}

.pw-btn-primary:hover {
    box-shadow: 0 12px 36px var(--pw-cyan-glow);
}

.pw-btn-ghost {
    color: var(--pw-text) !important;
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
}

.pw-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(56, 189, 248, 0.35);
}

.pw-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 520px;
}

.pw-stat {
    padding: 14px 16px;
    border-radius: var(--pw-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(6px);
}

.pw-stat strong {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: var(--pw-cyan);
    margin-bottom: 4px;
}

.pw-stat span {
    font-size: 12px;
    color: var(--pw-text-muted);
}

/* Shop module */
.pw-shop {
    padding: 56px 0 80px;
    margin-top: 16px;
}

.pw-shop-head {
    margin-bottom: 32px;
}

.pw-shop-title {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 700;
}

.pw-shop-sub {
    margin: 0;
    font-size: 14px;
    color: var(--pw-text-dim);
    line-height: 1.7;
}

.pw-shop-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.pw-shop-loading {
    grid-column: 1 / -1;
    padding: 28px 12px;
    text-align: center;
    color: var(--pw-text-muted);
    font-size: 14px;
}

.pw-shop-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    padding: 24px;
    border-radius: 14px;
    border: 1px solid var(--pw-panel-border);
    background: var(--pw-panel);
    color: var(--pw-text);
    text-align: left;
    box-shadow: var(--pw-shadow);
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

.pw-shop-card:hover {
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
}

.pw-shop-card.is-recommended {
    border-color: rgba(251, 191, 36, 0.45);
    background: linear-gradient(180deg, #121c30 0%, #0e1626 100%);
}

.pw-shop-card-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    color: #fcd34d;
    border: 1px solid rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.1);
}

.pw-shop-card-promo {
    display: inline-flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.14);
    border: 1px solid rgba(251, 191, 36, 0.35);
    color: #fbbf24;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.pw-shop-card-name {
    font-size: 17px;
    font-weight: 700;
    padding-right: 52px;
}

.pw-shop-card-players {
    font-size: 14px;
    color: var(--pw-cyan);
    margin-top: -4px;
}

.pw-shop-card-specs {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}

.pw-shop-card-specs li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: var(--pw-text-dim);
}

.pw-shop-card-specs strong {
    color: var(--pw-text);
    font-weight: 600;
}

.pw-shop-card-desc {
    min-height: 0;
    font-size: 13px;
    color: var(--pw-text-muted);
    line-height: 1.6;
    margin-top: 2px;
}

.pw-shop-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pw-shop-card-price {
    font-size: 20px;
    font-weight: 700;
    color: #fbbf24;
    line-height: 1.2;
}

.pw-shop-price-pending {
    display: inline-block;
    min-width: 72px;
    letter-spacing: 0.18em;
    color: rgba(251, 191, 36, 0.55);
    animation: pwShopPricePulse 1.2s ease-in-out infinite;
}

@keyframes pwShopPricePulse {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
}

.pw-shop-card-cycle {
    margin-left: 2px;
    font-size: 13px;
    font-weight: 500;
    color: var(--pw-text-dim);
    font-style: normal;
}

.pw-shop-card-buy {
    flex-shrink: 0;
    min-width: 118px;
    padding: 10px 16px;
    font-size: 14px;
}

/* Main layout */
.pw-main {
    padding: 0 0 40px;
    margin-top: -28px;
    position: relative;
    z-index: 2;
}

.pw-main-grid {
    display: block;
}

/* Console panel */
.pw-console {
    border-radius: var(--pw-radius);
    border: 1px solid var(--pw-panel-border);
    background: var(--pw-panel);
    box-shadow: var(--pw-shadow);
    backdrop-filter: blur(14px);
    overflow: hidden;
}

.pw-console-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px 20px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.08) 0%, transparent 100%);
}

.pw-console-head-main {
    flex: 1 1 420px;
    min-width: 0;
}

.pw-console-sub {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--pw-text-dim);
    line-height: 1.7;
    max-width: 680px;
}

.pw-console-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pw-console-meta li {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--pw-text-muted);
    line-height: 1.5;
}

.pw-console-meta li i {
    color: var(--pw-cyan);
    font-size: 13px;
}

.pw-console-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

.pw-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.1);
    color: #fcd34d;
}

.pw-tag i {
    font-size: 13px;
}

.pw-console-title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pw-console-title i {
    color: var(--pw-cyan);
    font-size: 22px;
}

.pw-tabs {
    display: flex;
    gap: 0;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.18);
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    overflow: visible;
}

.pw-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 18px 12px;
    border: none;
    background: transparent;
    color: var(--pw-text-dim);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.15s;
    position: relative;
    outline: none;
}

.pw-tab:hover {
    color: var(--pw-cyan);
}

.deploy-tab-btn.is-disabled,
.deploy-tab-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    pointer-events: none;
}

/* 选中态：以 data-active-tab 为主，避免 border 被 overflow/重绘裁切 */
.deploy-has-servers-wrap[data-active-tab="online"] .deploy-tab-btn[data-target="online"],
.deploy-has-servers-wrap[data-active-tab="deployed"] .deploy-tab-btn[data-target="deployed"],
.pw-tab.is-active {
    color: var(--pw-cyan);
}

.deploy-has-servers-wrap[data-active-tab="online"] .deploy-tab-btn[data-target="online"]::after,
.deploy-has-servers-wrap[data-active-tab="deployed"] .deploy-tab-btn[data-target="deployed"]::after,
.pw-tab.is-active::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 2px;
    background: var(--pw-cyan);
    border-radius: 2px 2px 0 0;
    box-shadow: 0 0 10px var(--pw-cyan-glow);
    pointer-events: none;
    z-index: 1;
}

.pw-deploy-body,
.pw-deployed-wrap {
    padding: 22px 24px 26px;
    min-height: 120px;
}

/* 默认显示在线部署；仅切到「我的服务器」时隐藏表单，避免 Tab 状态偶发不同步导致整块空白 */
.pw-deploy-body {
    display: block;
}

.pw-deployed-wrap {
    display: none;
}

.deploy-has-servers-wrap[data-active-tab="deployed"] .pw-deploy-online-shell {
    display: none !important;
}

.deploy-has-servers-wrap[data-active-tab="deployed"] .pw-deploy-body {
    display: none !important;
}

.deploy-has-servers-wrap[data-active-tab="deployed"] .pw-deployed-wrap {
    display: block !important;
}

.deploy-has-servers-wrap {
    min-height: 200px;
}

.pw-deploy-online-shell {
    position: relative;
}

.pw-deploy-online-shell.is-progress-active .pw-deploy-body {
    display: none !important;
}

.pw-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: var(--pw-radius-sm);
    border: 1px solid rgba(251, 191, 36, 0.28);
    background: rgba(251, 191, 36, 0.08);
    color: #fde68a;
    font-size: 13px;
    line-height: 1.6;
}

.pw-notice i {
    margin-top: 2px;
    flex-shrink: 0;
}

.pw-form-section {
    margin-bottom: 22px;
    padding-bottom: 22px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.pw-form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.pw-form-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 700;
    color: var(--pw-text);
}

.pw-form-section-title i {
    color: var(--pw-amber);
    font-size: 17px;
}

.pw-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.pw-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.pw-field--full {
    grid-column: 1 / -1;
}

.pw-field-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--pw-text-dim);
}

.pw-field-label .is-required {
    color: var(--pw-red);
}

.pw-field input,
.pw-field select {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--pw-radius-sm);
    font-size: 14px;
    color: var(--pw-text);
    background: rgba(0, 0, 0, 0.28);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pw-field input::placeholder {
    color: var(--pw-text-muted);
}

.pw-field input:focus,
.pw-field select:focus {
    outline: none;
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.pw-field select option {
    background: #0f172a;
    color: var(--pw-text);
}

/* Searchable host select */
.pw-host-select-wrap {
    position: relative;
    width: 100%;
}

.pw-host-search-wrap {
    position: relative;
    width: 100%;
}

.pw-host-search {
    width: 100%;
    height: 42px;
    padding: 0 40px 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--pw-radius-sm);
    font-size: 14px;
    color: var(--pw-text);
    background: rgba(0, 0, 0, 0.28);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, border-radius 0.15s;
}

.pw-host-search::placeholder {
    color: var(--pw-text-muted);
}

.pw-host-search:focus {
    outline: none;
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.pw-host-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pw-text-muted);
    font-size: 15px;
    pointer-events: none;
}

.pw-host-select-wrap.is-open .pw-host-search {
    border-color: rgba(56, 189, 248, 0.55);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.pw-host-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 120;
    display: none;
    max-height: 280px;
    overflow-y: auto;
    background: rgba(10, 16, 28, 0.98);
    border: 1px solid rgba(56, 189, 248, 0.45);
    border-top: none;
    border-radius: 0 0 var(--pw-radius-sm) var(--pw-radius-sm);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
}

.pw-host-select-wrap.is-open .pw-host-dropdown {
    display: block;
}

.pw-host-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 14px;
    font-size: 13px;
    color: var(--pw-text-dim);
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s, color 0.15s;
}

.pw-host-option:last-child {
    border-bottom: none;
}

.pw-host-option:hover {
    background: rgba(56, 189, 248, 0.1);
    color: var(--pw-text);
}

.pw-host-option.is-selected {
    background: rgba(56, 189, 248, 0.16);
    color: var(--pw-cyan);
}

.pw-host-option.is-empty {
    cursor: default;
    justify-content: center;
    color: var(--pw-text-muted);
}

.pw-host-option.is-empty:hover {
    background: transparent;
    color: var(--pw-text-muted);
}

.pw-host-option-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pw-host-option-tag {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}

.pw-host-option-tag.is-ready {
    background: rgba(52, 211, 153, 0.16);
    color: #6ee7b7;
}

.pw-host-option-tag.is-warn {
    background: rgba(251, 191, 36, 0.16);
    color: #fcd34d;
}

.pw-host-option-tag.is-bad {
    background: rgba(248, 113, 113, 0.16);
    color: #fca5a5;
}

.pw-host-select-native {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.pw-field-hint {
    font-size: 12px;
    color: var(--pw-text-muted);
    line-height: 1.5;
}

.pw-field-hint.is-fast {
    color: #6ee7b7;
}

.pw-field-hint.is-reinstalling {
    color: #fcd34d;
    line-height: 1.6;
}

.pw-field-hint.is-checking {
    color: #7dd3fc;
    line-height: 1.6;
}

.pw-field-hint.is-power-off {
    color: #fca5a5;
    line-height: 1.6;
}

.pw-field-hint.is-reinstalling::before,
.pw-field-hint.is-checking::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 8px;
    border-radius: 50%;
    vertical-align: middle;
    box-sizing: border-box;
}

.pw-field-hint.is-reinstalling::before {
    border: 2px solid rgba(251, 191, 36, 0.25);
    border-top-color: #fbbf24;
    background: transparent;
    animation: pw-reinstall-spin 0.75s linear infinite;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
}

.pw-field-hint.is-checking::before {
    border: 2px solid rgba(56, 189, 248, 0.25);
    border-top-color: #38bdf8;
    background: transparent;
    animation: pw-reinstall-spin 0.75s linear infinite;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

.pw-field-hint.is-power-off::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: #f87171;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.55);
    vertical-align: middle;
}

@keyframes pw-reinstall-spin {
    to { transform: rotate(360deg); }
}

@keyframes pw-reinstall-pulse {
    0%, 100% { opacity: 0.35; transform: scale(0.92); }
    50% { opacity: 1; transform: scale(1); }
}

.pw-preinstall-guide {
    display: none;
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: rgba(12, 74, 110, 0.28);
    color: #bae6fd;
    font-size: 13px;
    line-height: 1.6;
}

.pw-preinstall-guide.is-required.is-visible {
    border-color: rgba(251, 191, 36, 0.45);
    background: rgba(120, 53, 15, 0.28);
    color: #fde68a;
}

.pw-deploy-form-area.is-blocked {
    opacity: 0.45;
    pointer-events: none;
    user-select: none;
}

.pw-preinstall-guide.is-visible {
    display: block;
}

.pw-preinstall-text {
    margin: 0 0 12px;
}

.pw-preinstall-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pw-reinstall-warn {
    display: none;
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid rgba(248, 113, 113, 0.35);
    background: rgba(127, 29, 29, 0.22);
    color: #fecaca;
    font-size: 13px;
    line-height: 1.6;
}

.pw-reinstall-warn.is-visible {
    display: block;
}

.pw-reinstall-text {
    margin: 0 0 12px;
}

.pw-reinstall-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pw-reinstall-warn .deploy-reinstall-btn,
.pw-reinstall-warn .deploy-detail-btn {
    margin: 0;
}

.pw-form-actions {
    padding-top: 10px;
}

.pw-form-actions .pw-btn-primary {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
}

/* Progress HUD */
.pw-progress-wrap {
    display: none;
    margin: 0;
    padding: 22px 24px 24px;
    border-top: 1px solid rgba(56, 189, 248, 0.18);
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.05) 0%, rgba(0, 0, 0, 0.12) 100%);
}

.pw-deploy-online-shell .pw-progress-wrap.is-visible {
    display: block;
    position: static;
    z-index: 1;
    border-top: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 0 0 var(--pw-radius) var(--pw-radius);
    background: linear-gradient(180deg, rgba(10, 28, 48, 0.97) 0%, rgba(6, 16, 28, 0.98) 100%);
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.22);
}

.pw-progress-wrap.is-visible {
    display: block;
}

#progress_card.is-visible {
    border-top: none;
}

#progress_card.is-finished .pw-progress-title i {
    animation: none;
}

.pw-progress-wrap.is-finished {
    margin-top: 0;
}

.pw-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.pw-progress-eta {
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--pw-text-dim);
    line-height: 1.6;
}

.pw-progress-eta:empty {
    display: none;
}

.pw-progress-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.pw-progress-title i {
    color: var(--pw-cyan);
    animation: pw-spin 1.2s linear infinite;
}

@keyframes pw-spin {
    to { transform: rotate(360deg); }
}

.pw-progress-main {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    margin-bottom: 16px;
}

.pw-progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
}

.pw-progress-ring svg {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

.pw-progress-ring-track,
.pw-progress-ring-bar {
    fill: none;
    stroke-width: 8;
}

.pw-progress-ring-track {
    stroke: rgba(255, 255, 255, 0.08);
}

.pw-progress-ring-bar {
    stroke: #38bdf8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.35s ease;
    filter: drop-shadow(0 0 8px var(--pw-cyan-glow));
}

.pw-progress-ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-weight: 800;
    color: var(--pw-cyan);
    text-shadow: 0 0 18px var(--pw-cyan-glow);
}

.pw-progress-ring-text span {
    font-size: 30px;
    line-height: 1;
}

.pw-progress-ring-text small {
    font-size: 14px;
    margin-top: 8px;
    color: var(--pw-text-dim);
}

.pw-progress-info {
    min-width: 0;
}

.pw-progress-status {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--pw-text);
    line-height: 1.5;
}

.pw-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.pw-progress-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, #0ea5e9 0%, #38bdf8 50%, #fbbf24 100%);
    border-radius: 999px;
    box-shadow: 0 0 16px var(--pw-cyan-glow);
    transition: width 0.35s ease;
}

.pw-progress-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pw-progress-steps li {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--pw-text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
}

.pw-progress-steps li.is-done {
    color: #a5f3fc;
    border-color: rgba(56, 189, 248, 0.25);
    background: rgba(56, 189, 248, 0.08);
}

.pw-progress-steps li.is-active {
    color: #041018;
    font-weight: 700;
    border-color: transparent;
    background: linear-gradient(135deg, #38bdf8 0%, #22d3ee 100%);
    box-shadow: 0 4px 14px var(--pw-cyan-glow);
}

.pw-progress-log-wrap {
    border-radius: var(--pw-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.pw-progress-log-wrap summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--pw-text-dim);
    cursor: pointer;
    user-select: none;
    list-style: none;
}

.pw-progress-log-wrap summary::-webkit-details-marker {
    display: none;
}

.pw-progress-log-wrap summary i {
    color: var(--pw-cyan);
}

.pw-progress-log-wrap[open] summary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--pw-text);
}

.pw-progress-log {
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 220px;
    overflow-y: auto;
    background: #020617;
    color: #93c5fd;
    padding: 14px 16px;
}

.pw-result {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: var(--pw-radius-sm);
    font-size: 14px;
    line-height: 1.6;
}

.pw-result--success {
    background: rgba(52, 211, 153, 0.1);
    color: #6ee7b7;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.pw-result--error {
    background: rgba(248, 113, 113, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.pw-result code {
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 6px;
    color: var(--pw-cyan);
    font-family: Consolas, Monaco, monospace;
}

.pw-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.pw-result-actions .pw-btn {
    min-height: 40px;
    padding: 0 18px;
}

.pw-btn-danger {
    color: #fff !important;
    background: rgba(248, 113, 113, 0.2) !important;
    border-color: rgba(248, 113, 113, 0.45) !important;
}

.pw-btn-danger:hover {
    background: rgba(248, 113, 113, 0.32) !important;
}

/* Deployed servers */
.pw-deployed-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pw-deployed-head-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: var(--pw-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pw-deployed-head-title i {
    color: var(--pw-cyan);
}

.pw-deployed-head-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--pw-text-dim);
    max-width: 560px;
}

.pw-deployed-count {
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pw-text-muted);
    letter-spacing: 0.04em;
}

.pw-deployed-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pw-deployed-card {
    padding: 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0.22) 100%);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.pw-deployed-card:hover {
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 10px 28px rgba(56, 189, 248, 0.1);
    transform: translateY(-1px);
}

.pw-deployed-card-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.pw-deployed-card-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(56, 189, 248, 0.12);
    color: var(--pw-cyan);
    font-size: 22px;
}

.pw-deployed-card-main {
    flex: 1;
    min-width: 0;
}

.pw-deployed-card-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: var(--pw-text);
    line-height: 1.35;
    word-break: break-word;
}

.pw-deployed-card-sub {
    margin: 0;
    font-size: 12px;
    color: var(--pw-text-muted);
    line-height: 1.5;
}

.pw-deployed-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.pw-deployed-info {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.18);
}

.pw-deployed-info--wide {
    grid-column: 1 / -1;
}

.pw-deployed-info-label {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--pw-text-muted);
    letter-spacing: 0.04em;
}

.pw-deployed-info strong {
    font-size: 14px;
    color: var(--pw-text);
    line-height: 1.4;
}

.pw-deployed-mini-bar {
    height: 4px;
    margin-top: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.pw-deployed-mini-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #34d399, #6ee7b7);
}

.pw-deployed-connect-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.pw-deployed-connect-row code {
    flex: 1;
    min-width: 0;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(56, 189, 248, 0.12);
    color: var(--pw-cyan);
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    word-break: break-all;
}

.pw-deployed-empty {
    padding: 36px 24px;
    text-align: center;
    border-radius: 14px;
    border: 1px dashed rgba(56, 189, 248, 0.2);
    background: rgba(255, 255, 255, 0.02);
}

.pw-deployed-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.1);
    color: var(--pw-cyan);
    font-size: 26px;
}

.pw-deployed-empty-title {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--pw-text);
}

.pw-deployed-empty-desc {
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.65;
    color: var(--pw-text-dim);
}

.pw-deployed-item {
    padding: 16px 18px;
    border-radius: var(--pw-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.22);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pw-deployed-item:hover {
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.08);
}

.pw-deployed-item-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--pw-text);
    margin-bottom: 0;
}

.pw-deployed-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.pw-deployed-status {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    border: 1px solid transparent;
}

.pw-deployed-status.is-up {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.35);
}

.pw-deployed-status.is-down {
    color: #f87171;
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.35);
}

.pw-deployed-status.is-pending {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.25);
}

.pw-deployed-item-meta {
    font-size: 12px;
    color: var(--pw-text-muted);
    line-height: 1.6;
    margin-bottom: 4px;
}

.pw-deployed-item-meta code {
    padding: 2px 8px;
    background: rgba(56, 189, 248, 0.12);
    border-radius: 6px;
    color: var(--pw-cyan);
    font-family: Consolas, Monaco, monospace;
}

.pw-deployed-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pw-deployed-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pw-deployed-actions-main {
    width: 100%;
    display: flex;
    justify-content: center;
}

.pw-deployed-actions-main .deploy-panel-btn {
    width: min(100%, 360px);
    min-height: 44px;
    padding: 0 24px;
    font-size: 14px;
    font-weight: 700;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.22);
}

.pw-deployed-actions-quick {
    width: 100%;
    text-align: center;
}

.pw-deployed-actions-label {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--pw-text-muted);
    letter-spacing: 0.04em;
}

.pw-deployed-actions-btns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.pw-deployed-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pw-deployed-pagination-info {
    font-size: 13px;
    color: var(--pw-text-dim);
    text-align: center;
}

.pw-deployed-pagination-info strong {
    color: var(--pw-cyan);
    font-weight: 700;
}

.pw-deployed-pagination .deploy-page-btn {
    min-height: 36px;
    padding: 0 14px;
}

.pw-deployed-pagination .deploy-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pw-deployed-actions .pw-btn {
    min-height: 34px;
    padding: 0 14px;
    font-size: 12px;
    border-radius: 8px;
}

.pw-panel-mask {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(6px);
}

.pw-panel-mask.is-open {
    display: flex;
}

body.pw-panel-open {
    overflow: hidden;
}

.pw-panel {
    width: min(1180px, 100%);
    height: calc(100vh - 48px);
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    background: rgba(8, 14, 28, 0.96);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.pw-panel-tabs {
    display: flex;
    gap: 0;
    padding: 0 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.18);
    overflow-x: auto;
    flex-shrink: 0;
}

.pw-panel-body {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
    background: rgba(8, 14, 28, 0.96);
}

.pw-panel-pane {
    display: none;
    position: absolute;
    inset: 0;
    padding: 18px 20px 22px;
    overflow: hidden;
    box-sizing: border-box;
}

.pw-panel-pane.is-active {
    display: flex;
    flex-direction: column;
}

.pw-panel-pane[data-panel-pane="overview"].is-active {
    overflow-y: auto;
}

.pw-panel-pane[data-panel-pane="saves"].is-active {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.pw-panel-pane--config.is-active {
    padding: 0;
}

.pw-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.1) 0%, transparent 100%);
    flex-shrink: 0;
}

.pw-panel-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pw-panel-sub {
    margin: 0;
    font-size: 13px;
    color: var(--pw-text-muted);
}

.pw-panel-close {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--pw-text);
    cursor: pointer;
}

.pw-panel-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--pw-text-dim);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.pw-panel-tab.is-active {
    color: var(--pw-cyan);
    border-bottom-color: var(--pw-cyan);
}

.pw-panel-tab-tip {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 11px;
    font-weight: 500;
    color: var(--pw-text-muted);
    vertical-align: middle;
}

.pw-panel-tab.is-active .pw-panel-tab-tip {
    background: rgba(56, 189, 248, 0.15);
    color: #7dd3fc;
}

.pw-panel-beginner-guide {
    margin-bottom: 16px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(251, 191, 36, 0.28);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(56, 189, 248, 0.06) 100%);
}

.pw-panel-beginner-guide-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.pw-panel-beginner-guide-head strong {
    font-size: 15px;
    color: var(--pw-text);
}

.pw-panel-beginner-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.18);
    color: #fcd34d;
    font-size: 12px;
    font-weight: 700;
}

.pw-panel-beginner-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.pw-panel-beginner-steps li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.pw-panel-beginner-steps b {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    color: var(--pw-text);
}

.pw-panel-beginner-steps p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--pw-text-dim);
}

.pw-step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.18);
    color: var(--pw-cyan);
    font-size: 13px;
    font-weight: 800;
}

.pw-panel-actions-label {
    width: 100%;
    margin-bottom: 2px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pw-text-muted);
    letter-spacing: 0.04em;
}

.pw-panel-quick-actions {
    margin-top: 16px;
}

.pw-panel-pane[data-panel-pane="overview"] .pw-panel-quick-actions {
    justify-content: center;
}

.pw-panel-pane[data-panel-pane="overview"] .pw-panel-actions-label {
    text-align: center;
}

.pw-panel-save-box {
    padding: 18px 20px 22px;
}

.pw-panel-save-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.pw-panel-save-head strong {
    font-size: 16px;
    color: var(--pw-text);
}

.pw-panel-save-desc,
.pw-panel-save-tip,
.pw-panel-save-path {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.65;
    color: var(--pw-text-muted);
}

.pw-panel-save-info {
    margin-bottom: 16px;
}

.pw-panel-save-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pw-panel-save-stat {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(56, 189, 248, 0.18);
    background: rgba(8, 20, 40, 0.72);
}

.pw-panel-save-stat--wide {
    grid-column: 1 / -1;
}

.pw-panel-save-stat--empty {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px dashed rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.06);
}

.pw-panel-save-stat--empty i {
    font-size: 22px;
    color: var(--pw-amber);
    margin-top: 2px;
}

.pw-panel-save-stat-label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--pw-text-muted);
}

.pw-panel-save-stat strong {
    font-size: 15px;
    color: var(--pw-cyan);
    word-break: break-all;
}

.pw-panel-save-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.pw-save-import-label {
    cursor: pointer;
    margin: 0;
}

.pw-panel-save-import-opts {
    margin-bottom: 10px;
}

.pw-save-progress {
    display: none;
    margin: 14px 0 12px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    background: rgba(8, 18, 34, 0.88);
}

.pw-save-progress.is-active {
    display: block;
}

.pw-panel-save-box.is-busy .pw-panel-save-actions,
.pw-panel-save-box.is-busy .pw-save-import-label {
    opacity: 0.55;
    pointer-events: none;
}

.pw-save-progress-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.pw-save-progress-title {
    color: var(--pw-text);
    font-size: 14px;
}

.pw-save-progress-elapsed {
    font-size: 12px;
    color: var(--pw-text-muted);
}

.pw-save-progress-elapsed em,
.pw-save-progress-eta em,
.pw-save-progress-pct em {
    font-style: normal;
    color: var(--pw-cyan);
    font-weight: 600;
}

.pw-save-progress-bar-wrap {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.pw-save-progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0ea5e9, #38bdf8);
    transition: width 0.25s ease;
}

.pw-save-progress-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--pw-text-muted);
}

.pw-save-progress-phase {
    flex: 1;
    min-width: 140px;
    color: #dbeafe;
}

.pw-save-progress-detail {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--pw-text-muted);
}

.pw-panel-save-tip {
    margin-bottom: 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.22);
    color: #fde68a;
}

.pw-panel-save-guide {
    margin: 0 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    background: rgba(8, 20, 40, 0.55);
}

.pw-panel-save-guide > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #bae6fd;
    cursor: pointer;
    list-style: none;
    user-select: none;
    border-radius: 12px;
}

.pw-panel-save-guide[open] > summary {
    border-radius: 12px 12px 0 0;
}

.pw-panel-save-guide > summary::-webkit-details-marker {
    display: none;
}

.pw-panel-save-guide > summary::after {
    content: '展开';
    margin-left: auto;
    font-size: 12px;
    font-weight: 400;
    color: var(--pw-text-muted);
}

.pw-panel-save-guide[open] > summary::after {
    content: '收起';
}

.pw-panel-save-guide-body {
    padding: 0 14px 14px;
    border-top: 1px solid rgba(56, 189, 248, 0.12);
}

.pw-panel-save-guide-lead {
    margin: 12px 0 14px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--pw-text-muted);
}

.pw-panel-save-guide-section {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(4, 12, 28, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.pw-panel-save-guide-section--tips {
    border-color: rgba(251, 191, 36, 0.18);
    background: rgba(251, 191, 36, 0.04);
}

.pw-panel-save-guide-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--pw-text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.pw-panel-save-guide-steps,
.pw-panel-save-guide-list {
    margin: 0 0 10px;
    padding-left: 1.25rem;
    font-size: 13px;
    line-height: 1.75;
    color: var(--pw-text-muted);
}

.pw-panel-save-guide-steps li + li,
.pw-panel-save-guide-list li + li {
    margin-top: 6px;
}

.pw-panel-save-guide-note {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--pw-text-muted);
}

.pw-panel-save-guide-crumb {
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px dashed rgba(56, 189, 248, 0.25);
    font-size: 13px;
    line-height: 1.8;
    color: #cbd5e1;
    word-break: break-all;
}

.pw-panel-save-guide-crumb strong {
    color: #7dd3fc;
    font-weight: 600;
}

.pw-panel-save-guide-path {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(56, 189, 248, 0.15);
}

.pw-panel-save-guide-path-code {
    flex: 1 1 220px;
    min-width: 0;
    font-size: 12px;
    line-height: 1.55;
    color: #7dd3fc;
    word-break: break-all;
}

.pw-panel-save-guide kbd {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    font-size: 12px;
    font-family: inherit;
    color: #e2e8f0;
}

.pw-panel-save-guide code {
    font-size: 12px;
    color: #bae6fd;
}

.pw-btn--xs {
    padding: 4px 10px;
    font-size: 12px;
    min-height: 28px;
}

.pw-panel-save-path code {
    font-size: 12px;
    color: #bae6fd;
}

.pw-panel-config-toolbar {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 14px 18px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 14, 28, 0.98);
    backdrop-filter: blur(8px);
}

.pw-panel-config-toolbar-hint {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--pw-text-muted);
}

.pw-panel-config-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pw-panel-config-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.pw-panel-config-restart-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7a8f;
    line-height: 1.4;
}

.pw-panel-config-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 18px 20px;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.pw-panel-config-body.is-saving .pw-panel-config-quick,
.pw-panel-config-body.is-saving .pw-panel-config--advanced {
    pointer-events: none;
    user-select: none;
}

.pw-config-saving {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 30;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(6, 12, 24, 0.78);
    backdrop-filter: blur(6px);
}

.pw-config-saving.is-active {
    display: flex;
    animation: pw-config-saving-fade-in 0.25s ease;
}

@keyframes pw-config-saving-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pw-config-saving-card {
    width: min(100%, 360px);
    padding: 24px 22px 20px;
    border-radius: 16px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: linear-gradient(160deg, rgba(14, 30, 52, 0.96) 0%, rgba(8, 18, 34, 0.98) 100%);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(56, 189, 248, 0.08);
    text-align: center;
}

.pw-config-saving-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: 50%;
    border: 3px solid rgba(56, 189, 248, 0.18);
    border-top-color: #38bdf8;
    border-right-color: #0ea5e9;
    animation: pw-spin 0.85s linear infinite;
}

.pw-config-saving-title {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #f0f9ff;
}

.pw-config-saving-phase {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.55;
    color: #bae6fd;
    min-height: 20px;
}

.pw-config-saving-bar-wrap {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.pw-config-saving-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0284c7, #38bdf8, #7dd3fc);
    background-size: 200% 100%;
    animation: pw-config-saving-bar-shine 1.6s ease-in-out infinite;
    transition: width 0.35s ease;
}

@keyframes pw-config-saving-bar-shine {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.pw-config-saving-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    font-size: 12px;
    color: var(--pw-text-muted);
}

.pw-config-saving-meta em {
    font-style: normal;
    color: var(--pw-cyan);
    font-weight: 600;
}

.pw-config-saving-pct em {
    font-size: 14px;
}

@keyframes pw-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.pw-spin {
    display: inline-block;
    animation: pw-spin 0.85s linear infinite;
}

.pw-panel-config--advanced {
    display: none;
    width: 100%;
    flex: 1;
    min-height: 360px;
    height: 100%;
    margin: 0;
    box-sizing: border-box;
}

.pw-panel--config-advanced .pw-panel-config-quick {
    display: none !important;
}

.pw-panel--config-advanced .pw-panel-config--advanced {
    display: block !important;
    flex: 1;
    min-height: 360px;
}

.pw-panel--config-advanced .pw-panel-config-body {
    padding: 16px 18px 20px;
}

.pw-panel-config-quick {
    display: block;
    min-height: 100%;
}

.pw-panel-config-cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 4px;
}

.pw-panel-config-cat-tab {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 88px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--pw-text-dim);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.pw-panel-config-cat-tab i {
    font-size: 16px;
    margin-bottom: 2px;
    color: var(--pw-text-muted);
}

.pw-panel-config-cat-tab:hover {
    border-color: rgba(56, 189, 248, 0.35);
    background: rgba(56, 189, 248, 0.06);
}

.pw-panel-config-cat-tab.is-active {
    border-color: rgba(56, 189, 248, 0.55);
    background: rgba(56, 189, 248, 0.12);
    color: var(--pw-cyan);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.12);
}

.pw-panel-config-cat-tab.is-active i {
    color: var(--pw-cyan);
}

.pw-panel-config-cat-tab-short {
    font-size: 11px;
    font-weight: 500;
    color: var(--pw-text-muted);
}

.pw-panel-config-cat-tab.is-active .pw-panel-config-cat-tab-short {
    color: #7dd3fc;
}

.pw-panel-config-form {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-bottom: 16px;
}

.pw-panel-config-section-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.16) 0%, rgba(14, 165, 233, 0.08) 100%);
    box-shadow: 0 4px 18px rgba(56, 189, 248, 0.12);
}

.pw-panel-config-section-save-hint {
    flex: 1;
    min-width: 200px;
    font-size: 12px;
    line-height: 1.55;
    color: #bae6fd;
}

.pw-panel-config-section-save-hint i {
    margin-right: 4px;
    color: var(--pw-cyan);
}

.pw-config-group-save {
    min-width: 168px;
    height: 42px !important;
    padding: 0 20px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.28);
}

.pw-panel-config-section {
    display: none;
    padding: 0;
    border: none;
    background: transparent;
}

.pw-panel-config-section.is-active {
    display: block;
}

.pw-panel-config-section-desc {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.18);
    background: rgba(56, 189, 248, 0.06);
    font-size: 13px;
    line-height: 1.65;
    color: var(--pw-text-dim);
}

.pw-panel-config-section-desc i {
    color: var(--pw-cyan);
    margin-right: 4px;
}

.pw-panel-config-section-title {
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.15);
    font-size: 14px;
    font-weight: 700;
    color: var(--pw-cyan);
    letter-spacing: 0.02em;
}

.pw-panel-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 0;
}

.pw-panel-status-grid > .pw-panel-empty {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 96px;
    padding: 28px 24px;
    border-radius: 12px;
    border: 1px dashed rgba(56, 189, 248, 0.18);
    background: rgba(255, 255, 255, 0.02);
}

.pw-panel-status-grid > .pw-panel-empty .el-icon-loading {
    font-size: 18px;
    color: var(--pw-cyan);
}

.pw-panel-stat {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.pw-panel-stat.is-up strong {
    color: #6ee7b7;
}

.pw-panel-stat.is-down strong {
    color: #fca5a5;
}

.pw-panel-stat--wide {
    grid-column: 1 / -1;
}

.pw-panel-stat--meta {
    grid-column: 1 / -1;
}

.pw-panel-resources {
    grid-column: 1 / -1;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(56, 189, 248, 0.18);
    background: rgba(255, 255, 255, 0.025);
}

.pw-panel-resources-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--pw-cyan);
}

.pw-panel-resources-head i {
    font-size: 16px;
}

.pw-panel-resources-tip {
    font-size: 12px;
    font-weight: 500;
    color: var(--pw-text-muted);
}

.pw-panel-resources-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.pw-meter-card {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.18);
}

.pw-meter-card--ok {
    border-color: rgba(52, 211, 153, 0.22);
}

.pw-meter-card--warn {
    border-color: rgba(251, 191, 36, 0.28);
}

.pw-meter-card--danger {
    border-color: rgba(248, 113, 113, 0.32);
}

.pw-meter-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.pw-meter-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(56, 189, 248, 0.12);
    color: var(--pw-cyan);
    font-size: 18px;
}

.pw-meter-card--warn .pw-meter-icon {
    background: rgba(251, 191, 36, 0.12);
    color: #fcd34d;
}

.pw-meter-card--danger .pw-meter-icon {
    background: rgba(248, 113, 113, 0.12);
    color: #fca5a5;
}

.pw-meter-head-text {
    flex: 1;
    min-width: 0;
}

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

.pw-meter-sub {
    font-size: 12px;
    line-height: 1.55;
    color: var(--pw-text-dim);
    word-break: break-word;
}

.pw-meter-badge {
    flex-shrink: 0;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.pw-meter-badge.is-ok {
    background: rgba(52, 211, 153, 0.15);
    color: #6ee7b7;
}

.pw-meter-badge.is-warn {
    background: rgba(251, 191, 36, 0.15);
    color: #fcd34d;
}

.pw-meter-badge.is-danger {
    background: rgba(248, 113, 113, 0.15);
    color: #fca5a5;
}

.pw-meter-bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-bottom: 8px;
}

.pw-meter-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.35s ease;
    background: linear-gradient(90deg, #34d399, #6ee7b7);
}

.pw-meter-fill.is-warn {
    background: linear-gradient(90deg, #f59e0b, #fcd34d);
}

.pw-meter-fill.is-danger {
    background: linear-gradient(90deg, #ef4444, #fca5a5);
}

.pw-meter-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
}

.pw-meter-pct {
    font-size: 16px;
    font-weight: 800;
    color: var(--pw-text);
}

.pw-meter-hint {
    color: var(--pw-text-muted);
    text-align: right;
    line-height: 1.4;
}

.pw-panel-stat-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--pw-text-muted);
}

.pw-panel-stat strong {
    font-size: 15px;
    color: var(--pw-text);
    word-break: break-word;
    line-height: 1.45;
}

.pw-panel-stat--connect strong code,
.pw-panel-stat--connect code {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(56, 189, 248, 0.12);
    color: var(--pw-cyan);
    font-size: 14px;
    word-break: break-all;
}

.pw-panel-stat--connect {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pw-panel-connect-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.pw-panel-connect-row code {
    flex: 1;
    min-width: 0;
    display: inline-block;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(56, 189, 248, 0.12);
    color: var(--pw-cyan);
    font-size: 14px;
    word-break: break-all;
    line-height: 1.45;
}

.pw-btn-copy-addr {
    flex-shrink: 0;
    min-height: 36px;
    padding: 0 14px;
    font-size: 13px;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.pw-btn-copy-addr.is-copied {
    border-color: rgba(52, 211, 153, 0.55);
    color: #6ee7b7;
    background: rgba(52, 211, 153, 0.12);
}

.pw-panel-stat--hint strong {
    font-size: 13px;
    font-weight: 500;
    color: var(--pw-text-dim);
}

.pw-panel-quick-actions,
.pw-panel-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.pw-panel-log {
    margin: 0;
    flex: 1;
    min-height: 0;
    height: auto;
    overflow: auto;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #020617;
    color: #93c5fd;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

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

.pw-panel-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--pw-text-dim);
}

.pw-panel-config {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.28);
    color: var(--pw-text);
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.55;
    resize: vertical;
    box-sizing: border-box;
}

.pw-panel-config-mode {
    display: inline-flex;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.pw-panel-config-mode-btn {
    border: none;
    background: transparent;
    color: var(--pw-text-dim);
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.pw-panel-config-mode-btn:hover {
    color: var(--pw-text);
    background: rgba(255, 255, 255, 0.04);
}

.pw-panel-config-mode-btn.is-active {
    color: var(--pw-cyan);
    background: rgba(56, 189, 248, 0.14);
}

.pw-panel-config-quick.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

.pw-panel-config-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.pw-panel-config-grid .pw-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.pw-config-group-save.is-saving {
    opacity: 0.75;
    pointer-events: none;
}

.pw-panel-config-grid .pw-field--full {
    grid-column: 1 / -1;
}

.pw-panel-config-grid .pw-field-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--pw-text);
    line-height: 1.4;
}

.pw-field-required {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(248, 113, 113, 0.15);
    color: #fca5a5;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.pw-panel-config-grid .pw-field input,
.pw-panel-config-grid .pw-field select {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.32);
    color: var(--pw-text);
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pw-panel-config-grid .pw-field input::placeholder {
    color: var(--pw-text-muted);
}

.pw-panel-config-grid .pw-field input:focus,
.pw-panel-config-grid .pw-field select:focus {
    outline: none;
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.pw-panel-config-grid .pw-field select option {
    background: #0f172a;
    color: var(--pw-text);
}

.pw-panel-config-grid .pw-field-hint {
    font-size: 11px;
    color: var(--pw-text-muted);
    line-height: 1.45;
}

.pw-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    min-height: 42px;
}

.pw-switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.pw-switch-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: inherit;
    font: inherit;
}

.pw-switch-btn:focus-visible {
    outline: 2px solid rgba(56, 189, 248, 0.55);
    outline-offset: 2px;
    border-radius: 8px;
}

.pw-switch-btn .pw-switch-slider {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    transition: background 0.2s;
    flex-shrink: 0;
}

.pw-switch-btn .pw-switch-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
}

.pw-switch-btn[aria-pressed="true"] .pw-switch-slider {
    background: rgba(56, 189, 248, 0.55);
}

.pw-switch-btn[aria-pressed="true"] .pw-switch-slider::after {
    transform: translateX(20px);
}

.pw-panel-config-cat-tab-lock {
    margin-left: 4px;
    font-size: 12px;
    opacity: 0.65;
}

.pw-panel-config-lock-notice {
    display: none;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 193, 7, 0.35);
    background: rgba(255, 193, 7, 0.08);
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    line-height: 1.55;
}

.pw-panel-config-lock-notice > .el-icon-lock {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 16px;
    color: #ffc107;
}

.pw-panel-config-lock-notice-body strong {
    display: block;
    margin-bottom: 4px;
    color: #fff;
}

.pw-panel-config-lock-notice-body p {
    margin: 0 0 10px;
    color: rgba(255, 255, 255, 0.72);
}

.pw-panel-config-section.is-locked .pw-panel-config-lock-notice {
    display: flex;
}

.pw-panel-config-section.is-locked .pw-panel-config-grid {
    opacity: 0.92;
}

.pw-switch-slider {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    transition: background 0.2s;
    flex-shrink: 0;
}

.pw-switch-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
}

.pw-switch input:checked + .pw-switch-slider {
    background: rgba(56, 189, 248, 0.55);
}

.pw-switch input:checked + .pw-switch-slider::after {
    transform: translateX(20px);
}

.pw-switch-text {
    font-size: 13px;
    color: var(--pw-text-dim);
}

.pw-players-count {
    color: #6ee7b7;
    font-weight: 700;
}

.pw-panel-pane[data-panel-pane="terminal"].is-active,
.pw-panel-pane[data-panel-pane="logs"].is-active {
    overflow: hidden;
}

.pw-panel-pane[data-panel-pane="terminal"] .pw-panel-toolbar,
.pw-panel-pane[data-panel-pane="logs"] .pw-panel-toolbar {
    flex-shrink: 0;
    margin-bottom: 12px;
}

.pw-panel-terminal {
    flex: 1;
    min-height: 0;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    background: #020617;
}

.pw-panel-terminal .xterm {
    height: 100%;
    padding: 10px;
}

.pw-panel-empty {
    padding: 24px;
    text-align: center;
    color: var(--pw-text-muted);
}

.pw-btn--start {
    color: #041018 !important;
    background: linear-gradient(135deg, #34d399, #10b981) !important;
    border-color: transparent !important;
}

.pw-btn--stop {
    color: #fff !important;
    background: rgba(248, 113, 113, 0.25) !important;
    border-color: rgba(248, 113, 113, 0.4) !important;
}

.pw-btn--restart {
    color: #041018 !important;
    background: linear-gradient(135deg, #38bdf8, #22d3ee) !important;
    border-color: transparent !important;
}

.pw-btn--update {
    color: var(--pw-amber) !important;
    background: rgba(251, 191, 36, 0.12) !important;
    border-color: rgba(251, 191, 36, 0.3) !important;
}

/* Empty states */
.pw-console .deploy-no-servers-wrap {
    display: none;
}

.pw-console.is-no-servers .deploy-no-servers-wrap {
    display: block;
}

.pw-console.is-no-servers .deploy-has-servers-wrap {
    display: none !important;
}

.pw-empty {
    padding: 52px 24px 56px;
    text-align: center;
}

.pw-empty--simple {
    padding: 56px 24px 64px;
}

.pw-empty-text {
    margin: 0 0 18px;
    font-size: 14px;
    color: var(--pw-text-dim);
    line-height: 1.6;
}

.pw-empty-actions--inline {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.pw-btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: transparent;
    color: var(--pw-cyan) !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    box-shadow: none;
}

.pw-btn-login:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.55);
    transform: none;
}

.pw-empty .pw-btn {
    margin: 0;
}

.pw-empty-actions--inline .pw-btn-ghost {
    min-height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 14px;
}

.pw-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

/* Override site footer spacing on dark page */
.pw-page + footer,
.pw-page ~ footer {
    position: relative;
}

@media (max-width: 768px) {
    .pw-hero {
        padding: 96px 0 48px;
    }

    .pw-hero-stats {
        grid-template-columns: 1fr;
    }

    .pw-form-grid {
        grid-template-columns: 1fr;
    }

    .pw-shop-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pw-shop-card-foot {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .pw-shop-card-buy {
        width: 100%;
    }

    .pw-deploy-body,
    .pw-deployed-wrap {
        padding: 16px;
    }

    .pw-deployed-info-grid {
        grid-template-columns: 1fr;
    }

    .pw-deployed-actions-main .deploy-panel-btn {
        width: 100%;
    }

    .pw-deployed-pagination {
        flex-direction: column;
    }

    .pw-deployed-pagination .deploy-page-btn {
        width: 100%;
        justify-content: center;
    }

    .pw-progress-main {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .pw-progress-steps {
        justify-content: center;
    }

    .pw-progress-wrap {
        padding: 16px;
    }

    .pw-progress-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .pw-console-head {
        padding: 16px;
    }

    .pw-panel {
        height: calc(100vh - 16px);
        max-height: calc(100vh - 16px);
        border-radius: 12px;
    }

    .pw-panel-mask {
        padding: 8px;
        align-items: stretch;
    }

    .pw-panel-pane {
        padding: 14px 16px 18px;
    }

    .pw-panel-status-grid,
    .pw-panel-config-grid {
        grid-template-columns: 1fr;
    }

    .pw-panel-resources-grid {
        grid-template-columns: 1fr;
    }

    .pw-panel-config-toolbar {
        padding: 12px 14px;
    }

    .pw-panel-config-toolbar-row {
        flex-direction: column;
        align-items: stretch;
    }

    .pw-panel-config-actions {
        margin-left: 0;
        justify-content: space-between;
    }

    .pw-panel-config-section-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .pw-panel-config-section-actions .pw-config-group-save {
        width: 100%;
    }

    .pw-panel-tab-tip {
        display: none;
    }

    .pw-panel-config-cat-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .pw-panel-config-cat-tab {
        min-width: 72px;
        flex-shrink: 0;
        padding: 8px 12px;
    }

    .pw-panel-config-cat-tab-text {
        font-size: 12px;
    }

    .pw-panel-config-cat-tab-short {
        display: none;
    }
}

/* Element UI 弹窗 — 适配帕鲁暗色主题 */
body.pw-body .pw-el-message-box {
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(16, 26, 44, 0.98) 0%, rgba(10, 16, 28, 0.98) 100%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(56, 189, 248, 0.08);
    padding-bottom: 18px;
}

body.pw-body .pw-el-message-box .el-message-box__header {
    padding: 18px 20px 8px;
}

body.pw-body .pw-el-message-box .el-message-box__title {
    color: #e8f4ff;
    font-size: 17px;
    font-weight: 600;
}

body.pw-body .pw-el-message-box .el-message-box__headerbtn .el-message-box__close {
    color: #8ba3bc;
}

body.pw-body .pw-el-message-box .el-message-box__headerbtn:hover .el-message-box__close {
    color: #38bdf8;
}

body.pw-body .pw-el-message-box .el-message-box__content {
    padding: 8px 20px 12px;
    color: #c9d9ea;
}

body.pw-body .pw-el-message-box .el-message-box__message {
    color: #c9d9ea;
}

body.pw-body .pw-el-message-box .el-message-box__message p {
    margin: 0;
    line-height: 1.7;
}

body.pw-body .pw-el-message-box .el-message-box__input {
    padding-top: 8px;
}

body.pw-body .pw-el-message-box .el-message-box__input .el-input__inner {
    background: rgba(8, 14, 26, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #e8f4ff;
    border-radius: 8px;
    height: 40px;
}

body.pw-body .pw-el-message-box .el-message-box__input .el-input__inner:focus {
    border-color: rgba(56, 189, 248, 0.55);
}

body.pw-body .pw-el-message-box .el-message-box__errormsg {
    color: #f87171;
}

body.pw-body .pw-el-message-box .el-message-box__btns {
    padding: 8px 20px 0;
}

body.pw-body .pw-el-message-box .el-button--default {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(139, 163, 188, 0.35);
    color: #c9d9ea;
}

body.pw-body .pw-el-message-box .el-button--default:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(56, 189, 248, 0.35);
    color: #e8f4ff;
}

body.pw-body .pw-el-message-box .el-button--primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
    border-color: transparent;
    color: #041018;
    font-weight: 600;
}

body.pw-body .pw-el-message-box .el-button--primary:hover {
    background: linear-gradient(135deg, #38bdf8 0%, #7dd3fc 100%);
    color: #041018;
}

body.pw-body .v-modal {
    background: rgba(4, 8, 16, 0.72);
    backdrop-filter: blur(2px);
}

/* 管理面板打开时，Element UI 提示/确认框需高于面板遮罩 (12000) */
body.pw-panel-open .el-message,
body.pw-panel-open .el-message-box__wrapper,
body.pw-panel-open .el-notification {
    z-index: 13050 !important;
}

body.pw-panel-open .v-modal {
    z-index: 13049 !important;
}
