
/* Rules list page specific styles */

/* Common wrapper and ad styles - defined in page-specific.css */

/* Rules specific ad IDs */
/* Left ad - 160x600 */
#rules-list-left {
    width: 160px;
    height: 600px;
    position: sticky;
    top: 20px;
}

/* Right ads - 300x400 each */
#rules-list-right-top,
#rules-list-right-bottom {
    width: 100%;
    height: auto;
}

/* Bottom ad - 728x90 */
#rules-list-bottom {
    width: 728px;
    height: 90px;
}

/* Ad positioning - defined in page-specific.css */

/* Content section */
.page-content-container {
    width: 810px;
    padding: 0;
    position: relative;
    flex-shrink: 0;
}

/* Page Title */
.page-title {
    font-size: 32px;
    font-weight: 600;
    color: #333;
    text-align: left;
    margin-bottom: 24px;
}

/* Rules Description Section */
.rules-description {
    color: #636366;
    font-size: 16px;
    line-height: 24px;
    margin-bottom: 30px;
}

.rules-content {
    margin-bottom: 40px;
}

.rules-list {
    margin: 20px 0;
    padding: 16px;
    background: #F2F2F7;
    border-radius: 4px;
    list-style: none;
}

.rules-list li {
    color: #636366;
    font-size: 16px;
    line-height: 24px;
    margin-bottom: 10px;
}

.rules-list li:last-child {
    margin-bottom: 0;
}

/* Sudoku Grid Examples */
.grid-examples {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 30px 0;
}

.rule-example-img {
    width: 100%;
    aspect-ratio: 1;
    max-width: 100%;
}

/* Rule Grid Layout */
.rules-grid {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 0;
}

/* Rule Card - PC端左图右文字布局 */
.rule-item {
    background: transparent;
    border-radius: 8px;
    overflow: visible;
    box-shadow: none;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
    min-height: 160px;
    height: auto;
    padding: 0;
    position: relative;
}

.rule-item:hover {
    background: transparent;
}

/* Rule Thumbnail - 左侧图片 */
.rule-thumbnail {
    flex-shrink: 0;
    width: 280px;
    height: 160px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: 7px;
}

.rule-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rule-item:hover .rule-thumbnail img {
    transform: scale(1.1);
}

/* Rule Content - 右侧文字内容 */
.rule-content {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 160px;
    box-sizing: border-box;
}

/* Rule Meta Info - 隐藏meta信息 */
.rule-meta {
    display: none;
}

.rule-category {
    color: #5182ED;
}

.rule-time {
    color: #999;
}

.rule-item h3 {
    font-size: 20px;
    font-weight: 600;
    color: #48484A;
    margin: 0 0 12px 0;
    line-height: 26px;
    display: block;
    min-height: auto;
    height: auto;
}

.rule-item p {
    font-size: 16px;
    color: #48484A;
    line-height: 24px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    flex: 0 0 auto;
    margin: 0 0 12px 0;
}

/* Continue Reading Button */
.rule-content .continue-reading {
    color: #5182ED;
    font-size: 16px;
    line-height: 24px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    margin: 0;
    padding: 0;
    align-self: flex-start;
    flex-shrink: 0;
}

.rule-content .continue-reading:hover {
    text-decoration: underline;
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    padding: 20px 0;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    min-width: 40px;
    text-align: center;
}

.pagination a:hover {
    background: #f5f5f5;
    border-color: #999;
}

.pagination .active {
    background: #5182ED;
    color: white;
    border-color: #5182ED;
}

.pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Mobile responsive styles */
@media screen and (max-width: 800px) {
    /* Grid examples images */
    .grid-examples {
        flex-direction: column !important;
        gap: 10px !important;
        align-items: center !important;
        padding: 0 !important;
        margin: 20px 0 !important;
    }

    .rule-example-img {
        width: 100% !important;
        max-width: calc(100vw - 32px) !important;
        height: auto !important;
    }
    
    /* Rule cards mobile layout - 上图下文字布局 */
    .rules-grid {
        gap: 20px !important;
    }
    
    .rule-item {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        min-height: auto !important;
        background: white !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        gap: 0 !important;
    }
    
    .rule-thumbnail {
        position: relative !important;
        width: 100% !important;
        height: 160px !important;
        border-radius: 12px 12px 0 0 !important;
    }
    
    .rule-content {
        position: relative !important;
        left: 0 !important;
        top: 0 !important;
        right: 0 !important;
        height: auto !important;
        min-height: auto !important;
        padding: 16px !important;
        transform: none !important;
    }
    
    .rule-item h3 {
        font-size: 18px !important;
        margin-bottom: 8px !important;
    }
    
    .rule-item p {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        margin-bottom: 12px !important;
        font-size: 14px !important;
        margin: 0 !important;
    }
    
    .rule-content .continue-reading {
        display: none !important;
    }
}
