/* CM8 Wallet — New User Guide page */

.guide-body {
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(74, 144, 217, 0.18), transparent 60%),
        radial-gradient(900px 500px at -10% 20%, rgba(201, 168, 76, 0.10), transparent 55%),
        linear-gradient(180deg, #0B1426 0%, #0F1A30 55%, #0B1426 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

.guide-container {
    max-width: 920px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* ===== Top bar ===== */
.guide-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.guide-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: rgba(20, 28, 46, 0.6);
    backdrop-filter: blur(8px);
    transition: all 0.2s;
}

.guide-back:hover {
    color: var(--text-primary);
    border-color: var(--primary-color);
    transform: translateX(-2px);
}

.guide-back svg {
    width: 16px;
    height: 16px;
}

/* ===== Hero ===== */
.guide-hero {
    position: relative;
    text-align: center;
    padding: 48px 16px 32px;
}

.guide-eyebrow {
    display: inline-block;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary-light);
    padding: 6px 16px;
    border: 1px solid rgba(74, 144, 217, 0.4);
    border-radius: 999px;
    background: rgba(74, 144, 217, 0.08);
    margin-bottom: 20px;
    animation: floatBadge 4s ease-in-out infinite;
}

@keyframes floatBadge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.guide-hero h1 {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
    background: linear-gradient(120deg, #E8ECF3 0%, #6BA6E2 45%, #C9A84C 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: shimmer 6s linear infinite;
}

@keyframes shimmer {
    to { background-position: 200% center; }
}

.guide-hero p {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

/* ===== 測試前必讀 banner(醒目警示)===== */
.reminder-banner {
    position: relative;
    margin: 26px 0 6px;
    padding: 22px 24px;
    border-radius: 18px;
    background:
        radial-gradient(700px 140px at 15% 0%, rgba(224, 96, 92, 0.16), transparent 70%),
        rgba(224, 96, 92, 0.09);
    border: 1.5px solid rgba(224, 96, 92, 0.55);
    box-shadow: 0 0 0 0 rgba(224, 96, 92, 0.30);
    animation: reminderPulse 2.6s ease-in-out infinite;
}

@keyframes reminderPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(224, 96, 92, 0.28); }
    50%      { box-shadow: 0 0 26px 3px rgba(224, 96, 92, 0.22); }
}

.reminder-banner h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 800;
    color: #ff9591;
    margin-bottom: 15px;
    letter-spacing: 0.4px;
}

.reminder-banner h3 .rm-badge {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #fff;
    background: linear-gradient(135deg, #e0605c, #c23b37);
    padding: 4px 12px;
    border-radius: 999px;
    box-shadow: 0 3px 10px rgba(194, 59, 55, 0.45);
    animation: badgeBlink 1.6s ease-in-out infinite;
}

@keyframes badgeBlink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.6; }
}

.reminder-banner ul {
    list-style: none;
    display: grid;
    gap: 11px;
    margin: 0;
    padding: 0;
}

.reminder-banner li {
    position: relative;
    padding-left: 28px;
    font-size: 14.5px;
    color: var(--text-primary);
    line-height: 1.6;
}

.reminder-banner li::before {
    content: '!';
    position: absolute;
    left: 0;
    top: 1px;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: #e0605c;
    border-radius: 50%;
}

.reminder-banner strong { color: #ffd9d7; }

/* ===== 三大測試站分頁 (top-level tabs) ===== */
.testsite-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0 8px;
}

.testsite-tab {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--surface);
    cursor: pointer;
    text-align: left;
    transition: all 0.25s;
}

.testsite-tab .tab-kicker {
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
    opacity: 0.75;
}

.testsite-tab .tab-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.testsite-tab .tab-desc {
    font-size: 12.5px;
    color: var(--text-secondary);
}

.testsite-tab:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.testsite-tab.active {
    border-color: var(--primary-light);
    background: linear-gradient(150deg, rgba(74, 144, 217, 0.20), rgba(201, 168, 76, 0.08));
    box-shadow: var(--shadow);
}

.testsite-tab.active .tab-name { color: var(--primary-light); }
.testsite-tab.active .tab-kicker { color: var(--primary-light); opacity: 1; }

.testsite-panel { display: none; animation: fadeUp 0.4s ease; }
.testsite-panel.active { display: block; }

/* ===== 測試站網址卡片 ===== */
.site-link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 20px;
    border-radius: 16px;
    background: linear-gradient(160deg, var(--surface), rgba(20, 28, 46, 0.4));
    border: 1px solid var(--border-color);
    margin: 22px 0 8px;
}

.site-link-card .site-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.site-link-card .site-label {
    font-size: 12.5px;
    color: var(--text-secondary);
}

.site-link-card .site-url {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
}

.site-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}

.site-open-btn svg { width: 16px; height: 16px; }
.site-open-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }

.jump-btn { margin-top: 18px; }

/* ===== Panel intro line ===== */
.panel-intro {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 20px 4px 4px;
}

.panel-intro strong { color: var(--primary-light); }

.flow-card .flow-text {
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.65;
}

/* ===== Section nav (sticky chips) ===== */
.guide-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 12px;
    margin: 24px 0 8px;
    background: rgba(11, 20, 38, 0.75);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.guide-nav a {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 999px;
    transition: all 0.2s;
    white-space: nowrap;
}

.guide-nav a:hover {
    color: var(--text-primary);
    background: rgba(74, 144, 217, 0.15);
}

/* ===== Section ===== */
.guide-section {
    padding: 48px 0 8px;
    scroll-margin-top: 80px;
}

.section-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.section-num {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: white;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    box-shadow: 0 6px 20px rgba(74, 144, 217, 0.35);
    position: relative;
}

.section-num::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-color));
    z-index: -1;
    opacity: 0.5;
    filter: blur(6px);
}

.section-head h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
}

.section-head .section-sub {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ===== Platform tabs (Android / iOS) ===== */
.platform-tabs {
    display: inline-flex;
    padding: 5px;
    gap: 4px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.platform-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
}

.platform-tab svg {
    width: 20px;
    height: 20px;
}

.platform-tab.active {
    color: white;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    box-shadow: var(--shadow);
}

.platform-tab.active .android-glyph { color: #3DDC84; }

.platform-panel { display: none; animation: fadeUp 0.4s ease; }
.platform-panel.active { display: block; }

/* ===== Step timeline ===== */
.steps {
    position: relative;
    margin-left: 8px;
}

.steps::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color), transparent);
    opacity: 0.4;
}

.step {
    position: relative;
    display: flex;
    gap: 18px;
    padding: 0 0 24px 0;
}

.step-dot {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-light);
    background: var(--surface);
    border: 2px solid var(--primary-color);
    z-index: 1;
    transition: all 0.3s;
}

.step:hover .step-dot {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    transform: scale(1.08);
}

.step-content {
    padding-top: 6px;
}

.step-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.step-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
}

.step-content .pill {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--accent-color);
    border: 1px solid rgba(201, 168, 76, 0.35);
    background: rgba(201, 168, 76, 0.08);
    padding: 3px 10px;
    border-radius: 999px;
}

/* ===== Cards grid (for flows like transfer methods) ===== */
.flow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.flow-card {
    background: linear-gradient(160deg, var(--surface), rgba(20, 28, 46, 0.4));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 22px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.flow-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
}

.flow-card .flow-icon {
    font-size: 30px;
    margin-bottom: 12px;
}

.flow-card h4 {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.flow-card ol, .flow-card ul {
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.7;
}

/* ===== Notice / tip ===== */
.guide-tip {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 20px;
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(201, 168, 76, 0.07);
    border: 1px solid rgba(201, 168, 76, 0.25);
}

.guide-tip .tip-icon { font-size: 20px; flex-shrink: 0; }

.guide-tip p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.guide-tip strong { color: var(--accent-color); }

/* ===== Phone mock for PIN ===== */
.pin-mock {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    margin-top: 8px;
}

.pin-dots {
    display: flex;
    gap: 14px;
    padding: 22px 26px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--border-color);
}

.pin-dots span {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--border-color);
}

.pin-dots span.filled {
    background: linear-gradient(135deg, var(--primary-light), var(--accent-color));
    box-shadow: 0 0 12px rgba(107, 166, 226, 0.6);
    animation: pinPop 0.3s ease;
}

@keyframes pinPop {
    0% { transform: scale(0.4); }
    100% { transform: scale(1); }
}

/* ===== CTA ===== */
.guide-cta {
    text-align: center;
    margin: 56px 0 24px;
    padding: 40px 24px;
    border-radius: 24px;
    background:
        radial-gradient(600px 200px at 50% 0%, rgba(74, 144, 217, 0.18), transparent),
        var(--surface);
    border: 1px solid var(--border-color);
}

.guide-cta h2 {
    font-size: 26px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.guide-cta p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.cta-buttons {
    display: inline-flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.cta-btn svg { width: 20px; height: 20px; }

.cta-btn.primary {
    color: white;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    box-shadow: var(--shadow);
}

.cta-btn.primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.cta-btn.primary .android-glyph { color: #3DDC84; }

.cta-btn.ghost {
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    background: var(--background);
}

.cta-btn.ghost:hover { border-color: var(--primary-light); }

/* ===== Footer ===== */
.guide-footer {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.guide-footer p { font-size: 13px; color: var(--text-secondary); }

/* ===== Reveal animation ===== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .guide-hero h1 { font-size: 32px; }
    .section-head h2 { font-size: 22px; }
    .guide-nav { gap: 4px; padding: 10px 8px; }
    .guide-nav a { font-size: 12px; padding: 7px 10px; }
}

@media (max-width: 640px) {
    .testsite-tabs { grid-template-columns: 1fr; }
    .site-link-card { flex-direction: column; align-items: flex-start; }
    .site-open-btn { align-self: stretch; justify-content: center; }
}

@media (max-width: 480px) {
    .guide-container { padding: 16px; }
    .guide-hero { padding: 32px 8px 24px; }
    .guide-hero h1 { font-size: 27px; }
    .platform-tab { padding: 10px 16px; font-size: 14px; }
}
