/* 全局样式 */
* {
    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, #e8c5d4 0%, #d4a5c0 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* 密码验证界面样式 */
.auth-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    padding: 20px;
    background: linear-gradient(135deg, #e8c5d4 0%, #d4a5c0 100%);
    z-index: 9999;
}

.auth-card {
    background: white;
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-width: 420px;
    width: 100%;
    animation: slideUp 0.4s ease;
}

.auth-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.auth-icon {
    font-size: 64px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.auth-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    letter-spacing: 0.5px;
}

.auth-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-hint {
    text-align: center;
    font-size: 16px;
    color: #718096;
    margin: 0;
    font-weight: 500;
}

.auth-body .form-group {
    margin-bottom: 0;
}

.auth-body .form-group input[type="password"] {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f7fafc;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 2px;
}

.auth-body .form-group input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.auth-body .form-group input[type="password"]::placeholder {
    color: #a0aec0;
    letter-spacing: normal;
    font-weight: 400;
}

.auth-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    letter-spacing: 1px;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.auth-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.auth-error {
    padding: 14px 18px;
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    color: #742a2a;
    border: 2px solid #fc8181;
    border-radius: 12px;
    font-size: 14px;
    text-align: center;
    font-weight: 600;
    animation: shake 0.5s ease;
    box-shadow: 0 4px 12px rgba(252, 129, 129, 0.3);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

/* 提示信息样式 */
.auth-tips {
    margin-top: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #e6fffa 0%, #b2f5ea 100%);
    border-radius: 10px;
    border: 1px solid #81e6d9;
}

.auth-tips p {
    margin: 0;
    font-size: 13px;
    color: #234e52;
    text-align: center;
    font-weight: 500;
}

/* 响应式优化 */
@media (max-width: 600px) {
    .auth-card {
        padding: 36px 28px;
    }

    .auth-header h2 {
        font-size: 24px;
    }

    .auth-icon {
        font-size: 56px;
    }

    .auth-tips p {
        font-size: 12px;
    }
}

.container {
    max-width: 500px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 卡片样式 */
.card {
    background: #f5f5f5;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.card-header .icon {
    font-size: 20px;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* 表单样式 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: #5a5a72;
}

.form-group input[type="text"]::placeholder {
    color: #999;
}

/* UDID 输入组样式 */
.udid-input-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.udid-input-group input {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    transition: border-color 0.3s;
}

.udid-input-group input:focus {
    outline: none;
    border-color: #5a5a72;
}

/* 获取UDID按钮 */
.btn-get-udid {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-get-udid:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-get-udid:active {
    transform: translateY(0);
}

.btn-get-udid span:first-child {
    font-size: 16px;
}

@media (max-width: 480px) {
    .udid-input-group {
        flex-direction: column;
    }
    
    .btn-get-udid {
        justify-content: center;
    }
}

/* 复选框样式 */
.checkbox-group {
    margin: 20px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #5a5a72;
}

.checkbox-label span {
    font-size: 14px;
    color: #333;
}

/* 下载按钮样式 */
.download-btn {
    width: 100%;
    padding: 14px 24px;
    background: #5a5a72;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.3s, transform 0.1s;
}

.download-btn:hover {
    background: #4a4a62;
}

.download-btn:active {
    transform: scale(0.98);
}

.download-btn:disabled {
    background: #999;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    font-size: 18px;
}

/* 安装按钮样式 */
.install-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    transition: opacity 0.3s, transform 0.1s;
}

.install-btn:hover {
    opacity: 0.9;
}

.install-btn:active {
    transform: scale(0.98);
}

.install-btn:disabled {
    background: #999;
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}

/* 进度条样式 */
.progress-container {
    margin-top: 16px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #5a5a72, #7a7a92);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* 说明列表样式 */
.instruction-list {
    list-style: none;
    padding: 0;
}

.instruction-list li {
    padding: 10px 0;
    padding-left: 24px;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    position: relative;
}

.instruction-list li::before {
    content: "•";
    position: absolute;
    left: 8px;
    color: #5a5a72;
    font-weight: bold;
}

/* 卡密状态显示 */
.card-key-status {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #22c55e;
    border-radius: 8px;
    margin-top: 8px;
}

.card-key-status .status-icon {
    font-size: 16px;
    margin-right: 8px;
    color: #22c55e;
}

.card-key-status .status-text {
    color: #16a34a;
    font-size: 14px;
    font-weight: 500;
}

/* 卡密输入框特殊样式 */
#password {
    transition: all 0.3s ease;
}

#password:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* 响应式设计 */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    .card {
        padding: 20px;
    }
    
    .card-header h2 {
        font-size: 16px;
    }
}

/* 动画效果 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.progress-fill {
    animation: pulse 1.5s ease-in-out infinite;
}

/* 成功/错误提示 */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
    display: none;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert.show {
    display: block;
}

.alert.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.modal-icon {
    font-size: 32px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.modal-body {
    margin-bottom: 24px;
}

.modal-body p {
    margin: 8px 0;
    font-size: 15px;
    color: #555;
}

.modal-hint {
    font-weight: 500;
    color: #333;
}

.modal-warning {
    font-size: 13px;
    color: #ff6b6b;
    margin-top: 12px;
}

.modal-footer {
    display: flex;
    gap: 12px;
}

.modal-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.1s;
}

.modal-btn:hover {
    opacity: 0.9;
}

.modal-btn:active {
    transform: scale(0.98);
}

.modal-btn-cancel {
    background: #e0e0e0;
    color: #555;
}

.modal-btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-btn-secondary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

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

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

