/* ========== 醒醒鸦 · 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a2e 50%, #2d2d44 100%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 70px;
}

/* ========== 首页 ========== */
.start-page {
    text-align: center;
    animation: fadeIn 0.8s ease;
}
.chat-bubble {
    position: absolute;
    top: -45px;
    right: -70px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 10px 16px;
    border-radius: 16px;
    font-size: 13px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 10;
}
.chat-bubble:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.chat-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 15px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid rgba(255, 255, 255, 0.95);
}
.logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    animation: crowNod 3s ease-in-out infinite;
    position: relative;
}
.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
@keyframes crowNod {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}
.main-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #8b8b8b, #d4d4d4, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.subtitle {
    font-size: 16px;
    color: #8892b0;
    margin-bottom: 16px;
}
.slogan {
    font-size: 14px;
    color: #6b7c93;
    margin-bottom: 32px;
    font-style: italic;
    letter-spacing: 2px;
}
.start-btn {
    background: linear-gradient(135deg, #4a4a4a, #2d2d2d);
    border: 2px solid #666;
    padding: 16px 48px;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}
.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(100, 100, 100, 0.4);
}
.chat-link {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 32px;
    font-size: 14px;
    color: #8892b0;
    text-decoration: none;
    border: 1px solid #555;
    border-radius: 25px;
    transition: all 0.3s ease;
}
.chat-link:hover {
    color: #fff;
    border-color: #888;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(100, 100, 100, 0.3);
}
.result-chat {
    display: block;
    margin-top: 20px;
    text-align: center;
    padding: 14px 32px;
    font-size: 15px;
    background: linear-gradient(135deg, #4a4a4a, #2d2d2d);
    border: 1px solid #555;
}
.features {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 30px;
}
.feature {
    text-align: center;
}
.feature-icon {
    font-size: 24px;
    margin-bottom: 8px;
}
.feature-text {
    font-size: 12px;
    color: #8892b0;
}

/* ========== 测试页 ========== */
.quiz-page {
    display: none;
    animation: fadeIn 0.5s ease;
    position: relative;
}
.back-home-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #8892b0;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}
.back-home-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}
.progress-bar {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    height: 8px;
    margin-bottom: 30px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}
.progress-fill {
    height: 100%;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    /* 平滑缓动曲线，使用 easeOutQuart 效果 */
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* 渐变背景 + 动画 */
    background: linear-gradient(
        90deg,
        #7a7a7a 0%,
        #9a9a9a 25%,
        #b8b8b8 50%,
        #9a9a9a 75%,
        #7a7a7a 100%
    );
    background-size: 200% 100%;
    animation: progressShimmer 2s ease-in-out infinite;
    /* 光晕效果 */
    box-shadow: 
        0 0 10px rgba(180, 180, 180, 0.4),
        0 0 20px rgba(180, 180, 180, 0.2);
}
/* 进度条条纹效果 */
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    background-size: 60% 100%;
    animation: progressStripe 1.5s ease-in-out infinite;
}
/* 呼吸脉冲效果 */
@keyframes progressPulse {
    0%, 100% {
        box-shadow: 
            0 0 8px rgba(200, 200, 200, 0.3),
            0 0 15px rgba(200, 200, 200, 0.15);
    }
    50% {
        box-shadow: 
            0 0 12px rgba(200, 200, 200, 0.5),
            0 0 25px rgba(200, 200, 200, 0.25);
    }
}
/* 渐变色流动效果 */
@keyframes progressShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
/* 条纹滚动效果 */
@keyframes progressStripe {
    0% { background-position: -100% 0; }
    100% { background-position: 200% 0; }
}
.quiz-brand {
    text-align: center;
    font-size: 13px;
    color: #6b7a99;
    margin-top: 10px;
    margin-bottom: 8px;
    letter-spacing: 1px;
}
.question-counter {
    text-align: center;
    font-size: 14px;
    color: #8892b0;
    margin-bottom: 20px;
}
.question-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.3s ease;
}
.question-text {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 30px;
    text-align: center;
}
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.option {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 16px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    text-align: center;
}
.option:hover {
    background: rgba(100, 100, 100, 0.3);
    border-color: #888;
    transform: translateX(5px);
}
.option.selected {
    background: linear-gradient(135deg, rgba(100, 100, 100, 0.4), rgba(150, 150, 150, 0.3));
    border-color: #aaa;
}
.option-btn {
    transition: all 0.2s ease;
}
.option-btn:active {
    transform: scale(0.98);
}
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    gap: 12px;
}
.nav-btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.nav-btn.prev {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #8892b0;
}
.nav-btn.prev:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.nav-btn.prev:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.nav-btn.submit {
    background: linear-gradient(135deg, #555, #333);
    border: 2px solid #666;
    color: #fff;
}
.nav-btn.submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 100, 100, 0.3);
}

/* ========== 结果页 ========== */
.result-page {
    display: none;
    animation: fadeIn 0.8s ease;
}
/* 通用卡片样式 */
.result-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 16px;
}
/* 鸦格卡片 */
.yage-card {
    text-align: center;
    padding: 32px 24px;
}
.result-image-wrap {
    width: 140px;
    height: 140px;
    margin: 0 auto 12px;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.result-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
@keyframes crowBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.result-type {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(90deg, #aaa, #ddd, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}
@supports not (-webkit-background-clip: text) {
    .result-type {
        -webkit-text-fill-color: #fff;
        color: #fff;
    }
}
/* 分区标签 */
.result-zone {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding: 8px 20px;
    border-radius: 24px;
    display: inline-block;
}
.result-zone.awake {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 237, 74, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.4);
    color: #ffd700;
}
.result-zone.blurry {
    background: linear-gradient(135deg, rgba(160, 160, 192, 0.2), rgba(192, 192, 216, 0.1));
    border: 1px solid rgba(160, 160, 192, 0.4);
    color: #c0c0d8;
}
.result-zone.asleep {
    background: linear-gradient(135deg, rgba(74, 74, 106, 0.2), rgba(106, 106, 138, 0.1));
    border: 1px solid rgba(74, 74, 106, 0.4);
    color: #a0a0c0;
}
.result-desc {
    font-size: 15px;
    line-height: 1.7;
    color: #ccd6f6;
}
/* 引用卡片 */
.quote-card {
    text-align: left;
}
.quote-text {
    font-size: 16px;
    color: #fff;
    line-height: 1.6;
    font-style: italic;
}
/* 指数卡片 */
.score-card {
    text-align: left;
}
.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
}
/* 指针式进度条 */
.dimension-gauges {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.dimension-gauge {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.gauge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.gauge-label {
    font-size: 14px;
    color: #fff;
    font-weight: 500;
}
.gauge-score {
    font-size: 13px;
    color: #8892b0;
}
.gauge-bar {
    position: relative;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: visible;
}
.gauge-track {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    display: flex;
}
.gauge-segment {
    flex: 1;
    border-right: 1px solid rgba(0, 0, 0, 0.2);
}
.gauge-segment:last-child {
    border-right: none;
}
.gauge-segment.low { background: rgba(107, 91, 149, 0.3); }
.gauge-segment.mid { background: rgba(139, 123, 171, 0.3); }
.gauge-segment.high { background: rgba(180, 160, 200, 0.3); }
.gauge-pointer {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: left 0.5s ease;
}
.gauge-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #5a6a8a;
    margin-top: 4px;
}
/* 建议卡片 */
.suitable-card {
    text-align: left;
}
.suitable-text {
    font-size: 15px;
    color: #ccd6f6;
    line-height: 1.6;
}
/* 按钮区 */
.result-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}
/* 按钮通用样式 */
.btn-primary, .btn-secondary, .btn-outline {
    display: block;
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    margin-top: 16px;
}
/* 卡片内的全宽按钮 */
.btn-block {
    margin-top: 16px;
    width: 100%;
}
.btn-primary {
    background: linear-gradient(135deg, #8b6b9a, #6b5b95);
    color: #fff;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 91, 149, 0.5);
}
.btn-secondary {
    background: linear-gradient(135deg, #4a4a4a, #2d2d2d);
    border: 1px solid #555;
    color: #fff;
}
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(100, 100, 100, 0.4);
}
.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #8892b0;
}
.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}
/* 分享选项 */
.share-options {
    display: none;
    flex-direction: column;
    gap: 8px;
    animation: slideUp 0.3s ease;
}
.share-options.show {
    display: flex;
}
.share-option-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 12px 20px;
    font-size: 14px;
    color: #fff;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}
.share-option-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.share-btn {
    background: linear-gradient(135deg, #555, #333);
    border: 2px solid #666;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(100, 100, 100, 0.3);
}
.share-options {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
    animation: slideUp 0.3s ease;
}
.share-options.show {
    display: flex;
}
.share-option-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 20px;
    font-size: 14px;
    color: #fff;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.share-option-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}
.retry-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 12px 32px;
    font-size: 14px;
    color: #8892b0;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.retry-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}
.footer-tip {
    margin-top: 30px;
    font-size: 12px;
    color: #5a6a8a;
}
.footer-links a {
    color: #5a6a8a;
    text-decoration: none;
}
.footer-links a:hover {
    color: #8892b0;
}

/* ========== 图片预览 ========== */
.image-preview-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
}
.image-preview-overlay.show {
    display: flex;
}
.image-preview-container {
    max-width: 400px;
    width: 100%;
    background: #1a1a2e;
    border-radius: 16px;
    overflow: hidden;
}
.image-preview-container img {
    width: 100%;
    display: block;
}
.image-preview-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    width: 100%;
    max-width: 400px;
}
.image-preview-actions button {
    flex: 1;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.download-btn {
    background: linear-gradient(135deg, #555, #333);
    border: 2px solid #666;
    color: #fff;
}
.close-preview-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #8892b0;
}
.result-image-container {
    position: fixed;
    left: -9999px;
    top: 0;
    width: 400px;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a2e 50%, #2d2d44 100%);
    padding: 40px 30px;
    font-family: 'Noto Sans SC', sans-serif;
    color: #fff;
    text-align: center;
}
.result-image-container .img-emoji {
    font-size: 80px;
    margin-bottom: 16px;
}
.result-image-container .img-type {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #aaa, #ddd, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.result-image-container .img-desc {
    font-size: 14px;
    line-height: 1.8;
    color: #ccd6f6;
    margin-bottom: 24px;
    padding: 0 10px;
}
.result-image-container .score-box {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}
.result-image-container .score-num {
    font-size: 28px;
    font-weight: 700;
    color: #bbb;
}
.result-image-container .score-zone-text {
    font-size: 14px;
    color: #8892b0;
    margin-top: 4px;
}
.result-image-container .advice-box {
    background: rgba(100, 100, 100, 0.15);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 24px;
}
.result-image-container .advice-title-text {
    font-size: 13px;
    font-weight: 600;
    color: #bbb;
    margin-bottom: 6px;
}
.result-image-container .advice-content {
    font-size: 13px;
    color: #ccd6f6;
}
.result-image-container .img-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.result-image-container .logo-text {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(90deg, #aaa, #ddd, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.result-image-container .qrcode-hint {
    font-size: 12px;
    color: #8892b0;
}

/* ========== 动画 ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.hidden {
    display: none !important;
}

/* ========== 离线提示 ========== */
.offline-toast {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(26, 26, 46, 0.95);
    color: #fff;
    padding: 24px 32px;
    border-radius: 16px;
    font-size: 16px;
    z-index: 10000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}
.offline-toast.show {
    display: flex;
}
.close-toast {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}
.close-toast:hover {
    color: rgba(255, 255, 255, 0.8);
}
.offline-icon {
    font-size: 28px;
    animation: fly 1s ease-in-out infinite;
}
@keyframes fly {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(10deg); }
}
.offline-text {
    font-weight: 500;
}
.dots {
    animation: blink 1.5s infinite;
}
@keyframes blink {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
}
.reconnect-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}
.reconnect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ========== 底部导航栏 ========== */
.footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(13, 13, 26, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 100;
}
.footer-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #8892b0;
    padding: 4px 12px;
    border-radius: 12px;
    transition: all 0.3s;
}
.footer-nav-item:hover, .footer-nav-item.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}
.nav-icon {
    font-size: 20px;
}
.nav-label {
    font-size: 11px;
    margin-top: 2px;
}

/* ========== 返回顶部按钮 ========== */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(100, 181, 246, 0.8);
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 99;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}
.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(100, 181, 246, 0.4);
}

/* ========== 分享图片样式 ========== */
.result-image-container {
    width: 360px;
    padding: 20px;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a2e 50%, #2d2d44 100%);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
/* 通用卡片 */
.share-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
/* 鸦格卡片 */
.share-yage-card {
    text-align: center;
    padding: 24px;
}
.share-image-wrap {
    width: 100px;
    height: 100px;
    margin: 0 auto 8px;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.share-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.share-type {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(90deg, #aaa, #ddd, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}
@supports not (-webkit-background-clip: text) {
    .share-type {
        -webkit-text-fill-color: #fff;
    }
}
.share-zone {
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 16px;
    display: inline-block;
    margin-bottom: 12px;
}
.share-zone.awake {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 237, 74, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.4);
    color: #ffd700;
}
.share-zone.blurry {
    background: linear-gradient(135deg, rgba(160, 160, 192, 0.2), rgba(192, 192, 216, 0.1));
    border: 1px solid rgba(160, 160, 192, 0.4);
    color: #c0c0d8;
}
.share-zone.asleep {
    background: linear-gradient(135deg, rgba(74, 74, 106, 0.2), rgba(106, 106, 138, 0.1));
    border: 1px solid rgba(74, 74, 106, 0.4);
    color: #a0a0c0;
}
.share-desc {
    font-size: 14px;
    color: #ccd6f6;
    line-height: 1.6;
    margin-top: 12px;
}
/* 引用卡片 */
.share-quote-card {
    text-align: left;
    padding: 20px;
}
.share-quote-icon {
    font-size: 24px;
    margin-bottom: 8px;
}
.share-quote-label {
    font-size: 12px;
    color: #8892b0;
    margin-bottom: 8px;
}
.share-quote-text {
    font-size: 14px;
    color: #fff;
    font-style: italic;
    line-height: 1.6;
}
/* 指数卡片 */
.share-score-card {
    text-align: left;
    padding: 20px;
}
.share-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
}
.share-dimension {
    font-size: 14px;
    color: #ccd6f6;
    line-height: 1.6;
}
/* 分享图片中的维度进度条 */
.share-dimension-gauges {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.share-dimension-gauge {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.share-gauge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.share-gauge-label {
    font-size: 13px;
    color: #fff;
    font-weight: 500;
}
.share-gauge-score {
    font-size: 12px;
    color: #8892b0;
}
.share-gauge-bar {
    position: relative;
    height: 7px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: visible;
}
.share-gauge-track {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    display: flex;
}
.share-gauge-segment {
    flex: 1;
    border-right: 1px solid rgba(0, 0, 0, 0.2);
}
.share-gauge-segment:last-child {
    border-right: none;
}
.share-gauge-segment.low { background: rgba(107, 91, 149, 0.3); }
.share-gauge-segment.mid { background: rgba(139, 123, 171, 0.3); }
.share-gauge-segment.high { background: rgba(180, 160, 200, 0.3); }
.share-gauge-pointer {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.share-gauge-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #5a6a8a;
    margin-top: 3px;
}
/* 建议卡片 */
.share-suitable-card {
    text-align: left;
    padding: 20px;
}
.share-suitable {
    font-size: 14px;
    color: #ccd6f6;
    line-height: 1.6;
}
/* 底部 */
.share-footer {
    text-align: center;
    padding: 16px;
}
.share-logo {
    font-size: 16px;
    color: #fff;
    margin-bottom: 4px;
}
.share-url {
    font-size: 12px;
    color: #8892b0;
}

/* ========== 键盘导航焦点样式 ========== */
/* 基础焦点样式 - 仅键盘导航时显示 */
*:focus { outline: 2px solid #64b5f6; outline-offset: 2px; }
*:focus:not(:focus-visible) { outline: none; }
*:focus-visible { outline: 2px solid #64b5f6; outline-offset: 2px; }

/* 链接焦点样式 */
a:focus-visible {
    outline: 2px solid #64b5f6;
    outline-offset: 3px;
    border-radius: 4px;
}

/* 按钮焦点样式 */
button:focus-visible,
.btn:focus-visible,
.start-btn:focus-visible,
.back-home-btn:focus-visible,
.action-btn:focus-visible,
.share-btn:focus-visible,
.share-option-btn:focus-visible,
.option:focus-visible {
    outline: 2px solid #64b5f6;
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(100, 181, 246, 0.25);
}

/* 输入框焦点样式 */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #64b5f6;
    outline-offset: 2px;
    border-color: #64b5f6;
    box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.2);
}

/* 底部导航焦点样式 */
.footer-nav-item:focus-visible {
    outline: 2px solid #64b5f6;
    outline-offset: 2px;
    background: rgba(100, 181, 246, 0.15);
}

/* 卡片/选项焦点样式 */
.card:focus-visible,
.question-card:focus-visible {
    outline: 2px solid #64b5f6;
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(100, 181, 246, 0.2);
}

/* 图片链接焦点样式 */
a img:focus-visible {
    outline: 2px solid #64b5f6;
    outline-offset: 2px;
    border-radius: 8px;
}
