:root {
    /* 核心色板 (WordPress Native Blue - 增强版) */
    --cosmdl-primary: #2271b1;
    --cosmdl-primary-hover: #135e96;
    --cosmdl-primary-light: #f0f7ff;
    --cosmdl-primary-dark: #0d4b7a;
    --cosmdl-primary-focus: rgba(34, 113, 177, 0.15);
    
    /* 语义色 */
    --cosmdl-text-main: #1e293b;
    --cosmdl-text-sub: #64748b;
    --cosmdl-text-light: #94a3b8;
    --cosmdl-border: #e2e8f0;
    --cosmdl-border-light: #f1f5f9;
    --cosmdl-bg: #f8fafc;
    --cosmdl-bg-alt: #f1f5f9;
    --cosmdl-white: #ffffff;
    --cosmdl-danger: #d63638;
    --cosmdl-danger-hover: #b91c1c;
    --cosmdl-danger-bg: #fef2f2;
    --cosmdl-danger-border: #fecaca;
    --cosmdl-success: #00a32a;
    --cosmdl-success-hover: #008a23;
    --cosmdl-success-bg: #f0fdf4;
    --cosmdl-success-border: #bbf7d0;
    --cosmdl-warning: #dba617;
    --cosmdl-warning-bg: #fef9c3;
    --cosmdl-warning-border: #fde047;
    --cosmdl-info: #3b82f6;
    --cosmdl-info-bg: #f0f7ff;
    
    /* 尺寸与圆角 */
    --cosmdl-radius: 8px;
    --cosmdl-radius-lg: 12px;
    --cosmdl-radius-sm: 4px;
    --cosmdl-space-xs: 4px;
    --cosmdl-space-sm: 8px;
    --cosmdl-space-md: 16px;
    --cosmdl-space-lg: 24px;
    --cosmdl-space-xl: 32px;
    
    /* 阴影与动画 */
    --cosmdl-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --cosmdl-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --cosmdl-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --cosmdl-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --cosmdl-transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --cosmdl-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --cosmdl-transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================== 全局容器 ================== */
.cosmdl-wrap {
    margin: 20px 20px 0 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--cosmdl-text-main);
    max-width: 1400px;
}

/* ================== 顶部 Header 区域 ================== */
.cosmdl-header {
    margin-bottom: 24px;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--cosmdl-white) 0%, var(--cosmdl-bg) 100%);
    border-radius: var(--cosmdl-radius-lg);
    box-shadow: var(--cosmdl-shadow);
    border: 1px solid var(--cosmdl-border);
}

.cosmdl-header-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0;
}

.cosmdl-header-title {
    white-space: nowrap;
}

.cosmdl-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--cosmdl-text-main);
    letter-spacing: -0.5px;
}

/* 顶部操作区 (右侧链接与按钮) */
.cosmdl-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 500;
    flex: 1 1 auto;
    justify-content: flex-end;
    flex-wrap: wrap;
    min-width: 0;
}

/* 顶部元数据 (版本号与链接) */
.cosmdl-top-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-right: 20px;
    padding-right: 20px;
    border-right: 2px solid var(--cosmdl-border);
    flex-wrap: wrap;
}

/* 版本号徽章 */
.cosmdl-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--cosmdl-primary-light) 0%, #e0f2fe 100%);
    color: var(--cosmdl-primary);
    border-radius: 20px;
    font-weight: 700;
    font-size: 11px;
    border: 1px solid rgba(34, 113, 177, 0.15);
    box-shadow: 0 2px 4px rgba(34, 113, 177, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 顶部图标链接 */
.cosmdl-top-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--cosmdl-text-sub);
    text-decoration: none;
    transition: var(--cosmdl-transition);
    padding: 6px 10px;
    border-radius: var(--cosmdl-radius);
    font-weight: 500;
}

.cosmdl-top-link span:last-child {
    white-space: nowrap;
}

.cosmdl-top-link:hover {
    color: var(--cosmdl-primary);
    background: var(--cosmdl-primary-light);
    transform: translateY(-1px);
}

.cosmdl-top-link .dashicons,
.cosmdl-top-link svg {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* 为每个按钮的图标指定颜色 */
.cosmdl-top-link--home .dashicons {
    color: var(--cosmdl-primary);
}

.cosmdl-top-link--docs .dashicons {
    color: var(--cosmdl-info);
}

.cosmdl-top-link--faq .dashicons {
    color: var(--cosmdl-warning);
}

.cosmdl-top-link--group .dashicons {
    color: var(--cosmdl-success);
}

.cosmdl-top-link--feedback .dashicons {
    color: var(--cosmdl-danger);
}

.cosmdl-top-link--sponsor .dashicons {
    color: var(--cosmdl-danger);
}

.cosmdl-top-link--github svg {
    color: var(--cosmdl-text-main);
}

/* 操作按钮 (导出/导入/保存/重置) */
.cosmdl-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--cosmdl-border);
    background: var(--cosmdl-white);
    color: var(--cosmdl-text-sub);
    border-radius: var(--cosmdl-radius);
    cursor: pointer;
    transition: var(--cosmdl-transition);
    padding: 0;
    box-shadow: var(--cosmdl-shadow);
    position: relative;
    overflow: hidden;
}

.cosmdl-action::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--cosmdl-primary);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
    opacity: 0.1;
}

.cosmdl-action:hover::before {
    width: 100%;
    height: 100%;
}

.cosmdl-action:hover {
    border-color: var(--cosmdl-primary);
    color: var(--cosmdl-primary);
    transform: translateY(-2px);
    box-shadow: var(--cosmdl-shadow-md);
}

.cosmdl-action:active {
    transform: translateY(0);
}

.cosmdl-action--save {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.1);
    box-shadow: var(--cosmdl-shadow);
}

.cosmdl-action--save:hover {
    color: #059669;
    border-color: rgba(5, 150, 105, 0.5);
    background: rgba(5, 150, 105, 0.2);
    box-shadow: var(--cosmdl-shadow-md);
}

.cosmdl-action--save::before {
    background: rgba(16, 185, 129, 0.2);
}

/* 导出配置按钮 - 蓝色 */
.cosmdl-action--export {
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.1);
}

/* ================== 下载统计：表格样式（后台） ================== */
.cosmdl-stats-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--cosmdl-white);
    border: 1px solid var(--cosmdl-border);
    border-radius: var(--cosmdl-radius-lg);
    overflow: hidden;
    box-shadow: var(--cosmdl-shadow);
}

/* 中文注释：后台统计表不要继承 form-table 的“表单布局”样式 */
.cosmdl-stats-table--admin {
    table-layout: auto;
}

.cosmdl-stats-table--admin th,
.cosmdl-stats-table--admin td {
    width: auto;
}

.cosmdl-stats-table thead th {
    background: linear-gradient(135deg, var(--cosmdl-primary-light) 0%, #e0f2fe 100%);
    color: var(--cosmdl-text-main);
    font-weight: 700;
    padding: 12px 12px;
    border-bottom: 1px solid var(--cosmdl-border);
}

.cosmdl-stats-table thead th .button {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    font-weight: 700;
    color: inherit;
}

/* 中文注释：统计表头排序按钮（与截图一致：白底描边胶囊按钮） */
.cosmdl-stats-table .cosmdl-stats-sort-btn.button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--cosmdl-white);
    border: 2px solid rgba(34, 113, 177, 0.35);
    color: var(--cosmdl-primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

.cosmdl-stats-table .cosmdl-stats-sort-btn.button:hover {
    background: var(--cosmdl-primary-light);
    border-color: rgba(34, 113, 177, 0.55);
    color: var(--cosmdl-primary-hover);
}

.cosmdl-stats-table .cosmdl-stats-sort-btn.button:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--cosmdl-primary-focus);
}

.cosmdl-stats-table .cosmdl-sort-link {
    text-decoration: none;
    font-weight: 800;
}

.cosmdl-stats-table thead th .button:hover,
.cosmdl-stats-table thead th .button:focus {
    color: var(--cosmdl-primary-hover);
}

.cosmdl-stats-table tbody td {
    padding: 12px 12px;
    border-bottom: 1px solid var(--cosmdl-border-light);
    vertical-align: middle;
}

.cosmdl-stats-table tbody tr.stats-row.is-odd {
    background: var(--cosmdl-white);
}

.cosmdl-stats-table tbody tr.stats-row.is-even {
    background: var(--cosmdl-bg);
}

.cosmdl-stats-table tbody tr.stats-row:hover {
    background: var(--cosmdl-primary-light);
}

.cosmdl-stats-table tbody tr.per-drive-row.is-odd td,
.cosmdl-stats-table tbody tr.per-drive-row.is-even td {
    background: rgba(34, 113, 177, 0.06);
    border-bottom: 1px solid var(--cosmdl-border);
}

/* ================== 下载统计：总下载按钮（与截图一致：小方框） ================== */
.cosmdl-stats-table .cosmdl-count.button {
    min-width: 38px;
    height: 30px;
    padding: 0 8px;
    border: 2px solid rgba(34, 113, 177, 0.45);
    background: var(--cosmdl-white);
    color: var(--cosmdl-primary);
    font-weight: 800;
    border-radius: 6px;
    line-height: 1;
}

.cosmdl-stats-table .cosmdl-count.button:hover {
    background: var(--cosmdl-primary-light);
    border-color: rgba(34, 113, 177, 0.65);
}

.cosmdl-stats-table .cosmdl-count.button[aria-expanded="true"] {
    background: rgba(34, 113, 177, 0.10);
}

.cosmdl-stats-admin-wrap {
    margin-top: 10px;
}

/* ================== 下载统计：已上传网盘（按钮样式） ================== */
.cosmdl-stats-table .cosmdl-col-drives a.drive-name-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(34, 113, 177, 0.40);
    background: rgba(34, 113, 177, 0.14);
    color: var(--cosmdl-primary);
    text-decoration: none;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    transition: var(--cosmdl-transition-fast);
}

/* 中文注释：网盘徽章外层容器，统一间距（替代内联 style） */
.cosmdl-drive-badge-container {
    display: inline-flex;
    margin-right: 6px;
    margin-bottom: 6px;
    vertical-align: middle;
}

/* ================== 下载统计：各网盘下载次数（明细条） ================== */
.cosmdl-per-drive-box {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(34, 113, 177, 0.18);
}

.cosmdl-per-drive-title {
    font-weight: 800;
    color: var(--cosmdl-text-main);
    margin-right: 2px;
}

.cosmdl-per-drive-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(34, 113, 177, 0.40);
    background: rgba(34, 113, 177, 0.14);
    color: var(--cosmdl-primary);
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    cursor: default;
    transition: var(--cosmdl-transition-fast);
}

.cosmdl-per-drive-box a.cosmdl-per-drive-badge {
    cursor: pointer;
}

.cosmdl-per-drive-badge:hover {
    background: rgba(34, 113, 177, 0.16);
    border-color: rgba(34, 113, 177, 0.38);
    color: var(--cosmdl-primary-hover);
}

.cosmdl-per-drive-badge:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--cosmdl-primary-focus);
}

/* ================== 下载统计：明细容器提示文案 ================== */
.cosmdl-details-box {
    margin-top: 10px;
}

.cosmdl-loading-text {
    margin: 10px 0;
    color: var(--cosmdl-text-sub);
}

.cosmdl-error-text {
    margin: 10px 0;
    color: var(--cosmdl-danger);
    font-weight: 600;
}

.cosmdl-stats-table .cosmdl-col-drives a.drive-name-badge:hover {
    background: rgba(34, 113, 177, 0.16);
    border-color: rgba(34, 113, 177, 0.38);
    color: var(--cosmdl-primary-hover);
}

.cosmdl-stats-table .cosmdl-col-drives a.drive-name-badge:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--cosmdl-primary-focus);
}

.cosmdl-action--export:hover {
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.5);
    background: rgba(37, 99, 235, 0.2);
}

.cosmdl-action--export::before {
    background: rgba(59, 130, 246, 0.2);
}

/* 导入配置按钮 - 橙色 */
.cosmdl-action--import {
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.1);
}

.cosmdl-action--import:hover {
    color: #d97706;
    border-color: rgba(217, 119, 6, 0.5);
    background: rgba(217, 119, 6, 0.2);
}

.cosmdl-action--import::before {
    background: rgba(245, 158, 11, 0.2);
}

/* 恢复默认值按钮 - 紫色 */
.cosmdl-action--reset {
    color: #8b5cf6;
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.1);
}

.cosmdl-action--reset:hover {
    color: #7c3aed;
    border-color: rgba(124, 58, 237, 0.5);
    background: rgba(124, 58, 237, 0.2);
}

.cosmdl-action--reset::before {
    background: rgba(139, 92, 246, 0.2);
}

/* ================== 导航栏 (水平 Tab) ================== */
.cosmdl-drawer-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    border-bottom: 2px solid var(--cosmdl-border);
    margin-bottom: 24px;
    padding: 0 20px;
    background: linear-gradient(180deg, var(--cosmdl-white) 0%, var(--cosmdl-bg) 100%);
    border-radius: var(--cosmdl-radius-lg) var(--cosmdl-radius-lg) 0 0;
    box-shadow: var(--cosmdl-shadow);
    position: relative;
    overflow: hidden;
}

.cosmdl-drawer-nav::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cosmdl-primary) 0%, var(--cosmdl-primary-hover) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-tab {
    padding: 14px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--cosmdl-text-sub);
    cursor: pointer;
    transition: var(--cosmdl-transition);
    margin-bottom: -2px;
    position: relative;
    border-radius: var(--cosmdl-radius) var(--cosmdl-radius) 0 0;
    letter-spacing: 0.3px;
}

.drawer-tab::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--cosmdl-primary) 0%, var(--cosmdl-primary-hover) 100%);
    transform: translateX(-50%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px 3px 0 0;
}

.drawer-tab:hover {
    color: var(--cosmdl-primary);
    background: rgba(34, 113, 177, 0.05);
}

.drawer-tab:hover::before {
    width: 60%;
}

.drawer-tab.active {
    color: var(--cosmdl-primary);
    background: var(--cosmdl-white);
    font-weight: 700;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.drawer-tab.active::before {
    width: 100%;
}

.drawer-tab:focus-visible {
    outline: 2px solid var(--cosmdl-primary-focus);
    outline-offset: -2px;
}

/* ================== 内容区域 (Drawer Content) ================== */
.drawer-content {
    background: var(--cosmdl-white);
    padding: 32px;
    border-radius: 0 0 var(--cosmdl-radius-lg) var(--cosmdl-radius-lg);
    margin-top: -24px;
    box-shadow: var(--cosmdl-shadow-md);
    min-height: 500px;
    animation: cosmdlFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--cosmdl-border);
    border-top: none;
}

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

.drawer-content h2 {
    font-size: 22px;
    margin: 0 0 10px 0;
    color: var(--cosmdl-text-main);
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.drawer-content h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 22px;
    background: linear-gradient(180deg, var(--cosmdl-primary) 0%, var(--cosmdl-primary-hover) 100%);
    border-radius: 2px;
}

.drawer-content .description {
    margin-bottom: 32px;
    font-size: 14px;
    color: var(--cosmdl-text-sub);
    line-height: 1.6;
    padding-left: 14px;
}

/* ================== 环境检测网格 ================== */
.cosmdl-env-checks {
    background: linear-gradient(135deg, var(--cosmdl-bg) 0%, var(--cosmdl-bg-alt) 100%);
    border-radius: var(--cosmdl-radius-lg);
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid var(--cosmdl-border);
    box-shadow: var(--cosmdl-shadow);
}

.cosmdl-env-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--cosmdl-text-sub);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cosmdl-env-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 16px;
    background: var(--cosmdl-primary);
    border-radius: 2px;
}

.cosmdl-env-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.cosmdl-env-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--cosmdl-white);
    border-radius: var(--cosmdl-radius);
    border: 1px solid var(--cosmdl-border);
    transition: var(--cosmdl-transition-slow);
    position: relative;
    overflow: hidden;
}

.cosmdl-env-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--cosmdl-border);
    transition: var(--cosmdl-transition);
}

.cosmdl-env-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--cosmdl-shadow-lg);
    border-color: var(--cosmdl-primary);
}

.cosmdl-env-item.is-ok::before {
    background: linear-gradient(180deg, var(--cosmdl-success) 0%, var(--cosmdl-success-hover) 100%);
}

.cosmdl-env-item.is-bad::before {
    background: linear-gradient(180deg, var(--cosmdl-danger) 0%, var(--cosmdl-danger-hover) 100%);
}

.cosmdl-env-item.is-bad {
    background: linear-gradient(135deg, var(--cosmdl-danger-bg) 0%, #fee2e2 100%);
    border-color: var(--cosmdl-danger-border);
}

.cosmdl-env-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cosmdl-bg);
    border-radius: var(--cosmdl-radius);
    transition: var(--cosmdl-transition);
}

.cosmdl-env-item:hover .cosmdl-env-icon {
    background: var(--cosmdl-primary-light);
    transform: scale(1.1);
}

.cosmdl-env-icon svg {
    width: 20px;
    height: 20px;
}

.cosmdl-env-body {
    flex-grow: 1;
    font-size: 13px;
}

.cosmdl-env-line {
    margin-bottom: 6px;
    color: var(--cosmdl-text-main);
    font-weight: 600;
    line-height: 1.5;
}

.cosmdl-env-sub {
    color: var(--cosmdl-text-sub);
    font-size: 12px;
    line-height: 1.5;
}

.cosmdl-env-hint {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(220, 38, 38, 0.2);
    color: var(--cosmdl-danger);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
}

.cosmdl-env-link {
    color: var(--cosmdl-primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: var(--cosmdl-transition);
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.cosmdl-env-link:hover {
    color: var(--cosmdl-primary-hover);
    text-decoration: underline;
}

/* ================== 表单样式优化 ================== */
.form-table th {
    font-weight: 600;
    color: var(--cosmdl-text-main);
    width: 240px;
    padding: 24px 10px 24px 0;
    font-size: 14px;
    vertical-align: top;
}

.form-table td {
    padding: 24px 10px;
    vertical-align: top;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="url"],
select,
textarea {
    border: 1px solid var(--cosmdl-border);
    border-radius: var(--cosmdl-radius);
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--cosmdl-text-main);
    background: var(--cosmdl-white);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) inset;
    transition: var(--cosmdl-transition);
    width: 100%;
    max-width: 520px;
    font-family: inherit;
}

input[type="text"]:hover,
input[type="number"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="url"]:hover,
select:hover,
textarea:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08) inset;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--cosmdl-primary);
    box-shadow: 0 0 0 3px var(--cosmdl-primary-focus), 0 2px 4px rgba(0,0,0,0.08) inset;
    outline: none;
    transform: translateY(-1px);
}

input[type="text"]::placeholder,
input[type="number"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="url"]::placeholder,
textarea::placeholder {
    color: var(--cosmdl-text-light);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232271b1' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* 复选框和单选框美化 */
input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    border: 2px solid var(--cosmdl-border);
    border-radius: var(--cosmdl-radius-sm);
    cursor: pointer;
    transition: var(--cosmdl-transition);
    appearance: none;
    background: var(--cosmdl-white);
    position: relative;
    vertical-align: middle;
    margin-right: 8px;
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
    border-color: var(--cosmdl-primary);
    box-shadow: 0 0 0 3px var(--cosmdl-primary-focus);
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background: var(--cosmdl-primary);
    border-color: var(--cosmdl-primary);
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid var(--cosmdl-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    background: var(--cosmdl-white);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* 路由前缀预览框 */
.route-prefix-wrapper {
    margin-top: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--cosmdl-bg) 0%, var(--cosmdl-bg-alt) 100%);
    border: 1px solid var(--cosmdl-border);
    border-radius: var(--cosmdl-radius);
    font-size: 13px;
    line-height: 1.6;
}

.route-prefix-wrapper code {
    background: rgba(34, 113, 177, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    color: var(--cosmdl-primary);
    font-weight: 600;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* 颜色选择器美化 */
input[type="color"] {
    width: 50px;
    height: 38px;
    padding: 2px;
    border: 2px solid var(--cosmdl-border);
    border-radius: var(--cosmdl-radius);
    cursor: pointer;
    transition: var(--cosmdl-transition);
}

input[type="color"]:hover {
    border-color: var(--cosmdl-primary);
    transform: scale(1.05);
}

/* 按钮样式 */
.button {
    padding: 8px 16px;
    border: 1px solid var(--cosmdl-border);
    background: var(--cosmdl-white);
    color: var(--cosmdl-text-main);
    border-radius: var(--cosmdl-radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--cosmdl-transition);
    box-shadow: var(--cosmdl-shadow);
}

.button:hover {
    border-color: var(--cosmdl-primary);
    color: var(--cosmdl-primary);
    transform: translateY(-1px);
    box-shadow: var(--cosmdl-shadow-md);
}

.button-primary {
    background: var(--cosmdl-primary);
    color: var(--cosmdl-white);
    border-color: var(--cosmdl-primary);
}

.button-primary:hover {
    background: var(--cosmdl-primary-hover);
    color: var(--cosmdl-white);
    border-color: var(--cosmdl-primary-hover);
}

.button-danger {
    background: var(--cosmdl-danger);
    color: var(--cosmdl-white);
    border-color: var(--cosmdl-danger);
}

.button-danger:hover {
    background: var(--cosmdl-danger-hover);
    color: var(--cosmdl-white);
    border-color: var(--cosmdl-danger-hover);
}

/* ================== 网盘管理 ================== */
#drives-container {
    border: 1px solid var(--cosmdl-border);
    border-radius: var(--cosmdl-radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--cosmdl-shadow);
    background: var(--cosmdl-white);
}

.drive-item {
    background: #fff;
    border-bottom: 1px solid var(--cosmdl-border);
    transition: var(--cosmdl-transition);
    position: relative;
}

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

/* 确保所有行元素样式一致，修复第一个行元素高度异常问题 */
#drives-sortable tr.drive-item:first-child {
    margin-top: 0;
    padding-top: 0;
}

/* 确保表格结构紧凑，消除表头和表体之间的默认间距 */
#drives-container table.form-table {
    border-collapse: collapse;
    border-spacing: 0;
}

#drives-container table.form-table thead th {
    padding-bottom: 0;
}

#drives-container table.form-table tbody tr:first-child td {
    padding-top: 24px;
}

.drive-item:hover {
    background: linear-gradient(90deg, var(--cosmdl-bg) 0%, var(--cosmdl-white) 100%);
    box-shadow: inset 0 0 0 2px var(--cosmdl-primary-light);
}

.drive-item.ui-sortable-helper {
    background: var(--cosmdl-white);
    box-shadow: var(--cosmdl-shadow-lg);
    border: 2px solid var(--cosmdl-primary);
    border-radius: var(--cosmdl-radius);
    transform: rotate(2deg);
}

.drive-item.ui-sortable-placeholder {
    background: var(--cosmdl-bg);
    border: 2px dashed var(--cosmdl-border);
    border-radius: var(--cosmdl-radius);
    margin: 8px 0;
}

.drive-handle {
    cursor: grab;
    color: var(--cosmdl-text-light);
    padding: 14px;
    text-align: center;
    transition: var(--cosmdl-transition);
    user-select: none;
}

.drive-handle:hover {
    color: var(--cosmdl-primary);
    background: var(--cosmdl-bg);
}

.drive-handle:active {
    cursor: grabbing;
}

#drives-toggle-wrap {
    background: linear-gradient(180deg, var(--cosmdl-bg) 0%, var(--cosmdl-bg-alt) 100%);
    padding: 12px;
    text-align: center;
    border-top: 1px solid var(--cosmdl-border);
}

#drives-toggle {
    background: transparent;
    border: none;
    color: var(--cosmdl-primary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--cosmdl-radius);
    transition: var(--cosmdl-transition);
}

#drives-toggle:hover {
    background: var(--cosmdl-primary-light);
    transform: translateY(-1px);
    box-shadow: var(--cosmdl-shadow);
}

#drives-toggle .dashicons {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#drives-container:not(.collapsed) #drives-toggle .dashicons {
    transform: rotate(180deg);
}

/* 网盘图标样式 */
.drive-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: var(--cosmdl-radius-sm);
    transition: var(--cosmdl-transition);
}

.drive-item:hover .drive-icon {
    transform: scale(1.1);
    box-shadow: var(--cosmdl-shadow-md);
}

/* 网盘名称输入框 */
.drive-name-input {
    width: 100%;
    max-width: 300px;
    padding: 8px 12px;
    border: 1px solid var(--cosmdl-border);
    border-radius: var(--cosmdl-radius);
    font-size: 14px;
    transition: var(--cosmdl-transition);
}

.drive-name-input:focus {
    border-color: var(--cosmdl-primary);
    box-shadow: 0 0 0 3px var(--cosmdl-primary-focus);
    outline: none;
}

/* 网盘开关 */
.drive-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    vertical-align: middle;
}

.drive-toggle input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.drive-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--cosmdl-border);
    transition: var(--cosmdl-transition);
    border-radius: 24px;
    pointer-events: none;
    z-index: 1;
}

.drive-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--cosmdl-white);
    transition: var(--cosmdl-transition);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.drive-toggle input:checked + .drive-toggle-slider {
    background: linear-gradient(90deg, var(--cosmdl-primary) 0%, var(--cosmdl-primary-hover) 100%);
}

.drive-toggle input:checked + .drive-toggle-slider:before {
    transform: translateX(24px);
}

.drive-toggle:hover .drive-toggle-slider {
    box-shadow: 0 0 0 3px var(--cosmdl-primary-focus);
}

/* ================== 模块化设置 (下载页) ================== */
.cosmdl-module {
    background: var(--cosmdl-white);
    border: 1px solid var(--cosmdl-border);
    border-radius: var(--cosmdl-radius-lg);
    margin-bottom: 16px;
    transition: var(--cosmdl-transition-slow);
    overflow: hidden;
    box-shadow: var(--cosmdl-shadow);
}

.cosmdl-module:hover {
    border-color: #cbd5e1;
    box-shadow: var(--cosmdl-shadow-lg);
    transform: translateY(-2px);
}

.cosmdl-module__header {
    display: flex;
    align-items: center;
    padding: 18px 24px;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(135deg, var(--cosmdl-white) 0%, var(--cosmdl-bg) 100%);
    border-radius: var(--cosmdl-radius-lg);
    transition: var(--cosmdl-transition);
    position: relative;
}

.cosmdl-module__header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--cosmdl-border);
    border-radius: var(--cosmdl-radius-lg) 0 0 var(--cosmdl-radius-lg);
    transition: var(--cosmdl-transition);
}

.cosmdl-module__header:hover {
    background: linear-gradient(135deg, var(--cosmdl-bg) 0%, var(--cosmdl-bg-alt) 100%);
}

.cosmdl-module__header:hover::before {
    background: var(--cosmdl-primary);
}

.cosmdl-module.is-open .cosmdl-module__header {
    border-bottom: 1px solid var(--cosmdl-border);
    border-radius: var(--cosmdl-radius-lg) var(--cosmdl-radius-lg) 0 0;
    background: linear-gradient(135deg, var(--cosmdl-primary-light) 0%, var(--cosmdl-bg) 100%);
}

.cosmdl-module.is-open .cosmdl-module__header::before {
    background: linear-gradient(180deg, var(--cosmdl-primary) 0%, var(--cosmdl-primary-hover) 100%);
}

.cosmdl-module__handle {
    color: var(--cosmdl-text-light);
    margin-right: 16px;
    cursor: grab;
    transition: var(--cosmdl-transition);
    padding: 8px;
    border-radius: var(--cosmdl-radius);
    /* 中文注释：避免拖拽时触发页面滚动/选中文本，提升拖拽稳定性 */
    touch-action: none;
    user-select: none;
}

.cosmdl-module__handle:hover {
    color: var(--cosmdl-primary);
    background: var(--cosmdl-white);
    box-shadow: var(--cosmdl-shadow);
}

.cosmdl-module__handle:active {
    cursor: grabbing;
}

/* ================== 拖拽辅助（模块排序/网盘排序共用） ================== */
.drag-ghost {
    position: fixed;
    z-index: 999999;
    padding: 8px 12px;
    border-radius: var(--cosmdl-radius);
    border: 1px solid var(--cosmdl-border);
    background: var(--cosmdl-white);
    box-shadow: var(--cosmdl-shadow-lg);
    color: var(--cosmdl-text-main);
    opacity: 0.92;
    pointer-events: none;
    user-select: none;
}

body.cosmdl-dragging-cursor {
    cursor: grabbing;
    user-select: none;
}

.cosmdl-module__title {
    font-weight: 700;
    font-size: 15px;
    flex-grow: 1;
    color: var(--cosmdl-text-main);
    letter-spacing: 0.3px;
}

.cosmdl-module__toggle-icon {
    color: var(--cosmdl-text-light);
    margin: 0 12px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 20px;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cosmdl-module__toggle-icon .cosmdl-icon {
    width: 1em !important;
    height: 1em !important;
    margin-right: 0 !important;
    vertical-align: middle !important;
}

.cosmdl-module.is-open .cosmdl-module__toggle-icon {
    transform: rotate(180deg);
    color: var(--cosmdl-primary);
}

.cosmdl-module__body {
    padding: 24px;
    display: none;
    animation: moduleSlideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cosmdl-module.is-open .cosmdl-module__body {
    display: block;
}

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

.cosmdl-module__kv {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--cosmdl-border-light);
}

.cosmdl-module__kv:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.cosmdl-module__kv label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--cosmdl-text-main);
    font-size: 14px;
    letter-spacing: 0.2px;
}

.cosmdl-module__kv .description {
    font-size: 13px;
    color: var(--cosmdl-text-sub);
    margin-top: 6px;
    line-height: 1.6;
}

/* 预览卡片 */
.cosmdl-preview-card {
    display: block;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    border-radius: 0;
    min-height: auto;
}

.cosmdl-preview-card:hover {
    box-shadow: none;
}

/* 颜色选择器等 */
.wp-picker-container {
    vertical-align: middle;
}

/* 复选框美化 */
.cosmdl-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    padding: 8px 12px;
    border-radius: var(--cosmdl-radius);
    transition: var(--cosmdl-transition);
}

.cosmdl-checkbox:hover {
    background: var(--cosmdl-bg);
}

.cosmdl-checkbox input[type="checkbox"] {
    margin: 0;
}

/* ================== 通知与模态框 ================== */
/* 未保存提示 */
.cosmdl-unsaved {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
    padding: 18px 28px;
    border-radius: var(--cosmdl-radius-lg);
    box-shadow: var(--cosmdl-shadow-xl);
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 9999;
    transform: translateY(120px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 88px;
}

.cosmdl-unsaved.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.cosmdl-unsaved .msg {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
}

.cosmdl-unsaved .msg .dashicons {
    color: #fbbf24;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.cosmdl-unsaved-save {
    background: linear-gradient(135deg, var(--cosmdl-primary) 0%, var(--cosmdl-primary-hover) 100%);
    color: #fff !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: var(--cosmdl-radius) !important;
    cursor: pointer;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: all 0.2s !important;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.cosmdl-unsaved-save:hover {
    background: linear-gradient(135deg, var(--cosmdl-primary-hover) 0%, var(--cosmdl-primary-dark) 100%) !important;
    box-shadow: 0 6px 16px rgba(34, 113, 177, 0.4) !important;
    transform: translateY(-2px) !important;
}

/* 删除通知 */
/* 中文注释：删除通知复用 .cosmdl-unsaved 的同款外观，仅调整位置避免与未保存提醒重叠 */
.cosmdl-unsaved--delete {
    bottom: 30px;
}

/* 模态框 */
.cosmdl-delete-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(4px);
    }
}

.cosmdl-delete-modal[aria-hidden="false"] {
    display: flex;
}

.cosmdl-delete-modal-content {
    background: #fff;
    width: 90%;
    max-width: 440px;
    border-radius: var(--cosmdl-radius-lg);
    box-shadow: var(--cosmdl-shadow-xl);
    overflow: hidden;
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--cosmdl-border);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes cosmdl-spin {
  to {
    transform: rotate(360deg);
  }
}

.cosmdl-delete-modal-header {
    padding: 24px;
    background: linear-gradient(135deg, var(--cosmdl-bg) 0%, var(--cosmdl-bg-alt) 100%);
    border-bottom: 1px solid var(--cosmdl-border);
    display: flex;
    align-items: center;
    gap: 14px;
}

.cosmdl-delete-modal-header .dashicons {
    color: var(--cosmdl-warning);
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.cosmdl-delete-modal-title {
    margin: 0;
    font-size: 18px;
    color: var(--cosmdl-text-main);
    font-weight: 700;
    letter-spacing: -0.3px;
}

.cosmdl-delete-modal-message {
    padding: 28px 24px;
    color: var(--cosmdl-text-sub);
    font-size: 15px;
    line-height: 1.7;
}

.cosmdl-delete-modal-buttons {
    padding: 20px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid var(--cosmdl-border);
    background: var(--cosmdl-bg);
}

.cosmdl-delete-modal-btn {
    padding: 10px 20px;
    border-radius: var(--cosmdl-radius);
    border: 1px solid var(--cosmdl-border);
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--cosmdl-transition);
    box-shadow: var(--cosmdl-shadow);
}

.cosmdl-delete-modal-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--cosmdl-shadow-md);
}

.cosmdl-delete-modal-btn.cancel:hover {
    background: var(--cosmdl-bg);
    color: var(--cosmdl-text-main);
}

.cosmdl-delete-modal-btn.confirm {
    background: linear-gradient(135deg, var(--cosmdl-danger) 0%, var(--cosmdl-danger-hover) 100%);
    color: #fff;
    border-color: var(--cosmdl-danger);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.cosmdl-delete-modal-btn.confirm:hover {
    background: linear-gradient(135deg, var(--cosmdl-danger-hover) 0%, #991b1b 100%);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
}

/* ================== 响应式适配 ================== */
@media (max-width: 1200px) {
    .cosmdl-wrap {
        max-width: 100%;
        margin-right: 10px;
        margin-left: 10px;
    }
}

@media (max-width: 782px) {
    .cosmdl-wrap {
        margin: 10px;
    }
    
    .cosmdl-header {
        padding: 16px;
    }
    
    .cosmdl-header h1 {
        font-size: 20px;
        text-align: center;
    }
    
    .cosmdl-header-titlebar {
        justify-content: center;
    }
    
    .cosmdl-actions {
        justify-content: center;
        overflow-x: auto;
        padding-bottom: 8px;
    }
    
    .cosmdl-top-meta {
        width: 100%;
        justify-content: center;
        margin-right: 0;
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid var(--cosmdl-border);
        padding-bottom: 12px;
    }
    
    .cosmdl-drawer-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0 8px;
        border-radius: var(--cosmdl-radius-lg) var(--cosmdl-radius-lg) 0 0;
    }
    
    .drawer-tab {
        flex-shrink: 0;
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .drawer-content {
        padding: 20px;
        min-height: auto;
        border-radius: 0 0 var(--cosmdl-radius-lg) var(--cosmdl-radius-lg);
    }
    
    .drawer-content h2 {
        font-size: 18px;
    }
    
    .drawer-content h2::before {
        height: 18px;
    }
    
    .form-table th, 
    .form-table td {
        display: block;
        width: 100%;
        padding: 12px 0;
    }
    
    .form-table th {
        margin-bottom: 6px;
        padding-bottom: 6px;
        border-bottom: 1px solid var(--cosmdl-border-light);
    }
    
    .form-table td {
        padding-top: 12px;
    }
    
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="password"],
    input[type="url"],
    select,
    textarea {
        max-width: 100%;
        font-size: 16px;
    }
    
    .cosmdl-env-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .cosmdl-env-item {
        padding: 16px;
    }
    
    .cosmdl-module__header {
        padding: 14px 16px;
    }
    
    .cosmdl-module__body {
        padding: 16px;
    }
    
    .cosmdl-module__kv {
        margin-bottom: 16px;
        padding-bottom: 16px;
    }
    
    .cosmdl-preview-card {
        padding: 0;
        min-height: auto;
    }
    
    .cosmdl-unsaved {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 14px 20px;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .cosmdl-unsaved .msg {
        flex-direction: column;
        gap: 8px;
    }
    
    .cosmdl-delete-modal-content {
        width: 95%;
        max-width: 380px;
    }
    
    .cosmdl-delete-modal-header {
        padding: 20px;
    }
    
    .cosmdl-delete-modal-message {
        padding: 20px;
        font-size: 14px;
    }
    
    .cosmdl-delete-modal-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .cosmdl-delete-modal-btn {
        width: 100%;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .cosmdl-header h1 {
        font-size: 18px;
    }
    
    .cosmdl-top-meta {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .cosmdl-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .cosmdl-top-link {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .cosmdl-top-link span:last-child {
        display: none;
    }
    
    .cosmdl-action {
        width: 36px;
        height: 36px;
    }
    
    .drawer-tab {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .drawer-content {
        padding: 16px;
    }
    
    .drawer-content h2 {
        font-size: 16px;
    }
    
    .drawer-content .description {
        font-size: 13px;
    }
    
    .cosmdl-env-item {
        padding: 12px;
    }
    
    .cosmdl-env-icon {
        width: 28px;
        height: 28px;
    }
    
    .cosmdl-env-body {
        font-size: 12px;
    }
    
    .cosmdl-module__header {
        padding: 12px;
    }
    
    .cosmdl-module__title {
        font-size: 14px;
    }
    
    .cosmdl-module__body {
        padding: 12px;
    }
    
    .cosmdl-module__kv label {
        font-size: 13px;
    }
    
    .cosmdl-module__kv .description {
        font-size: 12px;
    }
}
