/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --header-height: 60px;
    --footer-height: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

/* 背景样式（通过 JS 动态设置） */
body.mobile-device {
    background-color: var(--bg-color, #1F2937);
    background-image: var(--bg-overlay), var(--bg-image);
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body.desktop-device {
    background-color: var(--bg-color, #1F2937);
    background-image: var(--bg-overlay), var(--bg-image);
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* ==================== 移动端样式 ==================== */
.mobile-view {
    display: none;
}

.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 12px 16px;
}

.header-content {
    max-width: 28rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-icon {
    font-size: 24px;
}

.header-icon.fa-android {
    color: #3DDC84;
}

.header-icon.fa-apple {
    color: #1a1a1a;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    color: #1F2937;
}

.mobile-main {
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
    padding: calc(var(--header-height) + 20px) 16px calc(var(--footer-height) + 20px);
}

.mobile-content {
    max-width: 28rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(12px, 3vh, 24px);
}

.app-icon-wrapper {
    animation: float 3s ease-in-out infinite;
}

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

.app-icon-container {
    width: clamp(80px, 20vw, 112px);
    height: clamp(80px, 20vw, 112px);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.app-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-name {
    font-size: clamp(20px, 5vw, 28px);
    font-weight: 700;
    color: white;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.app-info {
    font-size: clamp(12px, 3vw, 14px);
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
}

.download-hint {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 12px 16px;
    text-align: center;
    color: white;
    font-weight: 500;
    font-size: clamp(11px, 2.5vw, 14px);
}

.qrcode-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.qrcode-box {
    background: white;
    padding: clamp(8px, 2vw, 12px);
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

.qrcode-box canvas {
    display: block;
    max-width: 100%;
    height: auto !important;
}

.qrcode-tip {
    font-size: clamp(10px, 2vw, 12px);
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}

.glass-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    padding: 12px 16px;
}

.download-button {
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    border: none;
    border-radius: var(--button-radius, 26px);
    background: var(--primary-color, #3DDC84);
    color: var(--dark-color, #1F2937);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(61, 220, 132, 0.35);
}

/* iOS 设备使用黑色按钮 */
body.ios-device .download-button {
    background: #1a1a1a;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

body.ios-device .download-button:hover {
    background: #2d2d2d;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(61, 220, 132, 0.45);
}

.download-button:active {
    transform: scale(0.97);
}

/* ==================== PC 端样式 ==================== */
.desktop-view {
    display: none;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.desktop-container {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    max-width: 750px;
    width: 100%;
    padding: 50px 60px;
    display: flex;
    gap: 60px;
    align-items: center;
    border-radius: 24px;
}

.desktop-left {
    flex: 1;
}

.desktop-icon {
    width: 100px;
    height: 100px;
    border-radius: 18px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.desktop-app-name {
    font-size: 28px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.desktop-app-info {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 28px;
}

.desktop-app-info span {
    display: inline-block;
    margin-right: 20px;
}

.desktop-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 320px;
}

.desktop-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.desktop-btn:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.desktop-btn img,
.desktop-btn svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.desktop-btn img {
    filter: brightness(0) invert(1);
}

.desktop-btn-text {
    flex: 1;
    text-align: left;
}

.desktop-btn-title {
    display: block;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 1px;
}

.desktop-btn-subtitle {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.desktop-right {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.desktop-qrcode-wrapper {
    background: rgba(255, 255, 255, 0.95);
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 12px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.desktop-qrcode {
    width: 180px;
    height: 180px;
}

.desktop-qrcode canvas {
    width: 100% !important;
    height: 100% !important;
}

.desktop-qrcode-tip {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .desktop-container {
        flex-direction: column;
        padding: 40px 30px;
        gap: 40px;
    }

    .desktop-right {
        order: -1;
    }
}
