/* 应用锁弹窗样式 */
.app-lock-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2147483647;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.app-lock-modal.active {
    opacity: 1;
    visibility: visible;
}

.app-lock-content {
    background: var(--card-bg);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.app-lock-modal.active .app-lock-content {
    transform: scale(1);
}

.app-lock-header {
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--nav-border);
    background: linear-gradient(to right, rgba(10, 102, 194, 0.05), rgba(13, 124, 79, 0.05));
}

.app-lock-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.app-lock-body {
    padding: 20px;
}

.app-lock-section {
    margin-bottom: 25px;
}

.app-lock-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--nav-border);
}

.app-lock-option {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.app-lock-option .action-button {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-lock-option .action-button:hover {
    background-color: rgba(10, 102, 194, 0.1);
    transform: translateX(5px);
}

.app-lock-option .action-button i {
    width: 20px;
    text-align: center;
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-right: 15px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.toggle-label {
    font-size: 14px;
    color: var(--text-color);
}

.lock-time-selector, .lock-mode-selector {
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 10px;
}

.lock-time-selector label, .lock-mode-selector label {
    margin-right: 10px;
    font-size: 14px;
    color: var(--text-color);
}

.lock-time-selector select, .lock-mode-selector select {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--nav-border);
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 14px;
}

/* 密码弹窗样式 */
.password-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2147483647;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.password-modal.active {
    opacity: 1;
    visibility: visible;
}

.password-content {
    background: var(--card-bg);
    border-radius: 16px;
    width: 90%;
    max-width: 350px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.password-modal.active .password-content {
    transform: scale(1);
}

.password-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--nav-border);
}

.password-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.password-body {
    padding: 25px 20px;
}

.password-input-container {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.password-input-dots {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.password-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #ddd;
    margin: 0 8px;
    transition: all 0.3s ease;
}

.password-dot.filled {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

.password-input-keypad {
    width: 100%;
}

.keypad-row {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.keypad-btn {
    width: 70px;
    height: 70px;
    margin: 0 8px;
    border-radius: 50%;
    border: 1px solid var(--nav-border);
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 24px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.keypad-btn:hover {
    background-color: rgba(10, 102, 194, 0.1);
    transform: scale(1.05);
}

.keypad-btn:active {
    transform: scale(0.95);
}

.password-hint {
    text-align: center;
    font-size: 14px;
    color: var(--secondary-color);
    margin-top: 20px;
}



/* 解锁弹窗样式 */
.unlock-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(255 255 255);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2147483647;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.unlock-modal.active {
    opacity: 1;
    visibility: visible;
}

.unlock-content {
    background: var(--card-bg);
    border-radius: 16px;
    width: 90%;
    max-width: 350px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    text-align: center;
}

.unlock-modal.active .unlock-content {
    transform: scale(1);
}

.unlock-header {
    padding: 30px 20px 20px;
}

.unlock-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 20px 0;
}

.lock-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.unlock-body {
    padding: 0 20px 30px;
}

.unlock-attempts {
    margin-top: 20px;
    font-size: 14px;
    color: #ff6b6b;
    font-weight: 500;
}

/* 应用锁错误震动动画 */
@keyframes app-lock-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}



/* 响应式设计 */
@media (max-width: 768px) {
    .app-lock-content {
        width: 95%;
        max-width: 95%;
    }
    
    .app-lock-header {
        padding: 20px 15px;
    }
    
    .app-lock-body {
        padding: 15px;
    }
    
    .keypad-btn {
        width: 60px;
        height: 60px;
        margin: 0 5px;
        font-size: 20px;
    }
    
    .pattern-grid {
        width: 180px;
        height: 180px;
        grid-gap: 25px;
    }
}