/**
 * 全局响应式样式文件
 * 适配大屏到小屏的显示，解决重叠、显示不全等问题
 * 文件: responsive.css
 */

/* ===== CSS变量定义 ===== */
:root {
    /* 响应式字体大小 */
    --font-size-xs: clamp(10px, 2.5vw, 12px);
    --font-size-sm: clamp(12px, 3vw, 14px);
    --font-size-base: clamp(14px, 3.5vw, 16px);
    --font-size-md: clamp(16px, 4vw, 18px);
    --font-size-lg: clamp(18px, 4.5vw, 22px);
    --font-size-xl: clamp(22px, 5vw, 28px);
    --font-size-xxl: clamp(28px, 6vw, 48px);
    --font-size-hero: clamp(32px, 8vw, 66px);
    
    /* 响应式间距 */
    --spacing-xs: clamp(4px, 1vw, 8px);
    --spacing-sm: clamp(8px, 2vw, 12px);
    --spacing-md: clamp(12px, 3vw, 16px);
    --spacing-lg: clamp(16px, 4vw, 24px);
    --spacing-xl: clamp(24px, 5vw, 40px);
    
    /* 断点变量（用于参考） */
    --breakpoint-xs: 480px;
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1200px;
}

/* ===== 全局基础样式重置 ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-size: var(--font-size-base);
    line-height: 1.5;
    overflow-x: hidden;
    min-width: 320px !important; /* 覆盖原有min-width: 960px */
}

/* ===== 移除原有的min-width限制 ===== */
#header,
.fixwid,
.header-content,
.footer-item,
.space-content {
    min-width: 320px !important;
    max-width: 100% !important;
}

/* ===== 图片响应式 ===== */
img {
    max-width: 100%;
    height: auto;
}

/* ===== 容器响应式 ===== */
.container,
.fixwid,
.header-content,
.footer-item {
    width: 100%;
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

/* ===== 超大屏幕 (>1400px) ===== */
@media (min-width: 1400px) {
    .container,
    .fixwid {
        max-width: 1320px;
        margin: 0 auto;
    }
}

/* ===== 大屏幕 (1200px - 1400px) ===== */
@media (min-width: 1200px) and (max-width: 1399px) {
    .container,
    .fixwid {
        max-width: 1140px;
        margin: 0 auto;
    }
}

/* ===== 中等屏幕 (992px - 1199px) ===== */
@media (min-width: 992px) and (max-width: 1199px) {
    .container,
    .fixwid {
        max-width: 960px;
        margin: 0 auto;
    }
    
    body {
        font-size: 15px;
    }
}

/* ===== 平板屏幕 (768px - 991px) ===== */
@media (min-width: 768px) and (max-width: 991px) {
    .container,
    .fixwid {
        max-width: 720px;
        margin: 0 auto;
    }
    
    body {
        font-size: 14px;
    }
    
    /* 首页header调整 */
    #header {
        height: auto;
        min-height: 60px;
    }
    
    .nav ul li {
        padding: 0 10px;
    }
    
    /* 首页内容区调整 */
    .header[data-v-e9e0751c] .header-content,
    .space .space-content,
    .footer .footer-item {
        width: 100%;
        padding: 0 20px;
    }
    
    .header .header-content .header-body .body-left .left-title {
        font-size: 48px;
        line-height: 1.2;
    }
    
    .header .header-content .header-body .body-left .left-text {
        font-size: 16px;
    }
    
    .space .space-content .space-title {
        font-size: 40px;
    }
    
    .space .space-content .space-body .body-item {
        width: calc(50% - 20px);
        margin-bottom: 60px;
    }
}

/* ===== 小平板/大手机 (640px - 767px) ===== */
@media (min-width: 640px) and (max-width: 767px) {
    body {
        font-size: 14px;
    }
    
    /* 首页header */
    #header {
        height: auto;
        padding: 10px 0;
    }
    
    #header .fixwid {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }
    
    .logo {
        height: auto;
        margin-bottom: 10px;
    }
    
    .nav {
        height: auto;
        width: 100%;
        justify-content: flex-end;
    }
    
    .nav ul {
        height: auto;
        line-height: 40px;
    }
    
    .nav ul li {
        padding: 0 8px;
    }
    
    /* 首页主体 */
    .header[data-v-e9e0751c] {
        height: auto;
        padding-top: 80px;
    }
    
    .header .header-content .header-body {
        flex-direction: column;
    }
    
    .header .header-content .header-body .body-left {
        width: 100%;
        padding: 0 20px;
        text-align: center;
    }
    
    .header .header-content .header-body .body-left .left-title {
        font-size: 36px;
        margin-top: 40px;
    }
    
    .header .header-content .header-body .body-left .left-download {
        justify-content: center;
    }
    
    .header .header-content .header-body .body-right {
        width: 100%;
        margin-top: 40px;
    }
    
    /* Space区域 */
    .space .space-content .space-title {
        font-size: 32px;
        margin-top: 60px;
    }
    
    .space .space-content .space-body {
        padding: 0 20px;
        margin-top: 80px;
    }
    
    .space .space-content .space-body .body-item {
        width: 100%;
        margin-bottom: 60px;
    }
    
    /* Footer */
    .footer .footer-item {
        width: 100%;
        height: auto;
        padding: 40px 20px;
    }
}

/* ===== 手机屏幕 (480px - 639px) ===== */
@media (min-width: 480px) and (max-width: 639px) {
    body {
        font-size: 14px;
    }
    
    /* 首页header */
    #header {
        height: auto;
        padding: 8px 0;
    }
    
    #header .fixwid {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        padding: 0 15px;
    }
    
    .logo {
        height: 50px;
        width: auto;
    }
    
    .logo img {
        width: 32px;
        margin-top: 8px;
    }
    
    .nav {
        height: auto;
    }
    
    .nav ul {
        height: auto;
        line-height: 36px;
    }
    
    .nav ul li {
        padding: 0 6px;
        font-size: 13px;
    }
    
    .login {
        width: 70px;
        height: 36px;
        line-height: 36px;
        margin-left: 10px;
        font-size: 13px;
    }
    
    /* 首页主体 */
    .header[data-v-e9e0751c] {
        height: auto;
        padding: 70px 0 40px;
    }
    
    .header .header-content .header-body .body-left .left-title {
        font-size: 28px;
        margin-top: 30px;
    }
    
    .header .header-content .header-body .body-left .left-text {
        font-size: 14px;
        margin-bottom: 24px;
    }
    
    .header .header-content .header-body .body-left .left-download .apps,
    .header .header-content .header-body .body-left .left-download .pc {
        width: 140px;
        height: 50px;
        line-height: 50px;
        font-size: 14px;
    }
    
    /* Space区域 */
    .space .space-content .space-title {
        font-size: 26px;
        line-height: 1.3;
        margin-top: 50px;
    }
    
    .space .space-content .space-body {
        margin-top: 60px;
        padding: 0 15px;
    }
    
    .space .space-content .space-body .body-item {
        width: 100%;
        height: auto;
        padding-bottom: 30px;
        margin-bottom: 50px;
    }
    
    .space .space-content .space-body .body-item p:first-child {
        margin-top: 100px;
    }
    
    .space .space-content .space-body .body-item .space-logo {
        width: 160px;
        height: 160px;
        left: 50%;
        transform: translateX(-50%);
        top: -60px;
    }
    
    /* Footer */
    .footer {
        padding-top: 60px;
    }
    
    .footer .footer-item {
        width: 100%;
        height: auto;
        padding: 30px 15px;
    }
    
    .footer .footer-item .footer-title {
        font-size: 24px;
        padding-top: 30px;
        margin-bottom: 30px;
    }
    
    .footer .footer-item .footer-content {
        flex-direction: column;
        gap: 15px;
        position: relative;
        left: 0;
        transform: none;
    }
    
    .footer .footer-item .footer-content .content-apps,
    .footer .footer-item .footer-content .content-pc {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }
    
    .footer .footer-item .footer-img {
        display: none;
    }
}

/* ===== 超小手机屏幕 (<480px) ===== */
@media (max-width: 479px) {
    body {
        font-size: 13px;
    }
    
    /* 首页header */
    #header {
        height: auto;
        padding: 6px 0;
        position: relative;
    }
    
    #header .fixwid {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 10px;
    }
    
    .logo {
        height: 44px;
    }
    
    .logo img {
        width: 28px;
        margin-top: 6px;
    }
    
    .nav {
        height: auto;
        margin-right: 0;
    }
    
    .nav ul {
        display: none; /* 隐藏导航链接，只保留登录按钮 */
    }
    
    .login {
        width: 60px;
        height: 32px;
        line-height: 32px;
        margin-left: 0;
        font-size: 12px;
        border-radius: 4px;
    }
    
    /* 首页主体 */
    .header[data-v-e9e0751c] {
        height: auto;
        padding: 60px 0 30px;
    }
    
    .header .header-content {
        width: 100%;
        padding: 0 15px;
    }
    
    .header .header-content .header-body {
        flex-direction: column;
    }
    
    .header .header-content .header-body .body-left {
        width: 100%;
        height: auto;
        text-align: center;
    }
    
    .header .header-content .header-body .body-left .left-title {
        font-size: 24px;
        line-height: 1.3;
        margin-top: 20px;
        margin-bottom: 15px;
    }
    
    .header .header-content .header-body .body-left .left-text {
        font-size: 13px;
        line-height: 1.6;
        margin-bottom: 20px;
    }
    
    .header .header-content .header-body .body-left .left-download {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .header .header-content .header-body .body-left .left-download .apps,
    .header .header-content .header-body .body-left .left-download .pc {
        width: 100%;
        max-width: 260px;
        height: 48px;
        line-height: 48px;
        font-size: 14px;
        margin: 0;
    }
    
    .header .header-content .header-body .body-right {
        width: 100%;
        margin-top: 30px;
    }
    
    .header .header-content .header-body .body-right .header-img {
        width: 100%;
        height: auto;
    }
    
    .header .header-content .header-body .body-right .header-img img {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        display: block;
    }
    
    /* 隐藏装饰元素 */
    .header .header-content .header-body .body-right .right-round1,
    .header .header-content .header-body .body-right .right-round2,
    .header .header-content .header-body .body-right .right-round3,
    .header .header-content .header-body .body-right .right-round4,
    .header .header-content .header-body .body-right .right-round5 {
        display: none;
    }
    
    /* Space区域 */
    .space .space-content {
        width: 100%;
        padding: 0 15px;
    }
    
    .space .space-content .space-title {
        font-size: 22px;
        line-height: 1.4;
        margin-top: 40px;
    }
    
    .space .space-content .space-body {
        margin-top: 50px;
        margin-bottom: 40px;
        padding: 0;
    }
    
    .space .space-content .space-body .body-item {
        width: 100%;
        height: auto;
        padding: 20px 15px 25px;
        margin-bottom: 40px;
        border-radius: 20px;
    }
    
    .space .space-content .space-body .body-item p:first-child,
    .space .space-content .space-body .body-item p:nth-child(2) {
        font-size: 22px;
        line-height: 1.4;
    }
    
    .space .space-content .space-body .body-item p:first-child {
        margin-top: 90px;
    }
    
    .space .space-content .space-body .body-item p:nth-child(3),
    .space .space-content .space-body .body-item p:nth-child(4) {
        font-size: 13px;
    }
    
    .space .space-content .space-body .body-item .space-logo {
        width: 120px;
        height: 120px;
        left: 50%;
        transform: translateX(-50%);
        top: -45px;
    }
    
    /* Footer */
    .footer {
        padding-top: 40px;
    }
    
    .footer .footer-item {
        width: 100%;
        height: auto;
        padding: 20px 15px 80px;
    }
    
    .footer .footer-item .footer-title {
        font-size: 20px;
        line-height: 1.4;
        padding-top: 20px;
        margin-bottom: 25px;
    }
    
    .footer .footer-item .footer-content {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        position: relative;
        left: 0;
        transform: none;
    }
    
    .footer .footer-item .footer-content .content-apps,
    .footer .footer-item .footer-content .content-pc {
        width: 100%;
        max-width: 240px;
        height: 44px;
        line-height: 44px;
        font-size: 14px;
        margin: 0 auto;
    }
    
    .footer .footer-item .footer-img {
        display: none;
    }
    
    .footer .footer-item .footer-text {
        font-size: 11px;
        height: auto;
        padding: 15px 10px;
    }
}

/* ===== 文件夹页面响应式 (folder.html) ===== */
.d {
    width: 100%;
    max-width: 1200px;
    margin: 60px auto 24px;
    padding: var(--spacing-md);
    box-sizing: border-box;
}

.d1 {
    padding: var(--spacing-sm) var(--spacing-md);
}

.d2,
#ready {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--spacing-md);
}

@media (max-width: 767px) {
    .d {
        margin: 50px 10px 20px;
        padding: var(--spacing-sm);
    }
    
    .d1 {
        padding: var(--spacing-xs) var(--spacing-sm);
    }
    
    .d2,
    #ready {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .d2 .sizeh,
    .d2 .timeh,
    #ready #size,
    #ready #time {
        display: none;
    }
    
    #filename {
        font-size: var(--font-size-md);
    }
    
    .rets {
        font-size: var(--font-size-xs);
    }
    
    .n_bot {
        padding: var(--spacing-lg);
    }
    
    #code img {
        width: 150px !important;
        height: 150px !important;
    }
    
    .foot_info {
        font-size: var(--font-size-xs);
    }
}

@media (max-width: 479px) {
    .d {
        margin: 50px 5px 15px;
        padding: 10px;
    }
    
    #filename {
        font-size: 16px;
        word-break: break-all;
    }
    
    .rets {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .rets span {
        display: block;
        margin-left: 0 !important;
    }
    
    #code img {
        width: 120px !important;
        height: 120px !important;
    }
}

/* ===== 用户中心/文件管理响应式优化 ===== */

/* 文件名溢出处理 - 只对单元格内容，不影响表头 */
.fixed-table-body td:nth-child(2) .filename {
    display: inline-block;
    max-width: calc(100% - 35px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* 表格在移动端优化 */
@media (max-width: 890px) {
    /* 隐藏部分列 */
    .fixed-table-body th:nth-child(n+4),
    .fixed-table-body td:nth-child(n+4) {
        display: none !important;
    }

    /* 文件名列自适应 */
    .fixed-table-body td:nth-child(2) {
        max-width: calc(100vw - 150px) !important;
    }

    /* 卡片视图优化 - 确保不重叠 */
    .has-card-view .fixed-table-body {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-content: flex-start;
    }

    .has-card-view tr {
        flex: 0 0 auto;
        margin: 4px !important;
    }
    
    /* 工具栏优化 */
    .toolbar-wrapper,
    .el-row[gutter] {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }
    
    /* 分页居中 */
    .el-pagination {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100%;
        padding: 10px 0;
    }
    
    .fixed-table-pagination {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px 0;
    }
    
    .pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .pagination li {
        margin: 0 !important;
    }
    
    .pagination li a {
        min-width: 28px;
        height: 28px;
        line-height: 28px;
        padding: 0 8px;
        font-size: 12px;
        text-align: center;
    }
}

@media (max-width: 767px) {
    /* 文件名列移动端优化 */
    .fixed-table-body td:nth-child(2) {
        max-width: calc(100vw - 120px) !important;
    }
    
    .fixed-table-body .filename {
        font-size: 12px;
    }
}

@media (max-width: 479px) {
    /* 卡片视图小屏优化 */
    .has-card-view tr {
        width: calc(33.33% - 6px);
        max-width: calc(33.33% - 6px);
    }

    .has-card-view tr td {
        width: 100% !important;
    }
    
    /* 文件名列超小屏优化 */
    .fixed-table-body td:nth-child(2) {
        max-width: calc(100vw - 80px) !important;
    }
    
    /* 分页小屏优化 */
    .el-pagination {
        padding: 8px 0;
    }
    
    .pagination li a {
        min-width: 26px;
        height: 26px;
        line-height: 26px;
        padding: 0 6px;
        font-size: 11px;
    }
}

/* ===== 通用工具类 ===== */
.hide-on-mobile {
    display: block;
}

.show-on-mobile {
    display: none;
}

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

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

@media (max-width: 767px) {
    .hide-on-mobile {
        display: none !important;
    }
    
    .show-on-mobile {
        display: block !important;
    }
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

@media (max-width: 767px) {
    /* 移动端隐藏滚动条但保持可滚动 */
    ::-webkit-scrollbar {
        width: 0;
        height: 0;
    }
}

/* ===== 全局滚动优化 ===== */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* PC端滚动优化 */
@media (min-width: 768px) {
    body {
        overflow-x: hidden;
        overflow-y: auto;
    }
    
    /* 确保主内容区域可以正常滚动 */
    .main-content,
    .el-main,
    .container {
        overflow-x: hidden;
        overflow-y: auto;
    }
}

/* 移动端滚动优化 - 关键修复 */
@media (max-width: 767px) {
    html, body {
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        scroll-behavior: smooth;
        /* 防止橡皮筋效果导致的问题 */
        position: relative;
        width: 100%;
        min-height: 100%;
    }
    
    body {
        /* 移动端关键：允许正常滚动 */
        touch-action: pan-x pan-y;
        -webkit-touch-callout: none;
    }
    
    /* 主内容区域滚动优化 */
    .main-content,
    .el-main,
    .container,
    .all-box {
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    
    /* 表格容器滚动修复 */
    .fixed-table-body,
    .table-responsive {
        overflow-x: auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y;
        overscroll-behavior: contain;
    }
    
    /* 弹出层滚动优化 */
    .layui-layer-content,
    .modal-body,
    .layer-content {
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-height: 80vh;
    }
    
    /* 防止弹窗打开时背景滚动 */
    body.layer-open,
    body.modal-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
}

/* ===== Layer.js 弹窗样式优化 ===== */

/* 弹窗基础样式 */
.layui-layer {
    border-radius: 12px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden !important;
    border: none !important;
}

/* 弹窗标题栏 */
.layui-layer-title {
    background: #fff !important;
    border-bottom: 1px solid #f0f0f0 !important;
    padding: 0 50px 0 24px !important;
    height: 56px !important;
    line-height: 56px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #333 !important;
    border-radius: 12px 12px 0 0 !important;
}

/* 弹窗内容区域 */
.layui-layer-content {
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
}

/* 弹窗按钮区域 */
.layui-layer-setwin {
    top: 18px !important;
    right: 20px !important;
}

.layui-layer-setwin a {
    width: 20px !important;
    height: 20px !important;
    margin-left: 8px !important;
}

/* 关闭按钮 - 用CSS绘制X */
.layui-layer-setwin .layui-layer-close1,
.layui-layer-setwin .layui-layer-close2 {
    background: none !important;
    width: 20px !important;
    height: 20px !important;
    position: relative !important;
    display: inline-block !important;
    border-radius: 4px !important;
    transition: all 0.2s !important;
}

.layui-layer-setwin .layui-layer-close1:hover,
.layui-layer-setwin .layui-layer-close2:hover {
    background: #f5f5f5 !important;
}

.layui-layer-setwin .layui-layer-close1::before,
.layui-layer-setwin .layui-layer-close1::after,
.layui-layer-setwin .layui-layer-close2::before,
.layui-layer-setwin .layui-layer-close2::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 12px !important;
    height: 2px !important;
    background-color: #999 !important;
    border-radius: 1px !important;
    transition: background-color 0.2s !important;
}

.layui-layer-setwin .layui-layer-close1::before,
.layui-layer-setwin .layui-layer-close2::before {
    transform: translate(-50%, -50%) rotate(45deg) !important;
}

.layui-layer-setwin .layui-layer-close1::after,
.layui-layer-setwin .layui-layer-close2::after {
    transform: translate(-50%, -50%) rotate(-45deg) !important;
}

.layui-layer-setwin .layui-layer-close1:hover::before,
.layui-layer-setwin .layui-layer-close1:hover::after,
.layui-layer-setwin .layui-layer-close2:hover::before,
.layui-layer-setwin .layui-layer-close2:hover::after {
    background-color: #666 !important;
}

/* 最大化/最小化按钮隐藏 */
.layui-layer-setwin .layui-layer-max,
.layui-layer-setwin .layui-layer-min {
    display: none !important;
}

/* ===== 新建文件夹弹窗内容样式 ===== */
#mkdir > div,
#setPass .modal-body {
    width: 100% !important;
    max-width: 100% !important;
    padding: 28px 24px 24px !important;
    box-sizing: border-box !important;
    background: #fff !important;
}

#mkdir .form-group {
    width: 100% !important;
    margin: 0 0 24px 0 !important;
    padding: 0 !important;
}

#mkdir .form-group:last-child {
    margin-bottom: 0 !important;
    margin-top: 32px !important;
}

#mkdir .form-control {
    width: 100% !important;
    height: 46px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    background-color: #fff !important;
    transition: all 0.2s !important;
    box-sizing: border-box !important;
    margin-top: 12px !important;
}

#mkdir textarea.form-control {
    height: auto !important;
    min-height: 100px !important;
    resize: none !important;
    line-height: 1.6 !important;
    padding: 14px 16px !important;
}

#mkdir .form-control:focus {
    border-color: #67c23a !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 3px rgba(103, 194, 58, 0.1) !important;
    outline: none !important;
}

#mkdir .form-control::placeholder {
    color: #aaa !important;
}

#mkdir .btn-success {
    width: 100% !important;
    height: 46px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    border: none !important;
    border-radius: 8px !important;
    background: #67c23a !important;
    color: #fff !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    margin-top: 0 !important;
}

#mkdir .btn-success:hover {
    background: #5daf34 !important;
}

#mkdir .btn-success:active {
    background: #529a2e !important;
}

/* 表单标签样式 */
#mkdir .form-group > span,
#mkdir .form-group > p {
    display: block !important;
    font-size: 14px !important;
    color: #333 !important;
    margin-bottom: 0 !important;
    font-weight: 500 !important;
}

#mkdir .form-group > span[style*="color"],
#mkdir .form-group > span:first-child {
    display: inline !important;
    color: #f56c6c !important;
}

/* ===== Layer.js 确认弹窗样式 ===== */
.layui-layer-dialog {
    border-radius: 12px !important;
}

.layui-layer-dialog .layui-layer-content {
    padding: 30px 24px 20px !important;
    font-size: 15px !important;
    color: #333 !important;
    text-align: center !important;
}

.layui-layer-btn {
    padding: 16px 24px 24px !important;
    text-align: center !important;
    background: #fff !important;
}

.layui-layer-btn a {
    height: 40px !important;
    line-height: 40px !important;
    padding: 0 28px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    margin: 0 6px !important;
    transition: all 0.2s !important;
}

.layui-layer-btn .layui-layer-btn0 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

.layui-layer-btn .layui-layer-btn0:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4) !important;
}

.layui-layer-btn .layui-layer-btn1 {
    background: #f5f5f5 !important;
    border: none !important;
    color: #666 !important;
}

.layui-layer-btn .layui-layer-btn1:hover {
    background: #eee !important;
    color: #333 !important;
}

/* Layer 消息提示优化 */
.layui-layer-msg {
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}

/* ===== Element UI 弹窗样式 ===== */
.el-dialog {
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2) !important;
}

.el-dialog__header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 16px 20px !important;
    border-bottom: none !important;
}

.el-dialog__title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #fff !important;
}

.el-dialog__headerbtn {
    top: 14px !important;
    right: 16px !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.2) !important;
    transition: all 0.2s !important;
}

.el-dialog__headerbtn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: rotate(90deg) !important;
}

.el-dialog__headerbtn .el-dialog__close {
    width: 16px !important;
    height: 16px !important;
    position: relative !important;
    display: inline-block !important;
}

.el-dialog__headerbtn .el-dialog__close::before,
.el-dialog__headerbtn .el-dialog__close::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 10px !important;
    height: 2px !important;
    background-color: #fff !important;
    border-radius: 1px !important;
}

.el-dialog__headerbtn .el-dialog__close::before {
    transform: translate(-50%, -50%) rotate(45deg) !important;
}

.el-dialog__headerbtn .el-dialog__close::after {
    transform: translate(-50%, -50%) rotate(-45deg) !important;
}

.el-dialog__body {
    padding: 24px !important;
}

/* ===== 移动端弹窗适配 ===== */
@media (max-width: 767px) {
    .layui-layer {
        width: calc(100vw - 40px) !important;
        max-width: 380px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-left: 0 !important;
    }
    
    .layui-layer-title {
        height: 52px !important;
        line-height: 52px !important;
        font-size: 16px !important;
        padding: 0 48px 0 20px !important;
    }
    
    .layui-layer-setwin {
        top: 16px !important;
        right: 16px !important;
    }
    
    #mkdir > div {
        padding: 24px 20px 20px !important;
    }
    
    #mkdir .form-group {
        margin-bottom: 20px !important;
    }
    
    #mkdir .form-group:last-child {
        margin-top: 28px !important;
    }
    
    #mkdir .form-control {
        height: 44px !important;
        font-size: 14px !important;
        padding: 10px 14px !important;
        margin-top: 10px !important;
    }
    
    #mkdir textarea.form-control {
        min-height: 90px !important;
        padding: 12px 14px !important;
    }
    
    #mkdir .btn-success {
        height: 44px !important;
        font-size: 15px !important;
    }
    
    .layui-layer-btn {
        padding: 16px 20px 20px !important;
    }
    
    .layui-layer-btn a {
        height: 38px !important;
        line-height: 38px !important;
        padding: 0 24px !important;
        font-size: 14px !important;
    }
    
    /* Element UI 弹窗移动端 */
    .el-dialog {
        width: calc(100vw - 40px) !important;
        max-width: 380px !important;
        margin: 20vh auto !important;
    }
    
    .el-dialog__header {
        padding: 16px 20px !important;
    }
    
    .el-dialog__title {
        font-size: 16px !important;
    }
    
    .el-dialog__body {
        padding: 24px 20px !important;
    }
}

@media (max-width: 479px) {
    .layui-layer {
        width: calc(100vw - 32px) !important;
        max-width: none !important;
    }
    
    .el-dialog {
        width: calc(100vw - 32px) !important;
        max-width: none !important;
    }
    
    #mkdir > div {
        padding: 20px 16px 16px !important;
    }
    
    #mkdir .form-group {
        margin-bottom: 18px !important;
    }
}

/* ===== 触摸优化 ===== */
@media (hover: none) and (pointer: coarse) {
    /* 触摸设备上增大点击区域 */
    a:not(.top-item):not(.toolbar-btn),
    button:not(.top-item):not(.toolbar-btn),
    .btn:not(.top-item):not(.toolbar-btn) {
        min-height: 44px;
        min-width: 44px;
    }

    /* 禁用hover效果 */
    .el-menu-item:hover {
        transform: none;
    }
}

/* ===== 打印优化 ===== */
@media print {
    body {
        font-size: 12pt;
    }
    
    .el-aside,
    .pear-collasped-pe,
    .toolbar-wrapper,
    #header,
    .footer {
        display: none !important;
    }
    
    .el-main {
        margin: 0;
        padding: 0;
    }
}
