:root {
    --primary-gradient: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 50%, #f0932b 100%);
    --primary-solid: #ee5a24;
    --accent: #ff9f43;
    --bg: #fff8f5;
    --card: #ffffff;
    --text-main: #2d3436;
    --text-sub: #636e72;
    --border: #ffe0d6;
    --shadow: 0 4px 16px rgba(238, 90, 36, 0.15);
    --radius: 14px;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif;
    background: var(--bg);
    color: var(--text-main);
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}
.site-header {
    background: var(--primary-gradient);
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}
.site-header .header-inner {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
}
.header-action {
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    transition: background 0.2s;
    text-decoration: none;
}
.header-action:active {
    background: rgba(255,255,255,0.35);
}
.main-content {
    flex: 1;
    max-width: 520px;
    width: 100%;
    margin: 20px auto;
    align-self: center;
    padding: 0 16px;
}
/* 搜索框 */
.search-box{
    display:flex;
    max-width:100%;
    margin:20px auto 0;
    gap:0;
}
.search-box input{
    flex:1;
    padding:12px 20px;
    border-radius:99px 0 0 99px;
    border:none;
    outline:none;
    font-size:15px;
    background:#fff;
    color:var(--text-main);
}
.search-btn{
    background:var(--primary-solid);
    color:white;
    border:none;
    padding:0 28px;
    border-radius:0 99px 99px 0;
    cursor:pointer;
    font-weight:500;
    font-size:15px;
    transition:all 0.2s;
}
.search-btn:hover{
    background:#e04e1a;
    box-shadow:0 4px 12px rgba(238,90,36,0.3);
}
/* 页面标题 */
.page-hero {
    text-align: center;
    margin-bottom: 24px;
    padding: 12px 0;
}
.page-hero h1 {
    font-size: 24px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}
.page-hero p {
    color: var(--text-sub);
    font-size: 14px;
    margin-bottom: 12px;
}
/* emoji修复 */
.page-hero h1 .emoji-icon {
    display: inline-block;
    -webkit-text-fill-color: initial;
    background: none;
    margin-right: 8px;
    font-size: 0.9em;
    vertical-align: -2px;
}
/* 平台切换标签 */
.platform-tabs{
    display:flex;
    gap:10px;
    justify-content:center;
    margin: 16px 0 10px;
    flex-wrap:wrap;
}
.platform-tab{
    padding:8px 22px;
    border-radius:99px;
    border:1.5px solid var(--border);
    background:#fff;
    color:var(--text-sub);
    font-size:14px;
    font-weight:600;
    cursor:pointer;
    transition:all 0.2s;
}
.platform-tab.active{
    background:var(--primary-gradient);
    color:#fff;
    border-color:transparent;
    box-shadow:0 4px 12px rgba(238,90,36,0.3);
}
.platform-tab:hover{
    border-color:var(--primary-solid);
    color:var(--primary-solid);
}
.platform-tab.active:hover{
    color:#fff;
}
/* 搜索行 */
.hero-copy-row {
    display: flex;
    align-items: center;
    height: 46px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    margin-top: 10px;
}
.hero-label {
    flex-shrink: 0;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sub);
    white-space: nowrap;
    border-right: 1px solid var(--border);
    height: 100%;
    display: flex;
    align-items: center;
}
.hero-code-box {
    flex: 1;
    height: 100%;
    border: none !important;
    background: transparent !important;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-solid);
    outline: none;
    font-family: "SF Mono", "Fira Code", Consolas, monospace;
    min-width: 0;
    text-align: left;
    letter-spacing: 0.3px;
}
.hero-copy-btn {
    flex-shrink: 0;
    height: 100%;
    padding: 0 20px;
    border: none;
    border-left: 1px solid var(--border);
    background: var(--primary-gradient);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
    border-radius: 0;
}
.hero-copy-btn:active {
    opacity: 0.85;
}
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 16px;
    overflow: hidden;
}
.section-title-center {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 14px;
    text-align: center;
    line-height: 1.6;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 4px 0;
}
.section-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}
.section-title .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-solid);
}
.copy-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.copy-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.copy-input {
    flex: 1;
    height: 44px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 0 14px;
    font-size: 14px;
    color: var(--text-main);
    background: #fffbf9;
    outline: none;
    transition: border-color 0.2s;
    font-family: "SF Mono", "Fira Code", Consolas, monospace;
    min-width: 0;
}
.copy-input:focus {
    border-color: var(--primary-solid);
    background: #fff;
}
.copy-btn {
    flex-shrink: 0;
    height: 44px;
    padding: 0 18px;
    border: none;
    border-radius: 10px;
    background: var(--primary-gradient);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.copy-btn:active {
    transform: scale(0.95);
    opacity: 0.9;
}
.upload-area {
    text-align: center;
    margin-bottom: 20px;
}
.upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 30px;
    border: 2px dashed var(--border);
    border-radius: 12px;
    background: #fffbf9;
    color: var(--text-sub);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.upload-btn:active {
    transform: scale(0.97);
    background: #fff5f0;
    border-color: var(--primary-solid);
    color: var(--primary-solid);
}
.upload-hint {
    font-size: 12px;
    color: var(--text-sub);
    margin-top: 10px;
}
.upload-hint strong {
    color: var(--primary-solid);
}
.preview-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 14px;
}
.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid var(--border);
    background: #fffbf9;
}
.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 12px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.preview-remove:active {
    background: rgba(0,0,0,0.75);
}
.action-area {
    margin-top: 20px;
}
.progress-wrap {
    margin-bottom: 14px;
    display: none;
}
.progress-bg {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-gradient);
    border-radius: 3px;
    transition: width 0.15s linear;
}
.progress-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 11px;
    color: var(--text-sub);
}
.submit-btn {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 12px;
    background: var(--primary-gradient);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 14px rgba(238, 90, 36, 0.4);
}
.submit-btn:active:not(:disabled) {
    transform: scale(0.97);
}
.submit-btn:disabled {
    background: #dfe6e9;
    cursor: not-allowed;
    box-shadow: none;
}
/* 图片容器修复：限制在卡片内 */
.card-img-wrap {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-top: 10px;
}
.card-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}
.tips-card {
    max-width: 520px;
    margin: 0 auto 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #fff5f0 0%, #fff0e6 100%);
    border-radius: var(--radius);
    border: 1.5px solid rgba(238, 90, 36, 0.15);
    text-align: center;
    overflow: hidden;
}
.tips-line {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.8;
    margin-bottom: 2px;
}
.tips-highlight {
    font-size: 17px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 4px;
}
.tips-img-wrap {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-top: 14px;
}
.tips-card img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}
.toast {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(-110px);
    background: rgba(45, 52, 54, 0.92);
    color: #fff;
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
    z-index: 2000;
    pointer-events: none;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}
.toast.show {
    transform: translateX(-50%) translateY(0);
}
/* ========== 弹窗修复：悬浮全屏居中 ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}
.modal-sheet {
    background: var(--card);
    border-radius: 20px;
    padding: 32px 24px 40px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    animation: modalUp 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.modal-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.modal-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 4px;
}
.modal-desc {
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 20px;
}
.modal-link-box {
    display: none;
    background: #fff5f0;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    font-size: 13px;
    color: var(--primary-solid);
    word-break: break-all;
    cursor: pointer;
    transition: all 0.2s;
    font-family: "SF Mono","Fira Code",monospace;
    margin-bottom: 20px;
    line-height: 1.5;
    text-decoration: none;
}
.modal-link-box.visible {
    display: block;
    animation: linkFadeIn 0.3s ease;
}
.modal-link-box:active {
    background: #ffe8db;
    border-color: var(--primary-solid);
}
.modal-or {
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
    margin: 12px 0;
    font-weight: 500;
}
.modal-copy-btn {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 10px;
    background: var(--primary-gradient);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
}
.modal-copy-btn:active {
    transform: scale(0.97);
    opacity: 0.9;
}
.modal-close-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: var(--bg);
    color: var(--text-main);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
.modal-close-btn:active {
    background: #ffe8db;
}
@keyframes linkFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
/* ========== 首页专属样式 ========== */
.home-hero {
    text-align: center;
    margin-bottom: 28px;
    padding: 20px 0 10px;
}
.home-hero h1 {
    font-size: 26px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}
.home-hero p {
    color: var(--text-sub);
    font-size: 14px;
}
.game-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.game-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1.5px solid transparent;
    cursor: pointer;
}
.game-card:active {
    transform: scale(0.97);
    border-color: var(--primary-solid);
}
.game-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border);
    background: #fffbf9;
}
.game-info {
    flex: 1;
    min-width: 0;
}
.game-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.game-desc {
    font-size: 12px;
    color: var(--text-sub);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.game-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-solid);
    background: #fff5f0;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid var(--border);
}
.game-arrow {
    flex-shrink: 0;
    font-size: 18px;
    color: #ddd;
    transition: color 0.2s;
}
.game-card:active .game-arrow {
    color: var(--primary-solid);
}
/* ========== 分类卡片（首页用） ========== */
.cate-wrap{
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.cate-card{
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card);
    padding: 24px 28px;
    border-radius: var(--radius);
    border: 1.5px solid transparent;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.25s ease;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.cate-card::before{
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: var(--primary-gradient);
    transform: scaleY(0);
    transition: 0.25s;
    border-radius: var(--radius) 0 0 var(--radius);
}
.cate-card:hover{
    border-color: var(--primary-solid);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(238,90,36,0.15);
}
.cate-card:hover::before{
    transform: scaleY(1);
}
.card-left{
    flex: 1;
}
.card-title{
    font-weight: 700;
    font-size: 19px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.card-sub{
    font-size: 14px;
    color: var(--text-sub);
    margin-bottom: 6px;
}
.card-desc{
    font-size: 14px;
    color: #9ca3af;
    line-height: 1.6;
}
.arrow{
    color: #ddd;
    font-size: 22px;
    padding-right: 4px;
    transition: 0.2s;
    font-weight: 700;
}
.cate-card:hover .arrow{
    color: var(--primary-solid);
    transform: translateX(4px);
}
/* ========== 底部 ========== */
.site-footer {
    padding: 24px 16px;
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--card);
    margin-top: auto;
    flex-shrink: 0;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 8px;
    font-size: 12px;
    flex-wrap: wrap;
}
.footer-links a {
    color: var(--text-sub);
    text-decoration: none;
}
.footer-copy {
    font-size: 11px;
    color: #b2bec3;
}
@media (max-width: 360px) {
    .copy-btn {
        padding: 0 14px;
        font-size: 13px;
    }
    .section-title-center {
        font-size: 14px;
    }
    .tips-highlight {
        font-size: 15px;
    }
    .preview-grid {
        gap: 6px;
    }
    .game-icon {
        width: 60px;
        height: 60px;
        border-radius: 12px;
    }
    .game-title {
        font-size: 15px;
    }
    .home-hero h1 {
        font-size: 22px;
    }
}
