* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    padding: 10px;
}

/* 背景动画网格 */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 107, 53, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 107, 53, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

#particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 500px;
    padding: 0;
}

.glass-card {
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 107, 53, 0.2);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    text-align: center;
    color: #ffffff;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(255, 107, 53, 0.3);
    word-break: keep-all;
}

.input-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 16px;
    color: white;
    transition: all 0.3s ease;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: #ff6b35;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.2);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c61 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

.btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    transition: transform 0.5s ease;
}

.btn-primary:active .btn-glow {
    transform: translate(-50%, -50%) scale(2);
}

.message {
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    display: none;
    animation: slideIn 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    word-break: break-word;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.message.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.download-info {
    display: none;
    margin-top: 30px;
    padding: 25px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 107, 53, 0.2);
    animation: fadeIn 0.5s ease;
}

.success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.success-text {
    text-align: center;
    color: white;
    margin-bottom: 15px;
    font-size: 18px;
}

.download-info p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    text-align: center;
    font-size: 14px;
}

/* 🆕 系统标识样式 */
.system-badge {
    display: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    margin: 15px auto;
    text-align: center;
    border: 2px solid;
    transition: all 0.3s ease;
    animation: badgeIn 0.5s ease;
    backdrop-filter: blur(10px);
    letter-spacing: 0.5px;
}

@keyframes badgeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin: 10px auto;
    text-align: center;
}

.badge-inactive {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-download {
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.btn-download:active {
    transform: scale(0.98);
}

/* 浮动光点效果 */
.floating-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: float 6s ease-in-out infinite;
    opacity: 0.3;
    z-index: 0;
}

.orb1 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.4), transparent);
    top: -125px;
    right: -125px;
    animation-delay: 0s;
}

.orb2 {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.3), transparent);
    bottom: -90px;
    left: -90px;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(20px, -20px) scale(1.05);
    }
}

/* 弹窗样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 20px;
    padding: 30px 25px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
    position: relative;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.modal-icon {
    font-size: 28px;
}

.modal-title {
    font-size: 20px;
    color: #ff6b35;
    font-weight: 700;
}

.modal-body {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    font-size: 14px;
}

.modal-body p {
    margin-bottom: 16px;
    padding-left: 20px;
    position: relative;
}

.modal-body p::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #ff6b35;
    font-size: 20px;
}

.modal-body strong {
    color: #ff6b35;
    font-weight: 600;
}

.modal-footer {
    margin-top: 25px;
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.btn-modal {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.btn-confirm {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-confirm:active {
    transform: scale(0.98);
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-cancel:active {
    background: rgba(255, 255, 255, 0.08);
}

/* 移动端优化 */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .glass-card {
        padding: 30px 20px;
        border-radius: 20px;
    }

    h1 {
        font-size: 24px;
        margin-bottom: 25px;
    }

    input {
        padding: 14px 16px;
        font-size: 16px; /* 防止iOS自动缩放 */
    }

    .btn-primary,
    .btn-download {
        padding: 14px;
        font-size: 15px;
    }

    /* 🆕 移动端系统标识优化 */
    .system-badge {
        padding: 8px 16px;
        font-size: 14px;
    }

    .modal-content {
        padding: 25px 20px;
        border-radius: 16px;
        max-width: 95%;
    }

    .modal-title {
        font-size: 18px;
    }

    .modal-body {
        font-size: 13px;
    }

    .modal-icon {
        font-size: 24px;
    }

    .success-icon {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }

    .success-text {
        font-size: 16px;
    }

    .floating-orb {
        display: none; /* 在移动端隐藏装饰元素以提升性能 */
    }

    .modal-footer {
        gap: 10px;
    }

    .btn-modal {
        padding: 12px;
        font-size: 14px;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 360px) {
    .glass-card {
        padding: 25px 15px;
    }

    h1 {
        font-size: 20px;
    }

    input,
    .btn-primary,
    .btn-download {
        font-size: 14px;
        padding: 12px;
    }

    /* 🆕 小屏幕系统标识优化 */
    .system-badge {
        padding: 6px 12px;
        font-size: 13px;
    }

    .modal-content {
        padding: 20px 15px;
    }

    .modal-body {
        font-size: 12px;
    }
}

/* 版本提示样式 */
.version-hint {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.version-hint ul {
    list-style: none;
    padding: 0;
    line-height: 1.8;
}

/* 双按钮容器 */
.double-download-btns {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

/* 正常版本按钮（推荐） */
.btn-normal {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    position: relative;
}

.btn-normal::after {
    content: '推荐';
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff9800;
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
}

.btn-normal:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
}

/* 兼容版本按钮 */
.btn-compat {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

.btn-compat:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
}

/* 响应式：小屏幕时按钮垂直排列 */
@media (max-width: 600px) {
    .double-download-btns {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-download {
        width: 100%;
    }
}