/* ==================== 基础样式 ==================== */
:root {
    --primary-color: #2563eb;
    --secondary-color: #16a34a;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gold-color: #f59e0b;
    --purple-color: #9333ea;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #3b82f6;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ==================== 滚动条样式 ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.5);
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(37, 99, 235, 0.8);
}

/* ==================== 玻璃拟态效果 ==================== */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
}

/* ==================== 渐变效果 ==================== */
.gradient-bg {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.gradient-text {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.gold-gradient-bg {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* ==================== 卡片效果 ==================== */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* ==================== 波纹按钮效果 ==================== */
.ripple-button {
    position: relative;
    overflow: hidden;
}

.ripple-button:after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 0.8s;
}

.ripple-button:active:after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* ==================== 加载动画 ==================== */
.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==================== 进度条样式 ==================== */
.progress-bar {
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar-fill:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(-45deg,
            rgba(255, 255, 255, 0.2) 25%,
            transparent 25%,
            transparent 50%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0.2) 75%,
            transparent 75%,
            transparent);
    background-size: 20px 20px;
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 20px 20px;
    }
}

/* ==================== 动画效果 ==================== */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.5s ease-in-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scale-in {
    animation: scaleIn 0.3s ease-in-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==================== 表单样式 ==================== */
.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ==================== 流光边框效果 ==================== */
.flow-border {
    position: relative;
    overflow: hidden;
}

.flow-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(54, 162, 235, 0.2), transparent);
    transition: left 0.8s ease-in-out;
}

.flow-border:hover::before {
    left: 100%;
}

/* ==================== 通知提示框样式 ==================== */
#toast {
    transition: transform 0.3s ease;
}

#toast.translate-x-full {
    transform: translateX(100%);
}

/* ==================== 状态颜色 ==================== */
.text-success {
    color: var(--success-color);
}

.text-warning {
    color: var(--warning-color);
}

.text-error {
    color: var(--error-color);
}

.text-info {
    color: var(--info-color);
}

.bg-success {
    background-color: var(--success-color);
}

.bg-warning {
    background-color: var(--warning-color);
}

.bg-error {
    background-color: var(--error-color);
}

.bg-info {
    background-color: var(--info-color);
}

/* ==================== 响应式字体 ==================== */
.text-sm-mobile {
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .text-sm-mobile {
        font-size: 0.8125rem;
    }
}

/* ==================== 移动端适配 ==================== */
@media (max-width: 768px) {
    /* 移动端菜单按钮 */
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    /* 移动端菜单 */
    .mobile-menu {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .mobile-menu.open {
        transform: translateX(0);
    }

    /* 主内容区域 */
    .main-content,
    .top-nav,
    .footer {
        margin-left: 0 !important;
        padding: 10px !important;
    }

    /* 表单容器 */
    .form-container,
    .info-card {
        padding: 10px !important;
        margin-bottom: 10px !important;
    }

    /* 标题字体大小 */
    h1 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.25rem !important;
    }

    /* 富文本容器移动端优化 */
    .rich-text-container {
        padding: 1rem !important;
        min-height: auto !important;
        line-height: 1.6 !important;
    }

    .rich-text-container h1 {
        font-size: 1.5rem !important;
        margin-bottom: 0.75rem !important;
    }

    .rich-text-container h2 {
        font-size: 1.25rem !important;
        margin: 0.75rem 0 !important;
    }

    .rich-text-container h3 {
        font-size: 1.1rem !important;
        margin: 0.5rem 0 !important;
    }

    .rich-text-container p {
        margin-bottom: 0.75rem !important;
        font-size: 0.95rem !important;
    }

    .rich-text-container ul,
    .rich-text-container ol {
        margin-left: 1rem !important;
        margin-bottom: 0.75rem !important;
    }

    .rich-text-container img {
        margin: 0.75rem 0 !important;
    }

    /* 移动端底部导航栏样式 */
    .main-content {
        padding-bottom: 80px !important;
    }

    /* 移动端按钮组 */
    .points-btn-group {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .points-btn {
        width: 100% !important;
    }

    /* 移动端Sheet标签适配 */
    .sheet-tabs {
        overflow-x: auto !important;
        white-space: nowrap !important;
    }

    .sheet-tab {
        padding: 10px 15px !important;
    }

    /* 移动端积分变更列表适配 */
    .points-record-col {
        width: 50% !important;
        margin-bottom: 8px;
    }
    .points-record-col:last-child {
        width: 100% !important;
    }

    /* 移动端表单垂直排列 */
    .btn-full-width-mobile {
        width: 100% !important;
    }

    .form-row {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: stretch !important;
    }
}

/* ==================== 非移动端样式 ==================== */
@media (min-width: 769px) {
    .points-record-col {
        width: 25%;
    }

    /* PC端表单行样式 */
    .form-row {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        align-items: flex-end;
        margin-bottom: 1rem;
    }
}

/* ==================== 移动端菜单按钮 ==================== */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 999;
    background: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
}
