/* 通用基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* 允许文本选择的元素 */
input, textarea, [contenteditable] {
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* 防抖动和滚动条处理 */
html, body {
    overflow-y: scroll; /* 防止滚动条消失导致的抖动 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
    width: 0;
    height: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: transparent; /* 改为透明，让背景图片显示 */
    overflow-x: hidden; /* 防止水平滚动条 */
    margin: 0;
    padding: 0;
}

/* 移除所有链接的装饰线 */
a {
    text-decoration: none !important;
    color: inherit;
}

a:hover {
    text-decoration: none !important;
    color: inherit;
}

a:focus {
    text-decoration: none !important;
    color: inherit;
}

/* 移除所有文字的装饰线 */
* {
    text-decoration: none !important;
}

/* 防止页面加载时的抖动 */
#app {
    min-height: 100vh;
    width: 100%;
    position: relative;
}

/* 通用布局样式 */
.no-gutters {
    margin: 0;
    padding: 0;
}

.row {
    display: flex;
    flex-wrap: wrap;
}

.col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

.col-9 {
    flex: 1;
}

.col-3 {
    flex: 0 0 auto;
    min-width: 80px;
}

.bg-white {
    background-color: #fff !important;
}

.bg-gray-lighter {
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

/* 登录框容器样式 */
.block {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.block-rounded {
    border-radius: 12px;
}

.block-transparent {
    background: transparent;
}

.block-fx-pop {
    transform: translateY(0);
}

.bg-image {
    background-image: none;
}

.w-100 {
    width: 100%;
}

.mb-0 {
    margin-bottom: 0;
}

.overflow-hidden {
    overflow: hidden;
}

.no-gutters > .col,
.no-gutters > [class*="col-"] {
    padding-right: 0;
    padding-left: 0;
}

.order-md-1 {
    order: 1;
}

.block-content {
    padding: 30px;
}

.block-content-full {
    padding: 30px;
}

/* 通用表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: #f8f9fa;
    height: 48px;
    box-sizing: border-box;
    margin: 0;
}

select.form-control {
    padding: 12px 16px;
    height: 48px;
    line-height: 24px;
    margin: 0;
}

.form-control:focus {
    outline: none;
    border-color: #20a53a;
    box-shadow: 0 0 0 3px rgba(32, 165, 58, 0.1);
    background: white;
}

.form-control-alt {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
}

.form-control.is-invalid {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* 通用按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-primary {
    background-color: #0665d0;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #1a8c30;
}

.btn:active:not(:disabled) {
    transform: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 通用文本样式 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-dark {
    color: #333 !important;
}

.text-muted {
    color: #6c757d !important;
}

.font-w400 {
    font-weight: 400;
}

.font-size-h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

.font-size-sm {
    text-decoration: none;
    font-size: 0.875rem;
}

/* 通用图标样式 */
.si {
    display: inline-block;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.si-support:before {
    content: "🔄";
}

.mr-1 {
    margin-right: 0.25rem;
}

/* 通用间距样式 */
.mb-3 {
    margin-bottom: 1rem;
}

.mb-0 {
    margin-bottom: 0;
}

.mx-2 {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.mx-sm-0 {
    margin-left: 0;
    margin-right: 0;
}

.p-3 {
    padding: 1rem;
}

.px-4 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.px-lg-4 {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

.py-md-4 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

.py-lg-4 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

.mr-1 {
    margin-right: 0.25rem;
}

.pr-1 {
    padding-right: 0.25rem;
}

/* 通用分隔符样式 */
.ant-divider-vertical {
    display: inline-block;
    width: 1px;
    height: 12px;
    margin: 0 8px;
    vertical-align: middle;
    background: #e8e8e8;
}

/* 通用图标样式 */
.si {
    display: inline-block;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
}

/* 通用通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    z-index: 1000;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease-out;
    transition: all 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    background-color: #28a745;
}

.notification.error {
    background-color: #dc3545;
}

.notification.warning {
    background-color: #ffc107;
    color: #333;
}

/* 通用加载状态样式 */
.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #20a53a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    color: #6c757d;
    font-size: 16px;
    margin: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 通用动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 576px) {
    .px-lg-4 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .py-md-4, .py-lg-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    .font-size-h1 {
        font-size: 2rem;
    }
    .font-size-sm {
        font-size: 0.8rem;
    }
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    .form-control {
        padding: 10px 14px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .px-lg-4 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .py-md-4, .py-lg-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
}

@media (max-width: 992px) {
    .block-content > div {
        max-width: 95%;
    }
}

@media (max-width: 480px) {
    .font-size-h1 img {
        height: 50px !important;
    }
}
