/* 炀锭登录页面样式 */

.yd-login-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 32px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.yd-login-title {
    text-align: center;
    color: #2d2a23;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}

/* Tab切换 */
.yd-login-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #eee;
}

.yd-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: none;
    color: #666;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.yd-tab:hover {
    color: #b88a2a;
}

.yd-tab.active {
    color: #b88a2a;
}

.yd-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #b88a2a;
}

/* Panel */
.yd-login-panel {
    display: none;
}

.yd-login-panel.active {
    display: block;
}

/* Form */
.yd-form-group {
    margin-bottom: 20px;
}

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

.yd-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.yd-input:focus {
    outline: none;
    border-color: #b88a2a;
    box-shadow: 0 0 0 3px rgba(184, 138, 42, 0.1);
}

.yd-input::placeholder {
    color: #999;
}

/* 验证码输入组 */
.yd-code-group {
    margin-bottom: 20px;
}

.yd-code-input-wrapper {
    display: flex;
    gap: 8px;
}

.yd-code-input-wrapper .yd-input {
    flex: 1;
}

.yd-btn-send-code {
    padding: 12px 20px;
    border: 1px solid #b88a2a;
    background: white;
    color: #b88a2a;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.yd-btn-send-code:hover:not(:disabled) {
    background: #b88a2a;
    color: white;
}

.yd-btn-send-code:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 按钮 */
.yd-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.yd-btn-primary {
    background: linear-gradient(135deg, #b88a2a 0%, #d4af37 100%);
    color: white;
}

.yd-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(184, 138, 42, 0.3);
}

.yd-btn-primary:active {
    transform: translateY(0);
}

.yd-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 链接 */
.yd-login-links {
    text-align: center;
    margin-top: 16px;
}

.yd-login-links a {
    color: #b88a2a;
    text-decoration: none;
    font-size: 14px;
}

.yd-login-links a:hover {
    text-decoration: underline;
}

/* 注册提示 */
.yd-register-hint {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 14px;
}

.yd-register-hint a {
    color: #b88a2a;
    text-decoration: none;
    font-weight: 600;
    margin-left: 8px;
}

.yd-register-hint a:hover {
    text-decoration: underline;
}

/* 提示文本 */
.yd-hint {
    margin-top: 4px;
    color: #999;
    font-size: 12px;
}

/* 信息框 */
.yd-info-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    background: rgba(184, 138, 42, 0.1);
    border-left: 4px solid #b88a2a;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
}

.yd-info-box i {
    color: #b88a2a;
    font-size: 18px;
}

.yd-info-box.yd-warning {
    background: rgba(255, 193, 7, 0.1);
    border-left-color: #ffc107;
}

.yd-info-box.yd-warning i {
    color: #ffc107;
}

/* 密码强度指示器 */
.yd-password-strength {
    margin-top: 8px;
}

.yd-strength-bar {
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.yd-strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.yd-strength-fill.weak {
    width: 33%;
    background: #dc3545;
}

.yd-strength-fill.medium {
    width: 66%;
    background: #ffc107;
}

.yd-strength-fill.strong {
    width: 100%;
    background: #28a745;
}

.yd-strength-text {
    font-size: 12px;
    font-weight: 600;
}

.yd-strength-text.weak {
    color: #dc3545;
}

.yd-strength-text.medium {
    color: #ffc107;
}

.yd-strength-text.strong {
    color: #28a745;
}

/* 密码匹配提示 */
.yd-password-match {
    margin-top: 8px;
    font-weight: 600;
}

.yd-password-match.match {
    color: #28a745;
}

.yd-password-match.mismatch {
    color: #dc3545;
}

/* 密码规则 */
.yd-password-rules {
    margin-bottom: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 6px;
}

.yd-rule-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.yd-rule-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #666;
}

.yd-rule-item:last-child {
    margin-bottom: 0;
}

.yd-rule-item i {
    color: #ccc;
    font-size: 14px;
}

.yd-rule-item.valid i {
    color: #28a745;
}

.yd-rule-item.valid i::before {
    content: '\f058'; /* fa-check-circle */
}

/* 消息提示 */
.yd-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10000;
    animation: yd-message-fadein 0.3s ease;
}

.yd-message-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #3c3;
}

.yd-message-error {
    background: #fee;
    color: #c33;
    border: 1px solid #c33;
}

.yd-message-info {
    background: #eff;
    color: #39c;
    border: 1px solid #39c;
}

.yd-message-fadeout {
    animation: yd-message-fadeout 0.3s ease;
}

@keyframes yd-message-fadein {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes yd-message-fadeout {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

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

    .yd-tab {
        font-size: 14px;
        padding: 10px 12px;
    }

    .yd-btn {
        font-size: 14px;
        padding: 12px 20px;
    }
}
