/* 施工倒计时行 */
.construction-row {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #6c757d;
}

.construction-label {
    font-weight: 700;
    color: #2c3e50;
}

.construction-time {
    font-weight: 900;
    letter-spacing: 0.5px;
    color: #ff6b00; /* 降级颜色 */
    background: linear-gradient(135deg, #ff6b00, #ff8c42);
}

/* 支持渐变文字的浏览器使用渐变效果 */
@supports (-webkit-background-clip: text) {
    .construction-time {
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}

.construction-date {
    color: #999;
    font-size: 11px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

html, body {
    min-height: 100%;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
    overflow-x: hidden;
    background: #f5f7fa;
}

body { padding: 15px 0; }

.container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease-out;
}

/* 标题区 */
.header { text-align: center; margin-bottom: 20px; }

.title {
    font-size: 26px;
    font-weight: 800;
    color: #2c3e50;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.subtitle {
    font-size: 13px;
    color: #5a6c7d;
    font-weight: 500;
}

.time-info {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

/* 卡片基础样式 - 添加兼容性降级 */
.card {
    background: rgba(255, 255, 255, 0.98); /* 降级方案：不透明背景 */
    border-radius: 18px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
}

/* 支持 backdrop-filter 的浏览器使用毛玻璃效果 */
@supports (backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px)) {
    .card {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
}

/* 倒计时卡片 */
.countdown-card {
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(255, 107, 0, 0.1), rgba(255, 107, 0, 0.15), rgba(255, 107, 0, 0.1));
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.countdown-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.countdown-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

/* 渐变文字 - 添加降级颜色 */
.countdown-time {
    font-size: 28px;
    font-weight: 900;
    color: #ff6b00;
    background: linear-gradient(135deg, #ff6b00, #ff8c42);
    margin-bottom: 6px;
    letter-spacing: 1px;
}

/* 支持渐变文字的浏览器使用渐变效果 */
@supports (background-clip: text) or (-webkit-background-clip: text) {
    .countdown-time {
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

.countdown-end {
    font-size: 11px;
    color: #999;
    margin-bottom: 10px;
}

/* 按钮容器 */
.button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* 通用按钮样式重置 */
.tutorial-link,
.jump-link,
.end-link {
    display: inline-block;
    padding: 10px 20px;
    margin: 0;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: white;
    text-decoration: none;
    text-align: center;
    border: none;
    border-radius: 20px;
    outline: none;
    cursor: pointer;
    vertical-align: middle;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

/* 教程按钮样式 */
.tutorial-link {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.4);
}

.tutorial-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.5);
    background: linear-gradient(135deg, #5CBF60, #76CB7A);
}

.tutorial-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

/* 众筹按钮样式 */
.jump-link {
    background: linear-gradient(135deg, #ff6b00, #ff8c42);
    box-shadow: 0 3px 10px rgba(255, 107, 0, 0.4);
}

.jump-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.5);
    background: linear-gradient(135deg, #ff7a1a, #ff9a52);
}

.jump-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.4);
}

/* 前往结束页按钮 */
.end-link {
    background: linear-gradient(135deg, #2196F3, #42A5F5);
    box-shadow: 0 3px 10px rgba(33, 150, 243, 0.4);
}

.end-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.5);
    background: linear-gradient(135deg, #1E88E5, #52B0F7);
}

.end-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.4);
}

/* 弹窗遮罩 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 弹窗内容 */
.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 25px 20px 20px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.modal-title {
    font-size: 22px;
    font-weight: 800;
    color: #2c3e50;
    text-align: center;
    margin: 0;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #ff6b00;
    color: white;
    transform: rotate(90deg);
}

.modal-body { padding: 25px; }

.tutorial-step {
    margin-bottom: 18px;
    padding-left: 35px;
    position: relative;
}

.tutorial-step:last-child { margin-bottom: 0; }

.step-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #ff6b00, #ff8c42);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.step-text {
    font-size: 15px;
    color: #333;
    line-height: 26px;
}

.step-highlight {
    color: #ff6b00;
    font-weight: 700;
}

.modal-footer {
    padding: 20px 25px 25px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.modal-jump-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #ff6b00, #ff8c42);
    color: white;
    font-size: 14px;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
    border: none;
}

.modal-jump-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 0, 0.4);
}

.modal-jump-btn:active { transform: translateY(0); }

/* 欢迎弹窗特殊样式 */
.welcome-modal-content { max-width: 600px; }

.welcome-intro {
    font-size: 15px;
    color: #555;
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.6;
}

.qrcode-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.qrcode-item {
    text-align: center;
    flex: 1;
    min-width: 200px;
    max-width: 250px;
}

.qrcode-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.qrcode-img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.qrcode-label {
    font-size: 14px;
    color: #666;
    margin-top: 12px;
    font-weight: 600;
}

.welcome-tip {
    font-size: 13px;
    color: #999;
    text-align: center;
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* 统计网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

/* Grid 降级方案 */
@supports not (display: grid) {
    .stats-grid { display: flex; flex-wrap: wrap; }
    .stat-card { flex: 0 0 calc(50% - 6px); margin-bottom: 12px; }
    .stat-card:nth-child(odd) { margin-right: 6px; }
    .stat-card:nth-child(even) { margin-left: 6px; }
}

.stat-card {
    padding: 14px 12px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.stat-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.stat-value {
    font-size: 30px;
    font-weight: 900;
    color: #333;
    margin-bottom: 5px;
    line-height: 1;
}

.stat-value.highlight {
    color: #ff6b00; /* 降级方案 */
    background: linear-gradient(135deg, #ff6b00, #ff8c42);
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
    .stat-value.highlight {
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

.stat-sub { font-size: 11px; color: #67c23a; margin-top: 3px; }
.stat-sub-gray { font-size: 10px; color: #999; margin-top: 2px; }

/* 背景进度条样式 */
.stat-bg-progress {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0%;
    background: linear-gradient(90deg,
        rgba(255, 107, 0, 0.08),
        rgba(255, 107, 0, 0.12),
        rgba(255, 107, 0, 0.08));
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 18px 0 0 18px;
    z-index: 0;
}

.stat-content { position: relative; z-index: 1; }

/* 时间估算 */
.estimate-card {
    padding: 16px 14px 15px;
    margin-bottom: 15px;
    text-align: center;
}

.estimate-controls {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.estimate-field {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    height: 46px;
    padding: 0 10px;
    border: 1px solid #eef0f3;
    border-radius: 8px;
    background: #fafbfc;
    cursor: pointer;
    transition: all 0.2s ease;
}

.estimate-field:focus-within {
    border-color: #ff8c42;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.10);
}

.estimate-field span {
    flex: 0 0 auto;
    font-size: 12px;
    color: #6c757d;
    font-weight: 700;
}

.estimate-field select {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 4px;
    border: none;
    background: transparent;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    outline: none;
    cursor: pointer;
}

.estimate-field select:disabled {
    color: #b6bdc5;
}

.estimate-result {
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid #f0f2f5;
}

.estimate-value {
    display: inline-block;
    max-width: 100%;
    font-size: 28px;
    line-height: 1.1;
    font-weight: 900;
    color: #ff6b00;
    background: linear-gradient(135deg, #ff6b00, #ff8c42);
    white-space: nowrap;
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
    .estimate-value {
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

.estimate-note {
    display: none;
}

/* 图表卡片 */
.chart-card { padding: 18px 12px; }

#chart { height: 300px; width: 100%; }

.data-note {
    margin-top: 8px;
    text-align: center;
    font-size: 11px;
    color: #999;
    line-height: 1.5;
}

/* 加载指示器 */
.loading {
    position: fixed;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.98);
    padding: 10px 16px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-size: 11px;
    color: #666;
    opacity: 0;
    transform: translateX(80px);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 6px;
}

@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
    .loading {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

.loading.show { opacity: 1; transform: translateX(0); }

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #ff6b00;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 15px;
    color: #6c757d;
    font-size: 11px;
}

.footer a {
    color: #ff6b00;
    text-decoration: none;
    font-weight: 600;
}

/* 新增：APP打开链接样式（继承jump-link） */
.app-link {
    display: none; /* 默认隐藏，非移动端 */
    text-decoration: none;
    font-size: 15px; /* 与step-text一致 */
    padding: 4px 8px;
    margin: 0 2px;
    line-height: inherit;
}

/* 移动端显示 */
@media (max-width: 768px) {
    body { padding: 10px 0; }

    .construction-row { margin-top: 8px; gap: 6px; font-size: 11px; }
    .construction-date { font-size: 10px; }

    .container { width: 96%; }
    .title { font-size: 20px; }
    .subtitle { font-size: 12px; }

    .countdown-card { padding: 16px; margin-bottom: 12px; }
    .countdown-time { font-size: 22px; }
    .countdown-end { font-size: 10px; }

    .jump-link, .tutorial-link, .end-link { padding: 8px 14px; font-size: 10px; line-height: 1; }
    .button-group { gap: 6px; }

    .modal-content { max-height: 90vh; margin: 10px; }
    .modal-header { padding: 20px 15px 15px; }
    .modal-title { font-size: 18px; padding-right: 35px; }
    .modal-close { width: 28px; height: 28px; top: 15px; right: 15px; font-size: 16px; }
    .modal-body { padding: 20px 15px; }

    .tutorial-step { margin-bottom: 15px; padding-left: 32px; }
    .step-number { width: 24px; height: 24px; font-size: 11px; }
    .step-text { font-size: 14px; line-height: 24px; }

    .modal-footer { padding: 15px 15px 20px; }
    .modal-jump-btn { padding: 10px 24px; font-size: 13px; }

    .welcome-intro { font-size: 14px; }
    .qrcode-container { gap: 15px; }
    .qrcode-item { min-width: 150px; }
    .qrcode-label { font-size: 13px; }
    .welcome-tip { font-size: 12px; }

    .stats-grid { gap: 10px; margin-bottom: 12px; }
    .stat-card { padding: 12px 10px; }
    .stat-label { font-size: 12px; margin-bottom: 5px; }
    .stat-value { font-size: 24px; margin-bottom: 4px; }
    .stat-sub { font-size: 10px; }
    .stat-sub-gray { font-size: 9px; }

    .estimate-card { padding: 14px 12px; margin-bottom: 12px; }
    .estimate-controls { gap: 7px; margin-bottom: 10px; }
    .estimate-field { height: 42px; gap: 3px; padding: 0 8px; }
    .estimate-field span { font-size: 11px; }
    .estimate-field select { height: 40px; padding: 0 2px; font-size: 13px; }
    .estimate-result { padding-top: 10px; }
    .estimate-value { font-size: 23px; }
    .estimate-note { font-size: 10px; }

    .chart-card { padding: 15px 10px; }
    #chart { height: 240px; }
    .data-note { font-size: 10px; margin-top: 6px; }

    .footer { padding: 12px; font-size: 10px; }

    .loading { top: 10px; right: 10px; padding: 8px 14px; font-size: 10px; }

    .app-link { display: inline-block; }
    .desktop-text { display: none; }
}

/* PC/大屏显示纯文本 */
@media (min-width: 769px) {
    .desktop-text { display: inline; }
}

/* 确保高亮一致（绿色底白字，稍大字体/按钮） */
.app-link.step-highlight {
    color: white !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #4CAF50, #66BB6A) !important;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3) !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    transition: all 0.3s ease;
    line-height: inherit;
    margin: 0 2px;
}

.app-link.step-highlight:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4) !important;
    background: linear-gradient(135deg, #5CBF60, #76CB7A) !important;
}

.app-link.step-highlight:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(76, 175, 80, 0.3) !important;
}

/* 跳转图标样式 */
.jump-icon { margin-left: 4px; font-size: 10px; }

@media (max-width: 480px) {
    .title { font-size: 18px; }
    .countdown-time { font-size: 20px; }
    .stat-value { font-size: 22px; }
    .estimate-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .estimate-value { font-size: 21px; }
    #chart { height: 220px; }
    .modal-title { font-size: 16px; }
    .step-text { font-size: 13px; }
    .modal-jump-btn { padding: 9px 20px; font-size: 12px; }
    .app-link.step-highlight { font-size: 15px !important; padding: 5px 10px !important; }
}

/* 横屏优化 */
@media (max-width: 768px) and (orientation: landscape) {
    #chart { height: 200px; }
}
