* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

body,
html {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
    margin: 0;
    padding: 0
}

/* 加载遮罩界面 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.loading-overlay.hide {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.1);
}

.loading-content {
    text-align: center;
    color: #333333;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(51, 51, 51, 0.3);
    border-top: 4px solid #333333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
    color: #333333;
}

.loading-details {
    margin-bottom: 30px;
    min-height: 60px;
}

.loading-step {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.loading-info {
    font-size: 14px;
    color: #666666;
    font-weight: 400;
}

.loading-progress {
    width: 200px;
    height: 4px;
    background: rgba(51, 51, 51, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-bar {
    height: 100%;
    background: linear-gradient(90deg, #333333, #666666);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1
}

.background-overlay {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffffff 0, #ffffff 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(2px);
    transform: scale(1.05);
    transition: background .3s ease, filter .3s ease;
    will-change: filter, background;
}

.background-dim {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: all .4s cubic-bezier(.25, .46, .45, .94);
    pointer-events: none
}

.background-dim.active {
    background: rgba(0, 0, 0, .6)
}

.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    padding: 20px;
    opacity: 0;
    transform: translateY(20px);
    box-sizing: border-box;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.main-content.show {
    opacity: 1;
    transform: translateY(0);
}


.glass-container {
    background: rgba(255, 255, 255, .25);
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 24px;
    padding: 50px 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .1), 0 0 0 1px rgba(255, 255, 255, .2) inset, 0 4px 16px rgba(255, 255, 255, .15) inset;
    max-width: 500px;
    max-height: 90vh;
    width: calc(100% - 40px);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateZ(0) scale(0.95);
    will-change: transform, background, box-shadow;
    box-sizing: border-box;
    animation: glassContainerEntrance 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.glass-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .4), transparent)
}

.content-wrapper {
    text-align: center;
    position: relative;
    z-index: 1
}

.main-title {
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, .3);
    letter-spacing: -.5px;
    animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s both;
}

.subtitle {
    font-size: 18px;
    font-weight: 400;
    color: rgba(255, 255, 255, .8);
    margin-bottom: 50px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s both;
}

.button-container {
    margin-bottom: 30px
}

.console-button {
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 16px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s both;
}

.console-button:hover {
    background: rgba(255, 255, 255, .25);
    border-color: rgba(255, 255, 255, .4);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, .2);
}

.console-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2)
}

.divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .4), transparent);
    margin-bottom: 25px
}

.terms-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap
}

.terms-link {
    color: rgba(255, 255, 255, .7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.8s both;
}

.terms-link:hover {
    color: rgba(255, 255, 255, .9);
    transform: translateY(-2px) scale(1.05);
}

.terms-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: rgba(255, 255, 255, .7);
    transition: width .3s ease
}

.terms-link:hover::after {
    width: 100%
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: brightness(1);
    -webkit-backdrop-filter: brightness(1);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all .4s cubic-bezier(.25, .46, .45, .94)
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    background: rgba(0, 0, 0, .3);
    backdrop-filter: brightness(.4);
    -webkit-backdrop-filter: brightness(.4)
}

.modal-content {
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3), 0 0 0 1px rgba(255, 255, 255, .1) inset, 0 4px 16px rgba(255, 255, 255, .1) inset;
    transform: scale(.9) translateY(30px);
    transition: all .4s cubic-bezier(.25, .46, .45, .94), background .3s ease;
    box-sizing: border-box
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0)
}

.modal-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, .1);
    display: flex;
    justify-content: space-between;
    align-items: center
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, .3)
}

.close-button {
    background: 0 0;
    border: none;
    font-size: 24px;
    color: rgba(255, 255, 255, .8);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all .2s ease
}

.close-button:hover {
    background: rgba(255, 255, 255, .2);
    color: #fff
}

.modal-body {
    padding: 25px 30px
}

.terms-section {
    margin-bottom: 25px
}

.terms-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .3)
}

.terms-section p {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .9);
    margin-bottom: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .2)
}

.modal-footer {
    padding: 20px 30px 25px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    text-align: center
}

.agree-button {
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 12px;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all .3s cubic-bezier(.25, .46, .45, .94);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1), 0 0 0 1px rgba(255, 255, 255, .1) inset;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .2)
}

.agree-button:hover {
    background: rgba(255, 255, 255, .25);
    border-color: rgba(255, 255, 255, .4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .15), 0 0 0 1px rgba(255, 255, 255, .2) inset
}

.agree-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2), 0 0 0 1px rgba(255, 255, 255, .1) inset
}

@media (max-width:768px) {
    .glass-container {
        padding: 30px 20px;
        max-height: 85vh;
        width: calc(100% - 20px);
        margin: 0
    }

    .main-title {
        font-size: 32px;
        margin-bottom: 6px
    }

    .subtitle {
        font-size: 14px;
        margin-bottom: 30px
    }

    .button-container {
        margin-bottom: 20px
    }

    .terms-container {
        gap: 15px;
        flex-direction: column;
        align-items: center
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 0
    }

    .modal-body,
    .modal-footer,
    .modal-header {
        padding-left: 15px;
        padding-right: 15px
    }
}

@media (max-width:480px) {
    .glass-container {
        padding: 25px 15px;
        max-height: 90vh;
        border-radius: 16px
    }

    .main-title {
        font-size: 28px
    }

    .subtitle {
        font-size: 13px
    }

    .console-button {
        padding: 12px 24px;
        font-size: 14px
    }

    .modal-content {
        width: 98%;
        max-height: 95vh;
        border-radius: 16px
    }
    
    .settings-modal {
        top: 10px;
        right: 10px;
        width: calc(100vw - 20px);
        max-width: 300px;
    }
    
    .settings-content {
        max-width: 100%;
        width: 100%;
    }
    
    .settings-content::before {
        top: 12px;
        right: -6px;
        border-left: 6px solid rgba(255, 255, 255, 0.3);
        border-top: 6px solid transparent;
        border-bottom: 6px solid transparent;
    }
}

.settings-button {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 20px;
    color: white;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideInRight 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s both;
}

.settings-button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px) scale(1.08);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}

.settings-modal {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 320px;
    height: auto;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: brightness(1);
    -webkit-backdrop-filter: brightness(1);
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: scale(0) translateY(-20px);
    transform-origin: top right;
    pointer-events: none;
}

.settings-modal.active {
    opacity: 1;
    visibility: visible;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: brightness(1);
    -webkit-backdrop-filter: brightness(1);
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

.settings-content {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    max-width: 320px;
    width: 100%;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 4px 16px rgba(255, 255, 255, 0.1) inset;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), background 0.3s ease;
    box-sizing: border-box;
    position: relative;
    transform-origin: top right;
}

.settings-modal.active .settings-content {
    transform: scale(1);
}

/* 添加一个指向设置按钮的小三角 */
.settings-content::before {
    content: '';
    position: absolute;
    top: 15px;
    right: -8px;
    width: 0;
    height: 0;
    border-left: 8px solid rgba(255, 255, 255, 0.3);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    z-index: 1;
}

.settings-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.settings-close {
    background: none;
    border: none;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.settings-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.settings-body {
    padding: 25px 30px;
}

.setting-item {
    margin-bottom: 25px;
}

.setting-label {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
    color: white;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.setting-checkbox {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.setting-checkbox:checked + .checkmark {
    background: rgba(34, 197, 94, 0.8);
    border-color: #22c55e;
}

.setting-checkbox:checked + .checkmark::after {
    opacity: 1;
}

.slider-container {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.blur-slider {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin-right: 15px;
    cursor: pointer;
}

.blur-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #22c55e;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.blur-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #22c55e;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.slider-value {
    color: white;
    font-size: 14px;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.settings-footer {
    padding: 20px 30px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.reset-button {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(239, 68, 68, 0.1) inset;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.reset-button:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(239, 68, 68, 0.2) inset;
}

.reset-button:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(239, 68, 68, 0.1) inset;
}

.save-button {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.save-button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.save-button:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

/* 背景错误提示样式 */
.background-error-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 1000;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
}

.background-error-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.error-content {
    background: rgba(239, 68, 68, 0.9);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 12px 20px;
    box-shadow: 
        0 8px 32px rgba(239, 68, 68, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 400px;
    animation: errorPulse 2s ease-in-out infinite;
}

.error-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.error-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1.4;
}

@keyframes errorPulse {
    0%, 100% {
        box-shadow: 
            0 8px 32px rgba(239, 68, 68, 0.3),
            0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    }
    50% {
        box-shadow: 
            0 8px 32px rgba(239, 68, 68, 0.5),
            0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    }
}

@keyframes glassContainerEntrance {
    0% {
        opacity: 0;
        transform: translateZ(0) scale(0.8) translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateZ(0) scale(1) translateY(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}