/* 通用样式 */

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 全宽按钮 */
.btn-full-width {
    width: 100%;
    margin-top: 20px;
}

/* 游戏标题 */
.game-title {
    text-align: center;
    font-family: 'Open Sans', sans-serif;
}

/* 上传提示 */
.upload-hint {
    color: #666;
    font-size: 14px;
}

/* 错误消息样式 */
.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    padding: 8px 12px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.error-message.show {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 输入框错误状态 */
.form-control.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* 禁用浏览器默认验证样式 */
input:invalid,
input:required:invalid,
input[type="email"]:invalid {
    box-shadow: none !important;
    border-color: #ced4da !important;
}

/* 完全禁用浏览器默认验证提示 */
input::-webkit-validation-bubble-message,
input::-webkit-validation-bubble-arrow {
    display: none !important;
}

/* 禁用Firefox的验证提示 */
input:invalid {
    -moz-box-shadow: none !important;
    box-shadow: none !important;
}

/* 确保我们的自定义错误样式优先级更高 */
.form-control.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* 密码输入框组样式 */
.password-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-group .form-control {
    padding-right: 45px;
}

.password-toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle-btn:hover {
    color: #495057;
    background-color: #f8f9fa;
}

.password-toggle-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.eye-icon {
    transition: all 0.2s ease;
}

.eye-icon.eye-closed {
    opacity: 1;
}

.eye-icon.eye-open {
    opacity: 1;
}

/* 捐赠图片样式 */
.donate-img-small {
    max-width: 180px;
}

/* ===== 通用头像样式 ===== */
/* 基础头像样式 - 简约设计 */
.avatar {
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e9ecef;
    box-shadow: none;
    overflow: hidden;
    position: relative;
    transition: all 0.2s ease;
}

/* 头像图片样式 */
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* 头像悬停效果 */
.avatar:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

/* 不同尺寸的头像 */
.avatar-xs {
    width: 20px;
    height: 20px;
    font-size: 10px;
}

.avatar-sm {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.avatar-md {
    width: 40px;
    height: 40px;
    font-size: 16px;
}

.avatar-lg {
    width: 60px;
    height: 60px;
    font-size: 24px;
}

.avatar-xl {
    width: 120px;
    height: 120px;
    font-size: 48px;
}

/* 头像变体样式 */
.avatar-no-border {
    border: none;
}

.avatar-no-shadow {
    box-shadow: none;
}

/* 头像状态指示器 */
.avatar-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.avatar-status.online {
    background-color: #28a745;
}

.avatar-status.offline {
    background-color: #6c757d;
}

.avatar-status.busy {
    background-color: #dc3545;
}
