/* 拍在广西素材网 - 主样式文件 */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

/* 主色调定义 */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #dbeafe;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

/* 通用工具类 */
.text-primary { color: var(--primary); }
.bg-primary { background-color: var(--primary); }
.border-primary { border-color: var(--primary); }

.text-secondary { color: var(--secondary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

.bg-success { background-color: var(--success); }
.bg-warning { background-color: var(--warning); }
.bg-error { background-color: var(--error); }

/* 按钮样式统一 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.btn:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background-color: var(--gray-200);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* 圆角按钮 */
.!rounded-button {
    border-radius: 8px !important;
}

/* 统一所有按钮元素的圆角样式 */
button, 
input[type="button"], 
input[type="submit"], 
input[type="reset"],
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-sm,
.btn-lg {
    border-radius: 8px !important;
}

/* 确保链接按钮也有圆角 */
a.btn,
a[class*="btn"],
a[class*="button"] {
    border-radius: 8px !important;
}

/* 表单样式 */
.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input:disabled {
    background-color: var(--gray-100);
    color: var(--gray-500);
    cursor: not-allowed;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-error {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--error);
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background-color: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

/* 导航样式 */
.navbar {
    background-color: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
}

.nav-link:hover {
    background-color: var(--gray-100);
    color: var(--primary);
}

.nav-link.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* 徽章样式 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-primary {
    background-color: var(--primary-light);
    color: var(--primary);
}

.badge-success {
    background-color: #d1fae5;
    color: var(--success);
}

.badge-warning {
    background-color: #fef3c7;
    color: var(--warning);
}

.badge-error {
    background-color: #fee2e2;
    color: var(--error);
}

.badge-gray {
    background-color: var(--gray-100);
    color: var(--gray-600);
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: between;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    flex: 1;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: var(--gray-600);
    background-color: var(--gray-100);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

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

/* 提示框样式 */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d1fae5;
    border-color: #a7f3d0;
    color: #065f46;
}

.alert-warning {
    background-color: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

.alert-error {
    background-color: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-info {
    background-color: var(--primary-light);
    border-color: #93c5fd;
    color: #1e40af;
}

/* 分页样式 */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.pagination-item:hover {
    background-color: var(--gray-100);
    border-color: var(--gray-400);
}

.pagination-item.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    background-color: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.table tbody tr:hover {
    background-color: var(--gray-50);
}

/* 标签样式 */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.25rem;
    background-color: var(--gray-100);
    color: var(--gray-700);
}

.tag-video {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.tag-image {
    background-color: #d1fae5;
    color: #059669;
}

.tag-audio {
    background-color: #e9d5ff;
    color: #7c3aed;
}

/* 头像样式 */
.avatar {
    border-radius: 50%;
    object-fit: cover;
}

.avatar-sm {
    width: 2rem;
    height: 2rem;
}

.avatar-md {
    width: 3rem;
    height: 3rem;
}

.avatar-lg {
    width: 4rem;
    height: 4rem;
}

/* 价格样式 */
.price {
    font-weight: 600;
    color: var(--primary);
}

.price-large {
    font-size: 1.25rem;
}

.price-original {
    text-decoration: line-through;
    color: var(--gray-500);
    font-weight: normal;
}

/* 状态指示器 */
.status-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-dot.online {
    background-color: var(--success);
}

.status-dot.offline {
    background-color: var(--gray-400);
}

.status-dot.busy {
    background-color: var(--warning);
}

/* 响应式工具类 */
@media (max-width: 640px) {
    .sm\:hidden {
        display: none;
    }
    
    .sm\:block {
        display: block;
    }
    
    .sm\:flex {
        display: flex;
    }
}

@media (max-width: 768px) {
    .md\:hidden {
        display: none;
    }
    
    .md\:block {
        display: block;
    }
    
    .md\:flex {
        display: flex;
    }
}

@media (max-width: 1024px) {
    .lg\:hidden {
        display: none;
    }
    
    .lg\:block {
        display: block;
    }
    
    .lg\:flex {
        display: flex;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: var(--gray-900);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Hero区域搜索框样式 */
.hero-search {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.hero-search:focus {
    background: rgba(255, 255, 255, 1);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* 透明导航栏样式 */
.navbar-transparent {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 透明搜索框样式 */
.search-transparent {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.search-transparent:focus {
    background: rgba(255, 255, 255, 1);
    border-color: var(--primary);
}

/* 卡片悬停效果 */
.card-hover {
    transition: all 0.3s ease;
    cursor: pointer;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* 分类卡片悬停缩放效果 */
.category-card {
    transition: all 0.3s ease;
    overflow: hidden;
}

.category-card:hover {
    transform: scale(1.05);
}

.category-card img {
    transition: all 0.3s ease;
}

.category-card:hover img {
    transform: scale(1.1);
}

/* 素材卡片样式 */
.material-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.material-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.material-card .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.material-card:hover .overlay {
    opacity: 1;
}

/* 收藏按钮样式 */
.favorite-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.favorite-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.favorite-btn.active {
    background: var(--error);
    color: white;
}

/* 购物车数量徽章 */
.cart-badge {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: var(--error);
    color: white;
    border-radius: 50%;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    border: 2px solid white;
}

/* 购物车数量显示 */
.cart-count {
    /* 移除display相关样式，让Tailwind CSS的flex类生效 */
    /* position, background等样式由Tailwind CSS类处理 */
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 渐变背景 */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-overlay {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* 移动端响应式样式 */
@media (max-width: 768px) {
    /* 导航栏优化 */
    .navbar {
        padding: 0.5rem 1rem;
    }
    
    .navbar .container {
        flex-wrap: wrap;
    }
    
    .nav-links {
        display: none;
    }
    
    .search-form {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .search-input {
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    /* 按钮优化 - 触屏友好 */
    .btn {
        min-height: 48px; /* 增加触摸目标大小 */
        min-width: 48px;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        border-radius: 8px;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent; /* 移除iOS点击高亮 */
    }
    
    .btn:active {
        transform: scale(0.98); /* 触摸反馈 */
        opacity: 0.8;
    }
    
    .btn-sm {
        min-height: 44px;
        min-width: 44px;
        padding: 0.5rem 1rem;
    }
    
    /* 表单优化 - 触屏友好 */
    .form-control {
        min-height: 48px;
        padding: 0.75rem;
        font-size: 16px; /* 防止iOS缩放 */
        border-radius: 8px;
        border: 2px solid #e2e8f0;
        transition: border-color 0.2s ease;
    }
    
    .form-control:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        outline: none;
    }
    
    /* 选择框优化 */
    select.form-control {
        background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 12px;
        padding-right: 40px;
    }
    
    /* 复选框和单选框优化 */
    input[type="checkbox"],
    input[type="radio"] {
        width: 20px;
        height: 20px;
        margin-right: 8px;
    }
    
    /* 链接优化 */
    a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* 卡片优化 */
    .card {
        margin-bottom: 1rem;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .material-card {
        margin-bottom: 1.5rem;
        border-radius: 12px;
        transition: transform 0.2s ease;
    }
    
    .material-card:active {
        transform: scale(0.98);
    }
    
    /* 模态框优化 */
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
        border-radius: 12px;
    }
    
    /* 分页优化 */
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .pagination .page-link {
        min-width: 48px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        -webkit-tap-highlight-color: transparent;
    }
    
    .pagination .page-link:active {
        transform: scale(0.95);
    }
    
    /* 素材卡片优化 */
    .material-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    /* 收藏按钮优化 */
    .favorite-btn {
        min-width: 48px;
        min-height: 48px;
        border-radius: 50%;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }
    
    .favorite-btn:active {
        transform: scale(0.9);
    }
    
    /* 购物车徽章优化 */
    .cart-badge {
        font-size: 0.75rem;
        min-width: 20px;
        height: 20px;
    }
    
    /* 文字大小调整 */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    /* 间距调整 */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* 触摸滚动优化 */
    .scrollable {
        -webkit-overflow-scrolling: touch;
    }
    
    /* 图片响应式优化 */
    img {
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    .material-image,
    .card img {
        width: 100%;
        height: auto;
        object-fit: cover;
        border-radius: 8px;
    }
    
    /* 视频响应式优化 */
    video {
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    /* 内容容器响应式优化 */
    .content-wrapper {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 表格响应式优化 */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
    }
    
    .table {
        min-width: 600px;
        font-size: 0.9rem;
    }
    
    /* 文本内容优化 */
    .text-content {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* 代码块响应式优化 */
    pre,
    code {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    /* 小屏幕设备优化 */
    .container {
        padding: 0 0.75rem;
    }
    
    /* 按钮在小屏幕上的优化 */
    .btn {
        width: 100%;
        margin-bottom: 0.75rem;
        min-height: 50px; /* 更大的触摸目标 */
        font-size: 1.1rem;
    }
    
    .btn-group .btn {
        width: auto;
        margin-bottom: 0;
        min-width: 50px;
    }
    
    /* 表单在小屏幕上的优化 */
    .form-control {
        font-size: 16px;
        min-height: 50px;
        padding: 1rem;
        border-radius: 10px;
    }
    
    /* 标签优化 */
    label {
        font-size: 1.1rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
        display: block;
    }
    
    /* 模态框在小屏幕上的优化 */
    .modal-content {
        margin: 0.5rem;
        border-radius: 16px;
        max-height: calc(100vh - 1rem);
    }
    
    /* 素材网格在小屏幕上的优化 */
    .material-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }
    
    /* 导航栏在小屏幕上的优化 */
    .navbar {
        padding: 0.5rem;
    }
    
    /* 搜索框在小屏幕上的优化 */
    .search-input {
        min-height: 48px;
        padding: 0.75rem 1rem;
        border-radius: 10px;
    }
    
    /* 卡片在小屏幕上的优化 */
    .card {
        margin-bottom: 1rem;
        border-radius: 16px;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    /* 分页在小屏幕上的优化 */
    .pagination .page-link {
        min-width: 50px;
        min-height: 50px;
        font-size: 1.1rem;
    }
    
    /* 收藏按钮在小屏幕上的优化 */
    .favorite-btn {
        min-width: 50px;
        min-height: 50px;
    }
    
    /* 文字大小调整 */
    h1 { font-size: 1.5rem; line-height: 1.3; }
    h2 { font-size: 1.3rem; line-height: 1.3; }
    h3 { font-size: 1.1rem; line-height: 1.3; }
    
    /* 段落文字优化 */
    p {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    /* 链接在小屏幕上的优化 */
    a {
        min-height: 48px;
        padding: 0.5rem;
    }
    
    /* 表格在小屏幕上的优化 */
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }
    
    /* 图片在小屏幕上的进一步优化 */
    .material-image {
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    /* 图片网格在小屏幕上的优化 */
    .image-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.5rem;
    }
    
    /* 视频播放器在小屏幕上的优化 */
    .video-player {
        width: 100%;
        max-width: 100%;
        border-radius: 12px;
        overflow: hidden;
    }
    
    /* 内容区域在小屏幕上的优化 */
    .main-content {
        padding: 1rem 0.75rem;
    }
    
    /* 侧边栏在小屏幕上隐藏或调整 */
    .sidebar {
        display: none;
    }
    
    .sidebar.mobile-visible {
        display: block;
        width: 100%;
        margin-top: 1rem;
    }
    
    /* 网格布局在小屏幕上的优化 */
    .grid-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* 弹性布局在小屏幕上的优化 */
    .flex-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* 长文本内容优化 */
    .long-text {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }
}

/* 全局响应式图片和媒体优化 */
img {
    max-width: 100%;
    height: auto;
}

video,
audio {
    max-width: 100%;
    height: auto;
}

/* 响应式嵌入内容 */
.embed-responsive {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.embed-responsive::before {
    content: "";
    display: block;
    padding-top: 56.25%; /* 16:9 宽高比 */
}

.embed-responsive iframe,
.embed-responsive object,
.embed-responsive embed,
.embed-responsive video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* 响应式表格 */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 响应式文本 */
.text-responsive {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
    
    .navbar,
    .footer,
    .sidebar {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}