/* ── goods-shared.css ──
 * 所有 ga ea-good-*.html 模板共享的基础样式。
 * 若需覆盖，在各模板的 <style> 块中声明（后加载优先）。
 */

/* Force our theme over OS high-contrast / forced-colors */
@media (forced-colors: active) {

    *,
    *::before,
    *::after {
        forced-color-adjust: none;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f4f4f4;
    min-height: 100vh;
    color: #222;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.navbar {
    display: flex;
    align-items: center;
    height: 56px;
    padding: 0 16px;
    border-bottom: 1px solid #e8e8e8;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    color: #fb7299;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #fb7299, #ff9a9e);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.nav-items {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 24px;
}

.nav-item {
    padding: 8px 14px;
    color: #505050;
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-item:hover {
    background: #f4f4f4;
    color: #222;
}

.doer-area {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.doer-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(135deg, #fb7299, #ff9a9e);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
}

.tab-bar {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 16px;
    gap: 0;
    overflow-x: auto;
}

/* 软件门面行 */
.good-facade {
    display: flex;
    gap: 16px;
    padding: 8px 16px;
    border-bottom: 1px solid #e8e8e8;
    background: #fff;
}

.facade-logo {
    width: 88px;
    height: 88px;
    flex-shrink: 0;
    cursor: pointer;
}

.facade-logo img {
    width: 88px;
    height: 88px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.2s;
}

.facade-logo img:hover {
    transform: scale(1.05);
}

.facade-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.facade-row {
    height: 22px;
    line-height: 22px;
    font-size: 13px;
    overflow: hidden;
    white-space: nowrap;
}

.facade-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.facade-name {
    font-weight: 700;
    font-size: 16px;
    color: #222;
}

.tip-author-btn {
    padding: 1px 10px;
    font-size: 11px;
    font-weight: 600;
    border: 1.5px solid #fb7299;
    color: #fb7299;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    line-height: 18px;
    transition: all 0.15s;
    flex-shrink: 0;
}

.tip-author-btn:hover {
    background: #fb7299;
    color: #fff;
}

.tip-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.tip-modal-overlay.active {
    display: flex;
}

.tip-modal {
    background: #fff;
    border-radius: 12px;
    padding: 24px 28px;
    min-width: 280px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    text-align: center;
}

.tip-modal h3 {
    margin: 0 0 16px;
    font-size: 16px;
    color: #222;
}

.tip-amounts {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 16px;
}

.tip-amounts button {
    padding: 6px 16px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    color: #333;
}

.tip-amounts button.active {
    border-color: #fb7299;
    color: #fb7299;
    background: #fff5f7;
}

.tip-amounts button:hover {
    border-color: #fb7299;
}

.tip-confirm {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 8px;
    background: #fb7299;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.tip-confirm:hover {
    opacity: 0.85;
}

.tip-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.facade-owned {
    color: #52c41a;
    font-size: 12px;
    font-weight: 500;
}

.facade-stats {
    display: flex;
    gap: 24px;
    cursor: pointer;
    color: #666;
}

.facade-stats:hover {
    color: #fb7299;
}

.facade-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.facade-stats em {
    font-style: normal;
    font-weight: 700;
    color: #fb7299;
    font-size: 14px;
}

.facade-stats small {
    font-size: 11px;
    color: #999;
}

.facade-links {
    font-size: 12px;
    color: #666;
}

.facade-links a {
    color: #0066b8;
    text-decoration: none;
}

.facade-links a:hover {
    text-decoration: underline;
}

.facade-extra {
    font-size: 12px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0;
}

.facade-extra:hover .facade-extra-label {
    background: #222;
}

.facade-extra-label {
    display: inline-block;
    padding: 1px 7px;
    background: #333;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    border-radius: 3px;
    margin-right: 6px;
    transition: background 0.15s;
    flex-shrink: 0;
    line-height: 18px;
}

.facade-extra-text {
    user-select: text;
    cursor: text;
}

/* Why 全屏弹窗 — 走马灯 */
.why-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 9999;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5vw;
    overflow: hidden;
}

.why-modal.show {
    display: flex;
}

.why-modal-title {
    font-size: clamp(48px, 12vw, 140px);
    font-weight: 900;
    color: #000;
    line-height: 1.1;
    margin-bottom: 2vh;
}

.why-carousel {
    position: relative;
    width: 80vw;
    height: clamp(60px, 8vw, 120px);
    overflow: hidden;
}

.why-carousel-item {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    font-size: clamp(16px, 3vw, 36px);
    color: #333;
    line-height: 1.6;
    text-align: center;
    user-select: text;
    cursor: text;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s ease;
}

.why-carousel-item.slide-up {
    transform: translateY(-120%);
    opacity: 0;
}

.why-carousel-item.below {
    transform: translateY(120%);
    opacity: 0;
}

/* Logo 放大弹窗 */
.logo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.logo-modal.show {
    display: flex;
}

.logo-modal img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
}

.tab-item {
    flex-shrink: 0;
    padding: 10px 20px;
    font-size: 15px;
    color: #505050;
    text-decoration: none;
    position: relative;
    white-space: nowrap;
    transition: color 0.2s;
}

.tab-item:hover {
    color: #fb7299;
}

.tab-item.active {
    color: #fb7299;
    font-weight: 600;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: #fb7299;
    border-radius: 2px;
}

.main {
    padding-bottom: 24px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.content-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-placeholder {
    background: #000;
    border-radius: 8px;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
}

.price-card {
    background: linear-gradient(135deg, #fff5f7, #fff);
    border: 1px solid #ffe0e6;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.price-value {
    font-size: 48px;
    font-weight: 700;
    color: #fb7299;
}

.price-unit {
    font-size: 18px;
    color: #fb7299;
}

.price-desc {
    font-size: 14px;
    color: #999;
    margin: 12px 0 24px;
}

.buy-btn {
    display: inline-block;
    padding: 14px 48px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #fb7299, #ff9a9e);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}

.buy-btn.owned {
    background: linear-gradient(135deg, #52c41a, #73d13d);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* VS Code Profile UI */
.profile-search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid #e8e8e8;
}

.profile-search input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
}

.profile-search svg {
    color: #999;
    flex-shrink: 0;
}

.profile-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 16px;
    background: #fff;
    border-radius: 8px 8px 0 0;
    padding: 0 8px;
}

.profile-tab {
    padding: 12px 16px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.profile-tab:hover {
    color: #333;
}

.profile-tab.active {
    color: #0066b8;
    border-bottom-color: #0066b8;
}

.profile-group {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid #e8e8e8;
    overflow: hidden;
}

.profile-group-header {
    padding: 12px 16px;
    background: #f8f8f8;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-item {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
}

.setting-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.setting-id {
    font-size: 11px;
    color: #999;
    font-family: monospace;
    margin-left: 8px;
}

.setting-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 12px;
}

.setting-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.setting-select {
    padding: 6px 32px 6px 12px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M2 4l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 10px center;
    appearance: none;
    cursor: pointer;
    min-width: 200px;
}

.setting-select:focus {
    border-color: #0066b8;
    outline: none;
}

.setting-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.setting-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0066b8;
}

.setting-checkbox-label {
    font-size: 13px;
    color: #333;
}

.setting-number {
    padding: 6px 12px;
    font-size: 13px;
    width: 80px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.setting-number:focus {
    border-color: #0066b8;
    outline: none;
}

.setting-text {
    padding: 6px 12px;
    font-size: 13px;
    width: 250px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.setting-text:focus {
    border-color: #0066b8;
    outline: none;
}

.setting-modified {
    display: inline-block;
    width: 4px;
    height: 4px;
    background: #0066b8;
    border-radius: 50%;
    margin-left: 6px;
}

.profile-footer {
    display: block;
    padding: 16px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.profile-footer-info {
    font-size: 12px;
    color: #666;
}

.profile-footer-actions {
    position: fixed;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    flex-direction: column;
    gap: 6px;
    z-index: 999;
    width: 72px;
    transition: right 0.15s ease;
}

.btn-reset {
    width: 100%;
    padding: 8px 0;
    font-size: 12px;
    color: #666;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
}

.btn-reset:hover {
    background: #eee;
}

/* Language switcher floating buttons */
.lang-switcher-actions {
    position: fixed;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    flex-direction: column;
    gap: 5px;
    z-index: 999;
    width: 72px;
    transition: right 0.15s ease;
    max-height: 80vh;
    overflow-y: auto;
}

.lang-switcher-label {
    display: block;
    text-align: center;
    font-size: 16px;
    padding: 4px 0;
    color: #999;
}

.lang-switcher-actions a {
    display: block;
    width: 100%;
    padding: 6px 0;
    font-size: 11px;
    color: #666;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
}

.lang-switcher-actions a:hover {
    background: #eee;
    color: #222;
}

.lang-switcher-actions a.lang-active {
    background: linear-gradient(135deg, #fb7299, #ff9a9e);
    color: #fff;
    border-color: transparent;
    cursor: default;
    pointer-events: none;
    font-weight: 600;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #999;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* 评论系统样式 → /static/comments.css */

@media (max-width: 768px) {
    .navbar {
        padding: 0 12px;
    }

    .nav-items {
        margin-left: 12px;
        gap: 2px;
    }

    .nav-item {
        padding: 6px 10px;
        font-size: 13px;
    }

    .good-facade {
        padding: 8px 12px;
        gap: 12px;
    }

    .facade-logo,
    .facade-logo img {
        width: 72px;
        height: 72px;
    }

    .facade-info {
        height: 72px;
    }

    .facade-row {
        height: 18px;
        line-height: 18px;
        font-size: 11px;
    }

    .facade-name {
        font-size: 14px;
    }

    .facade-stats {
        gap: 12px;
    }

    .facade-stats em {
        font-size: 12px;
    }

    .setting-select {
        min-width: 150px;
    }

    .setting-text {
        width: 100%;
    }
}