/* ========================================
   川渝好门户 - 全站统一样式优化
   确保所有页面风格一致
   ======================================== */

/* ========== 全局CSS变量 ========== */
:root {
    /* 主色调 - 川渝红 */
    --cy-primary: #e53935;
    --cy-primary-light: #ff5252;
    --cy-primary-dark: #c62828;
    --cy-primary-rgb: 229, 57, 53;
    
    /* 辅助色 */
    --cy-secondary: #1976d2;
    --cy-success: #388e3c;
    --cy-warning: #fbc02d;
    --cy-danger: #d32f2f;
    --cy-info: #757575;
    
    /* 渐变色 */
    --cy-gradient-orange: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    --cy-gradient-blue: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    --cy-gradient-green: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    --cy-gradient-purple: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
    
    /* 中性色 */
    --cy-text-primary: #333333;
    --cy-text-secondary: #666666;
    --cy-text-muted: #999999;
    --cy-text-disabled: #cccccc;
    --cy-border: #e5e5e5;
    --cy-border-light: #f0f0f0;
    --cy-border-dark: #d0d0d0;
    --cy-bg-light: #f8f9fa;
    --cy-bg-white: #ffffff;
    --cy-bg-dark: #1a1a1a;
    
    /* 渐变 */
    --cy-gradient-primary: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
    --cy-gradient-light: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    --cy-gradient-dark: linear-gradient(135deg, #424242 0%, #212121 100%);
    
    /* 阴影 */
    --cy-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --cy-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --cy-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    --cy-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
    --cy-shadow-primary: 0 4px 16px rgba(var(--cy-primary-rgb), 0.3);
    --cy-shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    
    /* 圆角 */
    --cy-radius-xs: 2px;
    --cy-radius-sm: 4px;
    --cy-radius-md: 8px;
    --cy-radius-lg: 12px;
    --cy-radius-xl: 16px;
    --cy-radius-xxl: 24px;
    --cy-radius-round: 50px;
    --cy-radius-circle: 50%;
    
    /* 间距 */
    --cy-spacing-xs: 4px;
    --cy-spacing-sm: 8px;
    --cy-spacing-md: 16px;
    --cy-spacing-lg: 24px;
    --cy-spacing-xl: 32px;
    --cy-spacing-xxl: 48px;
    
    /* 字体大小 */
    --cy-font-xs: 11px;
    --cy-font-sm: 12px;
    --cy-font-md: 14px;
    --cy-font-lg: 16px;
    --cy-font-xl: 18px;
    --cy-font-xxl: 24px;
    --cy-font-xxxl: 32px;
    
    /* 行高 */
    --cy-line-height-tight: 1.2;
    --cy-line-height-normal: 1.6;
    --cy-line-height-loose: 1.8;
    
    /* 过渡 */
    --cy-transition: all 0.3s ease;
    --cy-transition-fast: all 0.2s ease;
    --cy-transition-slow: all 0.5s ease;
    
    /* 动画时长 */
    --cy-animation-fast: 0.15s;
    --cy-animation-normal: 0.3s;
    --cy-animation-slow: 0.5s;
    
    /* z-index层级 */
    --cy-z-dropdown: 1000;
    --cy-z-sticky: 1020;
    --cy-z-fixed: 1030;
    --cy-z-modal-backdrop: 1040;
    --cy-z-modal: 1050;
    --cy-z-popover: 1060;
    --cy-z-tooltip: 1070;
}

/* ========== 全局基础样式 ========== */
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

body {
    background: var(--cy-bg-light);
    color: var(--cy-text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--cy-primary);
    text-decoration: none;
    transition: var(--cy-transition-fast);
}

a:hover {
    color: var(--cy-primary-dark);
}

/* ========== 统一容器样式 ========== */
.wp {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.wp-wide {
    max-width: none;
    width: 100%;
}

.wp-narrow {
    max-width: 960px;
}

.cl::after {
    content: '';
    display: table;
    clear: both;
}

/* ========== 统一卡片样式 ========== */
.card,
.bm,
.thread-info-card,
.forum-info-card {
    background: var(--cy-bg-white);
    border-radius: var(--cy-radius-lg);
    box-shadow: var(--cy-shadow-sm);
    overflow: hidden;
    transition: var(--cy-transition);
    border: 1px solid var(--cy-border-light);
}

.card:hover,
.bm:hover {
    box-shadow: var(--cy-shadow-md);
    transform: translateY(-2px);
}

/* ========== 统一按钮样式 ========== */
.btn,
button,
.pn,
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--cy-radius-round);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--cy-transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary,
.pn,
button[type="submit"] {
    background: var(--cy-gradient-primary);
    color: #fff;
    box-shadow: var(--cy-shadow-primary);
}

.btn-primary:hover,
.pn:hover,
button[type="submit"]:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--cy-primary-rgb), 0.4);
}

.btn-secondary {
    background: var(--cy-bg-light);
    color: var(--cy-text-primary);
    border: 1px solid var(--cy-border);
}

.btn-secondary:hover {
    background: var(--cy-border-light);
    border-color: var(--cy-primary);
    color: var(--cy-primary);
}

/* ========== 统一输入框样式 ========== */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--cy-border);
    border-radius: var(--cy-radius-md);
    font-size: 14px;
    transition: var(--cy-transition);
    background: var(--cy-bg-white);
    color: var(--cy-text-primary);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
    border-color: var(--cy-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--cy-primary-rgb), 0.1);
}

input[type="text"]::placeholder,
input[type="password"]::placeholder,
input[type="email"]::placeholder,
input[type="search"]::placeholder,
textarea::placeholder {
    color: var(--cy-text-muted);
}

/* ========== 统一标题样式 ========== */
h1, h2, h3, h4, h5, h6 {
    color: var(--cy-text-primary);
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 var(--cy-spacing-md);
}

h1 { font-size: 28px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

/* ========== 统一面包屑样式 ========== */
.breadcrumb,
.forum-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0;
    font-size: 13px;
    color: var(--cy-text-secondary);
}

.breadcrumb a,
.forum-breadcrumb a {
    color: var(--cy-text-secondary);
    transition: var(--cy-transition-fast);
}

.breadcrumb a:hover,
.forum-breadcrumb a:hover {
    color: var(--cy-primary);
}

.breadcrumb em,
.forum-breadcrumb em {
    color: var(--cy-text-muted);
    font-style: normal;
}

.breadcrumb strong,
.forum-breadcrumb strong {
    color: var(--cy-text-primary);
    font-weight: 600;
}

/* ========== 统一标签样式 ========== */
.badge,
.tag,
.label {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--cy-radius-round);
    font-size: 12px;
    font-weight: 500;
    background: var(--cy-bg-light);
    color: var(--cy-text-secondary);
}

.badge-primary,
.tag-primary {
    background: rgba(var(--cy-primary-rgb), 0.1);
    color: var(--cy-primary);
}

.badge-success,
.tag-success {
    background: rgba(56, 142, 60, 0.1);
    color: var(--cy-success);
}

.badge-warning,
.tag-warning {
    background: rgba(251, 192, 45, 0.1);
    color: var(--cy-warning);
}

.badge-danger,
.tag-danger {
    background: rgba(211, 47, 47, 0.1);
    color: var(--cy-danger);
}

/* ========== 统一分割线样式 ========== */
.divider,
hr {
    border: none;
    height: 1px;
    background: var(--cy-border-light);
    margin: var(--cy-spacing-lg) 0;
}

/* ========== 统一列表样式 ========== */
ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ========== 统一表格样式 ========== */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--cy-bg-white);
    border-radius: var(--cy-radius-lg);
    overflow: hidden;
    box-shadow: var(--cy-shadow-sm);
}

table th {
    background: var(--cy-gradient-primary);
    color: #fff;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--cy-border-light);
    color: var(--cy-text-primary);
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover td {
    background: rgba(var(--cy-primary-rgb), 0.02);
}

/* ========== 统一头像样式 ========== */
.avatar,
.user-avatar {
    display: inline-block;
    border-radius: var(--cy-radius-circle);
    overflow: hidden;
    background: var(--cy-bg-light);
    border: 2px solid var(--cy-bg-white);
    box-shadow: var(--cy-shadow-sm);
}

.avatar img,
.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== 统一统计数字样式 ========== */
.stat-num,
.number {
    font-size: 24px;
    font-weight: 700;
    color: var(--cy-primary);
    line-height: 1;
}

.stat-label,
.text-muted {
    font-size: 12px;
    color: var(--cy-text-muted);
}

/* ========== 统一空状态样式 ========== */
.empty-state,
.empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--cy-text-muted);
}

.empty-state::before,
.empty::before {
    content: '📭';
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ========== 统一加载动画 ========== */
@keyframes cy-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes cy-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(var(--cy-primary-rgb), 0.3);
    border-radius: var(--cy-radius-circle);
    border-top-color: var(--cy-primary);
    animation: cy-spin 1s ease-in-out infinite;
}

/* ========== 统一提示框样式 ========== */
.alert,
.tip,
.notice {
    padding: 14px 18px;
    border-radius: var(--cy-radius-md);
    margin-bottom: var(--cy-spacing-md);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.alert-info,
.tip-info {
    background: rgba(25, 118, 210, 0.1);
    border-left: 4px solid var(--cy-secondary);
    color: var(--cy-secondary);
}

.alert-success,
.tip-success {
    background: rgba(56, 142, 60, 0.1);
    border-left: 4px solid var(--cy-success);
    color: var(--cy-success);
}

.alert-warning,
.tip-warning {
    background: rgba(251, 192, 45, 0.1);
    border-left: 4px solid var(--cy-warning);
    color: #f57c00;
}

.alert-danger,
.tip-danger {
    background: rgba(211, 47, 47, 0.1);
    border-left: 4px solid var(--cy-danger);
    color: var(--cy-danger);
}

/* ========== 统一分页样式 ========== */
.pg,
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: var(--cy-spacing-lg) 0;
}

.pg a,
.pagination a,
.pg span,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--cy-border);
    border-radius: var(--cy-radius-md);
    color: var(--cy-text-secondary);
    font-size: 14px;
    transition: var(--cy-transition-fast);
}

.pg a:hover,
.pagination a:hover {
    border-color: var(--cy-primary);
    color: var(--cy-primary);
    background: rgba(var(--cy-primary-rgb), 0.05);
}

.pg .current,
.pagination .current,
.pg .active,
.pagination .active {
    background: var(--cy-gradient-primary);
    border-color: var(--cy-primary);
    color: #fff;
}

/* ========== 统一下拉菜单样式 ========== */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 160px;
    background: var(--cy-bg-white);
    border: 1px solid var(--cy-border-light);
    border-radius: var(--cy-radius-md);
    box-shadow: var(--cy-shadow-lg);
    z-index: 1000;
    margin-top: 8px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--cy-transition);
}

.dropdown:hover .dropdown-menu,
.dropdown.show .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--cy-text-primary);
    font-size: 14px;
    transition: var(--cy-transition-fast);
}

.dropdown-item:hover {
    background: var(--cy-bg-light);
    color: var(--cy-primary);
}

/* ========== 统一模态框样式 ========== */
.modal,
.dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    backdrop-filter: blur(5px);
    animation: cy-fadeIn 0.3s ease;
}

@keyframes cy-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content,
.dialog-content {
    background: var(--cy-bg-white);
    border-radius: var(--cy-radius-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--cy-shadow-lg);
    animation: cy-slideUp 0.3s ease;
}

@keyframes cy-slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header,
.dialog-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--cy-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3,
.dialog-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-close,
.dialog-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--cy-bg-light);
    border-radius: var(--cy-radius-circle);
    font-size: 20px;
    color: var(--cy-text-muted);
    cursor: pointer;
    transition: var(--cy-transition);
}

.modal-close:hover,
.dialog-close:hover {
    background: var(--cy-primary);
    color: #fff;
    transform: rotate(90deg);
}

.modal-body,
.dialog-body {
    padding: 24px;
}

.modal-footer,
.dialog-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--cy-border-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ========== 响应式优化 ========== */
@media screen and (max-width: 768px) {
    :root {
        --cy-spacing-lg: 16px;
        --cy-spacing-xl: 24px;
    }
    
    .wp {
        padding: 0 15px;
    }
    
    h1 { font-size: 22px; }
    h2 { font-size: 20px; }
    h3 { font-size: 18px; }
    h4 { font-size: 16px; }
    
    .card,
    .bm {
        border-radius: var(--cy-radius-md);
    }
    
    .btn,
    button,
    .pn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="search"],
    textarea {
        padding: 10px 14px;
        font-size: 14px;
    }
}

/* ========== 暗黑模式支持 ========== */
@media (prefers-color-scheme: dark) {
    :root {
        --cy-text-primary: #e0e0e0;
        --cy-text-secondary: #b0b0b0;
        --cy-text-muted: #808080;
        --cy-border: #404040;
        --cy-border-light: #333333;
        --cy-bg-light: #1a1a1a;
        --cy-bg-white: #2d2d2d;
    }
}

body.dark-mode {
    --cy-text-primary: #e0e0e0;
    --cy-text-secondary: #b0b0b0;
    --cy-text-muted: #808080;
    --cy-border: #404040;
    --cy-border-light: #333333;
    --cy-bg-light: #1a1a1a;
    --cy-bg-white: #2d2d2d;
}

/* ========== 打印样式 ========== */
@media print {
    .btn,
    .mobile-menu-toggle,
    .mobile-search-btn,
    .back-to-top,
    .mobile-bottom-nav {
        display: none !important;
    }
    
    body {
        background: #fff;
        color: #000;
    }
}

/* ========== 工具类 - 间距 ========== */
.mt-0 { margin-top: 0 !important; }
.mt-xs { margin-top: var(--cy-spacing-xs) !important; }
.mt-sm { margin-top: var(--cy-spacing-sm) !important; }
.mt-md { margin-top: var(--cy-spacing-md) !important; }
.mt-lg { margin-top: var(--cy-spacing-lg) !important; }
.mt-xl { margin-top: var(--cy-spacing-xl) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-xs { margin-bottom: var(--cy-spacing-xs) !important; }
.mb-sm { margin-bottom: var(--cy-spacing-sm) !important; }
.mb-md { margin-bottom: var(--cy-spacing-md) !important; }
.mb-lg { margin-bottom: var(--cy-spacing-lg) !important; }
.mb-xl { margin-bottom: var(--cy-spacing-xl) !important; }

.ml-0 { margin-left: 0 !important; }
.ml-xs { margin-left: var(--cy-spacing-xs) !important; }
.ml-sm { margin-left: var(--cy-spacing-sm) !important; }
.ml-md { margin-left: var(--cy-spacing-md) !important; }
.ml-lg { margin-left: var(--cy-spacing-lg) !important; }

.mr-0 { margin-right: 0 !important; }
.mr-xs { margin-right: var(--cy-spacing-xs) !important; }
.mr-sm { margin-right: var(--cy-spacing-sm) !important; }
.mr-md { margin-right: var(--cy-spacing-md) !important; }
.mr-lg { margin-right: var(--cy-spacing-lg) !important; }

.pt-0 { padding-top: 0 !important; }
.pt-md { padding-top: var(--cy-spacing-md) !important; }
.pt-lg { padding-top: var(--cy-spacing-lg) !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-md { padding-bottom: var(--cy-spacing-md) !important; }
.pb-lg { padding-bottom: var(--cy-spacing-lg) !important; }

/* ========== 工具类 - 文字 ========== */
.text-primary { color: var(--cy-primary) !important; }
.text-secondary { color: var(--cy-text-secondary) !important; }
.text-muted { color: var(--cy-text-muted) !important; }
.text-success { color: var(--cy-success) !important; }
.text-warning { color: var(--cy-warning) !important; }
.text-danger { color: var(--cy-danger) !important; }
.text-info { color: var(--cy-info) !important; }
.text-white { color: #fff !important; }

.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

.text-xs { font-size: var(--cy-font-xs) !important; }
.text-sm { font-size: var(--cy-font-sm) !important; }
.text-md { font-size: var(--cy-font-md) !important; }
.text-lg { font-size: var(--cy-font-lg) !important; }
.text-xl { font-size: var(--cy-font-xl) !important; }
.text-xxl { font-size: var(--cy-font-xxl) !important; }

.font-normal { font-weight: 400 !important; }
.font-medium { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-break {
    word-wrap: break-word;
    word-break: break-word;
}

/* ========== 工具类 - 背景 ========== */
.bg-primary { background: var(--cy-gradient-primary) !important; }
.bg-light { background: var(--cy-bg-light) !important; }
.bg-white { background: var(--cy-bg-white) !important; }
.bg-success { background: var(--cy-success) !important; }
.bg-warning { background: var(--cy-warning) !important; }
.bg-danger { background: var(--cy-danger) !important; }
.bg-info { background: var(--cy-info) !important; }

/* ========== 工具类 - 边框 ========== */
.border { border: 1px solid var(--cy-border) !important; }
.border-top { border-top: 1px solid var(--cy-border) !important; }
.border-bottom { border-bottom: 1px solid var(--cy-border) !important; }
.border-left { border-left: 1px solid var(--cy-border) !important; }
.border-right { border-right: 1px solid var(--cy-border) !important; }
.border-0 { border: none !important; }
.border-primary { border-color: var(--cy-primary) !important; }

.rounded { border-radius: var(--cy-radius-md) !important; }
.rounded-sm { border-radius: var(--cy-radius-sm) !important; }
.rounded-lg { border-radius: var(--cy-radius-lg) !important; }
.rounded-xl { border-radius: var(--cy-radius-xl) !important; }
.rounded-circle { border-radius: var(--cy-radius-circle) !important; }
.rounded-0 { border-radius: 0 !important; }

/* ========== 工具类 - 阴影 ========== */
.shadow-sm { box-shadow: var(--cy-shadow-sm) !important; }
.shadow { box-shadow: var(--cy-shadow-md) !important; }
.shadow-lg { box-shadow: var(--cy-shadow-lg) !important; }
.shadow-xl { box-shadow: var(--cy-shadow-xl) !important; }
.shadow-none { box-shadow: none !important; }
.shadow-primary { box-shadow: var(--cy-shadow-primary) !important; }

/* ========== 工具类 - 显示/隐藏 ========== */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }

/* ========== 工具类 - Flexbox ========== */
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.justify-start { justify-content: flex-start !important; }
.justify-center { justify-content: center !important; }
.justify-end { justify-content: flex-end !important; }
.justify-between { justify-content: space-between !important; }
.justify-around { justify-content: space-around !important; }
.align-start { align-items: flex-start !important; }
.align-center { align-items: center !important; }
.align-end { align-items: flex-end !important; }
.align-stretch { align-items: stretch !important; }
.flex-1 { flex: 1 !important; }
.flex-auto { flex: auto !important; }
.flex-none { flex: none !important; }

/* ========== 工具类 - 定位 ========== */
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

/* ========== 工具类 - 溢出 ========== */
.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }
.overflow-scroll { overflow: scroll !important; }

/* ========== 工具类 - 宽度/高度 ========== */
.w-100 { width: 100% !important; }
.w-50 { width: 50% !important; }
.w-25 { width: 25% !important; }
.h-100 { height: 100% !important; }
.h-50 { height: 50% !important; }
.h-25 { height: 25% !important; }

/* ========== 工具类 - 光标 ========== */
.cursor-pointer { cursor: pointer !important; }
.cursor-default { cursor: default !important; }
.cursor-not-allowed { cursor: not-allowed !important; }

/* ========== 工具类 - 用户选择 ========== */
.select-none { user-select: none !important; }
.select-text { user-select: text !important; }
.select-all { user-select: all !important; }

/* ========== 工具类 - 过渡 ========== */
.transition { transition: var(--cy-transition) !important; }
.transition-fast { transition: var(--cy-transition-fast) !important; }
.transition-slow { transition: var(--cy-transition-slow) !important; }

/* ========== 工具类 - 动画 ========== */
@keyframes cy-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes cy-fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes cy-slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes cy-slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes cy-slideLeft {
    from { transform: translateX(20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes cy-slideRight {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes cy-scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes cy-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes cy-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes cy-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-fadeIn { animation: cy-fadeIn var(--cy-animation-normal) ease; }
.animate-slideUp { animation: cy-slideUp var(--cy-animation-normal) ease; }
.animate-slideDown { animation: cy-slideDown var(--cy-animation-normal) ease; }
.animate-scaleIn { animation: cy-scaleIn var(--cy-animation-normal) ease; }
.animate-spin { animation: cy-spin 1s linear infinite; }
.animate-pulse { animation: cy-pulse 2s ease infinite; }
.animate-bounce { animation: cy-bounce 1s ease infinite; }

/* ========== 统一头像尺寸 ========== */
.avatar-xs { width: 24px; height: 24px; }
.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 40px; height: 40px; }
.avatar-lg { width: 48px; height: 48px; }
.avatar-xl { width: 64px; height: 64px; }
.avatar-xxl { width: 96px; height: 96px; }

/* ========== 统一图标尺寸 ========== */
.icon-xs { font-size: 12px; }
.icon-sm { font-size: 16px; }
.icon-md { font-size: 20px; }
.icon-lg { font-size: 24px; }
.icon-xl { font-size: 32px; }
.icon-xxl { font-size: 48px; }

/* ========== 统一按钮变体 ========== */
.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--cy-primary);
    color: var(--cy-primary);
}

.btn-outline-primary:hover {
    background: var(--cy-primary);
    color: #fff;
}

.btn-outline-secondary {
    background: transparent;
    border: 2px solid var(--cy-border-dark);
    color: var(--cy-text-secondary);
}

.btn-outline-secondary:hover {
    border-color: var(--cy-primary);
    color: var(--cy-primary);
}

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--cy-text-secondary);
}

.btn-ghost:hover {
    background: var(--cy-bg-light);
    color: var(--cy-primary);
}

.btn-link {
    background: transparent;
    border: none;
    color: var(--cy-primary);
    padding: 0;
}

.btn-link:hover {
    color: var(--cy-primary-dark);
    text-decoration: underline;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: var(--cy-font-sm);
}

.btn-lg {
    padding: 14px 28px;
    font-size: var(--cy-font-lg);
}

/* ========== 统一卡片变体 ========== */
.card-flat {
    box-shadow: none;
    border: 1px solid var(--cy-border-light);
}

.card-elevated {
    box-shadow: var(--cy-shadow-lg);
}

.card-interactive {
    cursor: pointer;
    transition: var(--cy-transition);
}

.card-interactive:hover {
    transform: translateY(-4px);
    box-shadow: var(--cy-shadow-lg);
}

/* ========== 统一输入框变体 ========== */
.input-sm {
    padding: 8px 12px;
    font-size: var(--cy-font-sm);
}

.input-lg {
    padding: 16px 20px;
    font-size: var(--cy-font-lg);
}

.input-round {
    border-radius: var(--cy-radius-round);
}

.input-underline {
    border: none;
    border-bottom: 2px solid var(--cy-border);
    border-radius: 0;
    padding-left: 0;
    padding-right: 0;
}

.input-underline:focus {
    border-bottom-color: var(--cy-primary);
    box-shadow: none;
}

/* ========== 骨架屏加载 ========== */
.skeleton {
    background: linear-gradient(90deg, var(--cy-bg-light) 25%, var(--cy-border-light) 50%, var(--cy-bg-light) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease infinite;
    border-radius: var(--cy-radius-sm);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 20px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--cy-radius-circle);
}

.skeleton-image {
    width: 100%;
    height: 200px;
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: var(--cy-spacing-xxl) var(--cy-spacing-lg);
    color: var(--cy-text-muted);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: var(--cy-spacing-md);
    opacity: 0.5;
}

.empty-state-title {
    font-size: var(--cy-font-xl);
    font-weight: 600;
    color: var(--cy-text-primary);
    margin-bottom: var(--cy-spacing-sm);
}

.empty-state-desc {
    font-size: var(--cy-font-md);
    color: var(--cy-text-secondary);
    margin-bottom: var(--cy-spacing-lg);
}

/* ========== 分割线 ========== */
.divider {
    border: none;
    height: 1px;
    background: var(--cy-border-light);
    margin: var(--cy-spacing-lg) 0;
}

.divider-thick {
    height: 2px;
}

.divider-dashed {
    border-style: dashed;
}

.divider-vertical {
    display: inline-block;
    width: 1px;
    height: 16px;
    background: var(--cy-border-light);
    margin: 0 var(--cy-spacing-sm);
    vertical-align: middle;
}

/* ========== 徽章 ========== */
.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--cy-radius-circle);
    display: inline-block;
}

.badge-dot-success { background: var(--cy-success); }
.badge-dot-warning { background: var(--cy-warning); }
.badge-dot-danger { background: var(--cy-danger); }
.badge-dot-info { background: var(--cy-info); }

/* ========== 进度条 ========== */
.progress {
    height: 8px;
    background: var(--cy-bg-light);
    border-radius: var(--cy-radius-round);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--cy-gradient-primary);
    border-radius: var(--cy-radius-round);
    transition: width var(--cy-animation-normal) ease;
}

.progress-sm { height: 4px; }
.progress-lg { height: 12px; }

/* ========== 开关 ========== */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--cy-border);
    transition: var(--cy-transition);
    border-radius: var(--cy-radius-round);
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--cy-transition);
    border-radius: var(--cy-radius-circle);
    box-shadow: var(--cy-shadow-sm);
}

input:checked + .switch-slider {
    background-color: var(--cy-primary);
}

input:checked + .switch-slider:before {
    transform: translateX(20px);
}

/* ========== 标签页 ========== */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--cy-border-light);
    gap: var(--cy-spacing-md);
}

.tab-item {
    padding: var(--cy-spacing-sm) var(--cy-spacing-md);
    color: var(--cy-text-secondary);
    cursor: pointer;
    transition: var(--cy-transition-fast);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab-item:hover {
    color: var(--cy-primary);
}

.tab-item.active {
    color: var(--cy-primary);
    border-bottom-color: var(--cy-primary);
    font-weight: 600;
}

/* ========== 面包屑增强 ========== */
.breadcrumb-separator {
    color: var(--cy-text-muted);
    margin: 0 var(--cy-spacing-xs);
}

/* ========== 列表样式 ========== */
.list-item {
    display: flex;
    align-items: center;
    padding: var(--cy-spacing-md);
    border-bottom: 1px solid var(--cy-border-light);
    transition: var(--cy-transition-fast);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: var(--cy-bg-light);
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-weight: 600;
    color: var(--cy-text-primary);
    margin-bottom: var(--cy-spacing-xs);
}

.list-item-desc {
    font-size: var(--cy-font-sm);
    color: var(--cy-text-muted);
}

.list-item-action {
    margin-left: var(--cy-spacing-md);
}
