/* 
 * 移动端优化样式
 * 用于改善在小屏幕设备上的显示效果
 */

/* 通用移动端优化 */
@media (max-width: 767px) {
    /* 调整容器内边距 */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* 页面标题优化 */
    .page-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    /* 调整页眉布局 */
    .site-header .navbar-brand {
        max-width: 65%;
    }
    
    .site-header .site-title {
        font-size: 1.25rem;
    }
    
    .site-header .site-description {
        font-size: 0.75rem;
    }
    
    /* 优化导航菜单 */
    .navbar-collapse {
        margin-top: 0.5rem;
    }
    
    .user-actions {
        margin-top: 0.5rem;
        width: 100%;
    }
    
    .user-actions .btn {
        flex: 1;
    }
    
    /* 筛选工具布局优化 */
    .filter-search-wrapper {
        width: 100%;
        margin-top: 0.75rem;
    }
    
    .resource-search {
        width: 100%;
        margin-right: 0 !important;
    }
    
    .resource-search .form-control {
        height: 38px;
    }
    
    .filter-search-wrapper form:last-child {
        width: 100%;
    }
    
    .filter-search-wrapper select.form-select {
        height: 38px;
    }
    
    /* 资源卡片优化 */
    .resource-card {
        margin-bottom: 1rem;
    }
    
    .resource-card .card-title {
        font-size: 0.95rem;
        height: auto;
        -webkit-line-clamp: 2;
    }
    
    .resource-excerpt {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .resource-banner {
        height: 120px;
    }
    
    .resource-status-bar {
        padding: 0.35rem 0.75rem;
    }
    
    .card-body {
        padding: 0.75rem !important;
    }
    
    .card-footer {
        padding: 0.75rem !important;
    }
    
    .resource-meta {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .meta-info {
        margin-bottom: 0.5rem;
        width: 100%;
    }
    
    .action-buttons {
        width: 100%;
    }
    
    .action-buttons .btn {
        width: 100%;
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    
    .visibility-tag {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
    
    .category-tag {
        font-size: 0.7rem;
        padding: 0.1rem 0.4rem;
        margin-right: 0.25rem;
        margin-bottom: 0.25rem;
    }
    
    /* API卡片优化 */
    .api-card .card-title {
        font-size: 0.9rem;
    }
    
    .api-label {
        font-size: 0.65rem;
        padding: 0.1rem 0.25rem;
    }
    
    .api-description {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .api-stats {
        padding: 0.5rem !important;
    }
    
    .stat-value {
        font-size: 0.9rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    /* 分页优化 */
    .pagination-container .page-numbers {
        font-size: 0.9rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* 单个资源页面优化 */
    .resource-single .entry-header {
        padding: 1.25rem !important;
    }
    
    .resource-single .entry-title {
        font-size: 1.35rem;
    }
    
    .resource-single .entry-meta {
        font-size: 0.8rem;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.5rem;
    }
    
    .resource-single .entry-content {
        padding: 0.5rem !important;
    }
    
    .resource-info-card .row {
        flex-direction: column;
    }
    
    .resource-info-card .col-md-4 {
        width: 100%;
        margin-bottom: 1rem;
        border-right: none !important;
        border-bottom: 1px solid rgba(0,0,0,.1);
        padding-bottom: 1rem;
    }
    
    .resource-info-card .col-md-4:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
    
    .resource-link-container {
        padding: 1.25rem !important;
    }
    
    .resource-link-container .btn {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .resource-link-container .input-group {
        flex-direction: column;
    }
    
    .resource-link-container .input-group > .form-control {
        border-radius: 0.25rem;
        margin-bottom: 0.5rem;
        width: 100% !important;
    }
    
    .resource-link-container .input-group > .btn {
        border-radius: 0.25rem;
        width: 100%;
    }
    
    .extract-code .input-group {
        flex-direction: column;
    }
    
    .extract-code .input-group > .form-control {
        border-radius: 0.25rem;
        margin-bottom: 0.5rem;
        width: 100% !important;
    }
    
    .extract-code .input-group > .btn {
        border-radius: 0.25rem;
        width: 100%;
    }
    
    .resource-single .entry-footer {
        padding: 1.25rem !important;
    }
    
    /* 评论区域优化 */
    .comment-list .comment {
        padding: 1rem;
    }
    
    .comment-metadata {
        font-size: 0.7rem;
    }
    
    .comment-content p {
        font-size: 0.9rem;
    }
    
    .comment-respond {
        padding: 1.25rem !important;
    }
    
    .comment-form-comment textarea {
        height: 100px;
    }
    
    /* 侧边栏小工具优化 */
    .author-widget .author-avatar img {
        width: 80px;
        height: 80px;
    }
    
    .author-widget .author-name {
        font-size: 1.1rem;
    }
    
    .author-widget .author-bio {
        font-size: 0.8rem;
    }
    
    .author-widget .author-stats {
        font-size: 0.9rem;
    }
    
    .popular-resources .list-group-item,
    .more-resources .list-group-item {
        padding: 0.75rem;
    }
    
    /* 分类页面优化 */
    .page-header {
        text-align: center;
        margin-bottom: 1.5rem !important;
    }
    
    .page-header .page-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .page-header .text-muted {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .category-navigation h4 {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .category-navigation .card {
        margin-bottom: 0.5rem;
    }
    
    .category-navigation .card-title {
        font-size: 0.9rem;
    }
    
    .category-navigation .small {
        font-size: 0.75rem;
    }
    
    /* 作者页面优化 */
    .author-profile .col-md-4 {
        padding: 1.5rem !important;
    }
    
    .author-profile .col-md-8 {
        padding: 1.5rem !important;
    }
    
    .author-profile .author-name {
        font-size: 1.25rem;
    }
    
    .author-profile .author-avatar img {
        width: 120px;
        height: 120px;
    }
    
    .author-profile .author-stats {
        flex-wrap: wrap;
        justify-content: space-around;
    }
    
    .author-profile .author-stats > div {
        padding: 0.5rem 1rem;
        margin-bottom: 0.5rem;
    }
    
    .author-profile .author-stats .h3 {
        font-size: 1.5rem;
    }
    
    .author-profile .author-actions {
        display: flex;
        justify-content: center;
    }
    
    .author-profile .author-actions .btn {
        flex: 1;
        max-width: 45%;
    }
    
    .filter-bar h3 {
        font-size: 1.1rem;
    }
    
    .filter-bar .row > div {
        margin-bottom: 0.5rem;
    }
    
    .filter-bar .form-select,
    .filter-bar .form-control {
        font-size: 0.9rem;
    }
    
    /* 作者资源列表优化 */
    .resource-list-item {
        padding: 1rem !important;
    }
    
    .resource-list-item .resource-title {
        font-size: 1rem;
    }
    
    .resource-meta-tags {
        flex-wrap: wrap;
    }
    
    .resource-meta-tags span {
        margin-bottom: 0.35rem;
    }
    
    .resource-list-item .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .resource-item-footer {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .resource-item-footer .resource-meta {
        margin-bottom: 0.75rem;
        width: 100%;
    }
    
    .resource-item-footer .resource-actions {
        width: 100%;
        display: flex;
    }
    
    .resource-item-footer .resource-actions .btn {
        flex: 1;
    }
}

/* 超小屏幕设备优化 (小于480px) */
@media (max-width: 479px) {
    .resource-banner {
        height: 100px;
    }
    
    .resource-card .card-title {
        font-size: 0.9rem;
        -webkit-line-clamp: 1;
        height: 1.3rem;
    }
    
    .resource-excerpt {
        -webkit-line-clamp: 1;
        margin-bottom: 0.35rem;
    }
    
    .disk-icon {
        font-size: 0.9rem;
    }
    
    .disk-name {
        font-size: 0.8rem;
    }
    
    .meta-date, .meta-views {
        font-size: 0.7rem;
    }
    
    .category-tag {
        font-size: 0.65rem;
        padding: 0.1rem 0.3rem;
    }
    
    /* API卡片进一步优化 */
    .api-provider-avatar img {
        width: 36px;
        height: 36px;
    }
    
    .api-card .card-header {
        padding: 0.5rem 0.75rem !important;
    }
    
    .api-description-wrapper {
        height: 3em;
    }
    
    .api-description {
        -webkit-line-clamp: 2;
    }
    
    /* 单个资源页面的超小屏幕优化 */
    .resource-single .entry-title {
        font-size: 1.2rem;
    }
    
    .resource-single .entry-meta {
        font-size: 0.75rem;
    }
    
    .resource-single .entry-meta > span {
        margin-right: 0.5rem !important;
    }
    
    .resource-info-card {
        padding: 0.75rem !important;
    }
    
    .resource-info-item strong {
        font-size: 0.8rem;
    }
    
    .resource-info-item .fs-5 {
        font-size: 0.95rem !important;
    }
    
    .popular-resources .card-title,
    .more-resources .card-title {
        font-size: 1rem;
    }
    
    .resource-title a {
        font-size: 0.85rem;
    }
    
    .resource-title small {
        font-size: 0.7rem;
    }
    
    /* 分类页面超小屏幕优化 */
    .page-header .page-title {
        font-size: 1.3rem;
    }
    
    .category-navigation .col-md-4 {
        width: 100%;
    }
    
    .category-navigation .card-body {
        padding: 0.5rem 0.75rem !important;
    }
    
    /* 作者页面超小屏幕优化 */
    .author-profile .author-avatar img {
        width: 100px;
        height: 100px;
    }
    
    .author-profile .author-stats .h3 {
        font-size: 1.25rem;
    }
    
    .author-profile .info-item .fs-5 {
        font-size: 0.95rem !important;
    }
    
    .author-profile .author-bio p {
        font-size: 0.9rem;
    }
    
    .resource-item-footer .resource-meta span {
        font-size: 0.75rem;
        margin-right: 0.5rem;
    }
    
    .resource-meta-tags .badge {
        font-size: 0.7rem;
        padding: 0.15rem 0.35rem;
    }
} 