/* ============================================================
   优超登录系统 - 弹窗样式
   ============================================================ */

/* 弹窗遮罩 */
.cys-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cys-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* 弹窗容器 */
.cys-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 420px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    z-index: 99999;
}

.cys-modal-overlay.active .cys-modal {
    transform: translateY(0);
}

/* 关闭按钮 */
.cys-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 20px;
    color: #999;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.cys-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* 弹窗标题 */
.cys-modal-title {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 24px;
    text-align: center;
}

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

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

.cys-form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.cys-form-group input:focus {
    outline: none;
    border-color: #00BE64;
    box-shadow: 0 0 0 3px rgba(0, 190, 100, 0.1);
}

.cys-form-group input.error {
    border-color: #FA5A5A;
    box-shadow: 0 0 0 3px rgba(250, 90, 90, 0.1);
}

/* 提交按钮 */
.cys-btn-submit {
    width: 100%;
    padding: 14px;
    background: #00BE64;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 8px;
}

.cys-btn-submit:hover {
    background: #00a857;
}

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

.cys-btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 切换链接 */
.cys-modal-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.cys-modal-switch a {
    color: #00BE64;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.cys-modal-switch a:hover {
    text-decoration: underline;
}

/* 错误提示 */
.cys-error-msg {
    background: #fff2f2;
    border: 1px solid #ffcdd2;
    color: #c62828;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
}

.cys-error-msg.show {
    display: block;
}

/* 成功提示 */
.cys-success-msg {
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    color: #22543d;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
}

.cys-success-msg.show {
    display: block;
}

/* 验证页面专用 */
.cys-verify-container {
    max-width: 420px;
    margin: 60px auto;
    text-align: center;
    padding: 40px 24px;
}

.cys-verify-container .cys-verify-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.cys-verify-container .cys-verify-title {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.cys-verify-container .cys-verify-text {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
}

.cys-verify-container .cys-btn-submit {
    max-width: 200px;
    margin: 24px auto 0;
}

/* 加载动画 */
.cys-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: cys-spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes cys-spin {
    to { transform: rotate(360deg); }
}

/* 响应式 */
@media (max-width: 480px) {
    .cys-modal {
        margin: 16px;
        padding: 24px;
    }
}
