/* Pultop Plugin Styles - Version 3.1 */

/* Archive Container */
.pultop-archive-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.pultop-archive-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.pultop-archive-description {
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
}

/* Archive Grid */
.pultop-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
    margin: 0 0 40px 0;
}

.pultop-item {
    display: block;
    margin: 0;
    padding: 0;
}

.pultop-image {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    background: #f0f0f0;
}

.pultop-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.pultop-image:hover img {
    transform: scale(1.03);
}

/* New Badge - Transparent Version with White Text */
.pultop-new-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 36, 0, 0.1);
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    z-index: 10;
    backdrop-filter: blur(2px);
    letter-spacing: 0.3px;
    line-height: 1.2;
    border: none;
    text-shadow: 0 0 2px rgba(0,0,0,0.3);
}

.pultop-title-wrap {
    margin: 10px 0 0 0;
}

.pultop-link {
    display: block;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #1a1a1a !important;
    text-decoration: none !important;
    text-align: center;
    transition: color 0.3s ease;
}

.pultop-link:hover {
    color: #FF2400 !important;
}

/* Pagination */
.pultop-pagination {
    text-align: center;
    margin: 40px 0;
    clear: both;
}

.pultop-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.pultop-pagination .page-numbers.current {
    background: #FF2400 !important;
    color: #fff !important;
    border-color: #FF2400 !important;
}

.pultop-pagination .page-numbers:hover:not(.current) {
    background: #FF2400 !important;
    border-color: #FF2400 !important;
    color: #fff !important;
}

/* Single Page */
.pultop-single {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #fff;
}

.pultop-single-cover {
    position: relative;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.pultop-single-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.pultop-single-header {
    margin-bottom: 20px;
}

.pultop-single-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.pultop-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
    padding: 5px 0;
    line-height: 1.2;
}

.pultop-meta-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: currentColor;
    stroke: none;
}

.pultop-single-categories svg {
    fill: currentColor;
}

.pultop-category-link {
    color: #666 !important;
    text-decoration: none !important;
    transition: color 0.3s ease;
}

.pultop-category-link:hover {
    color: #FF2400 !important;
    text-decoration: underline !important;
}

/* HTML Content */
.pultop-html-content {
    margin: 20px 0;
    line-height: 1.6;
}

.pultop-html-content h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 25px 0 15px 0;
    color: #2c3e50;
}

.pultop-html-content h3 {
    font-size: 18px;
    font-weight: 500;
    margin: 20px 0 12px 0;
    color: #34495e;
}

.pultop-html-content p {
    margin-bottom: 16px;
}

/* Link Button */
.pultop-h3-link-wrapper {
    margin: 15px 0 25px 0;
}

.pultop-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: #FF2400 !important;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 8px;
    font-size: 14px !important;
    transition: all 0.3s ease;
}

.pultop-link-btn:hover {
    background: #cc1d00 !important;
    transform: translateX(4px);
}

.pultop-single-content {
    font-size: 16px !important;
    line-height: 1.8 !important;
    color: #4a5568 !important;
    margin-top: 30px;
}

/* Screenshots Section */
.pultop-screenshots-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.pultop-screenshots-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pultop-screenshots-title svg {
    stroke: currentColor;
    fill: none;
}

/* Screenshot Grid - ALWAYS 4 columns */
.pultop-screenshots-grid-single {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.pultop-screenshot-item-single {
    cursor: pointer;
    min-width: 0;
}

.pultop-screenshot-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    width: 100%;
    background: #f5f5f5;
}

.pultop-screenshot-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.pultop-screenshot-img-wrapper:hover .pultop-screenshot-img {
    transform: scale(1.05);
}

.pultop-screenshot-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pultop-screenshot-img-wrapper:hover .pultop-screenshot-overlay {
    opacity: 1;
}

.pultop-screenshot-zoom svg {
    width: 32px;
    height: 32px;
}

/* Recommended Section */
.pultop-recommended-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.pultop-recommended-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 25px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pultop-recommended-title svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Native Horizontal Scroll - No loop, no blur */
.pultop-hscroll-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #FF2400 #e0e0e0;
    padding: 10px 0 20px 0;
}

.pultop-hscroll-container::-webkit-scrollbar {
    height: 6px;
}

.pultop-hscroll-container::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 10px;
}

.pultop-hscroll-container::-webkit-scrollbar-thumb {
    background: #FF2400;
    border-radius: 10px;
}

.pultop-hscroll-track {
    display: flex;
    gap: 20px;
    padding: 5px 0 15px 0;
}

.pultop-hscroll-item {
    flex: 0 0 auto;
    width: 260px;
    transition: transform 0.2s ease;
}

.pultop-hscroll-item:hover {
    transform: translateY(-4px);
}

.pultop-hscroll-link {
    display: block;
    text-decoration: none;
}

.pultop-hscroll-image-wrapper {
    border-radius: 12px;
    overflow: hidden;
    background: #f0f0f0;
    aspect-ratio: 300 / 200;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pultop-hscroll-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.pultop-hscroll-item:hover .pultop-hscroll-img {
    transform: scale(1.05);
}

.pultop-hscroll-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.pultop-hscroll-title {
    text-align: center;
    margin-top: 12px;
    padding: 0 8px;
}

.pultop-hscroll-title span {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a !important;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pultop-hscroll-link:hover .pultop-hscroll-title span {
    color: #FF2400 !important;
}

/* Modal */
.pultop-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
}

.pultop-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
}

.pultop-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s ease;
}

.pultop-modal-close:hover {
    color: #FF2400;
}

/* Empty State */
.pultop-empty {
    text-align: center;
    padding: 60px;
    font-size: 16px;
    color: #999;
    background: #f8f9fa;
    border-radius: 12px;
}

/* Lazy Load */
.pultop-lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pultop-lazy.loaded {
    opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) and (min-width: 769px) {
    .pultop-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    .pultop-hscroll-item {
        width: 220px;
    }
    .pultop-screenshots-grid-single {
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .pultop-archive-container {
        padding: 30px 15px;
    }
    .pultop-archive-title {
        font-size: 24px;
    }
    .pultop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .pultop-link {
        font-size: 12px !important;
    }
    .pultop-single {
        padding: 30px 15px;
    }
    .pultop-html-content h2 {
        font-size: 20px;
    }
    .pultop-html-content h3 {
        font-size: 16px;
    }
    .pultop-screenshots-grid-single {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    .pultop-single-meta {
        gap: 15px;
    }
    .pultop-screenshot-zoom svg {
        width: 20px;
        height: 20px;
    }
    .pultop-hscroll-item {
        width: 180px;
    }
    .pultop-hscroll-track {
        gap: 15px;
    }
    .pultop-new-badge {
        top: 6px;
        left: 6px;
        font-size: 9px;
        padding: 2px 6px;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .pultop-html-content h2 {
        font-size: 18px;
    }
    .pultop-html-content h3 {
        font-size: 15px;
    }
    .pultop-screenshots-grid-single {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    .pultop-screenshot-zoom svg {
        width: 18px;
        height: 18px;
    }
    .pultop-single-meta {
        gap: 12px;
    }
    .pultop-meta-item {
        font-size: 12px;
    }
    .pultop-meta-item svg {
        width: 12px;
        height: 12px;
    }
    .pultop-hscroll-item {
        width: 140px;
    }
    .pultop-hscroll-title span {
        font-size: 11px;
    }
    .pultop-hscroll-track {
        gap: 12px;
    }
    .pultop-hscroll-container {
        padding: 5px 0 15px 0;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .pultop-link {
        color: #fff !important;
    }
    .pultop-single {
        background: #1a1a1a;
    }
    .pultop-html-content h2,
    .pultop-html-content h3 {
        color: #e0e0e0;
    }
    .pultop-html-content p {
        color: #ccc;
    }
    .pultop-single-content {
        color: #ddd !important;
    }
    .pultop-screenshots-title,
    .pultop-recommended-title {
        color: #fff;
    }
    .pultop-screenshot-img-wrapper {
        border-color: #555;
    }
    .pultop-pagination .page-numbers {
        background: #333;
        color: #fff;
        border-color: #555;
    }
    .pultop-screenshots-section,
    .pultop-recommended-section {
        border-top-color: #333;
    }
    .pultop-archive-title {
        color: #fff;
    }
    .pultop-archive-description {
        background: #2a2a2a;
        color: #aaa;
    }
    .pultop-meta-item {
        color: #aaa;
    }
    .pultop-category-link {
        color: #aaa !important;
    }
    .pultop-category-link:hover {
        color: #FF2400 !important;
    }
    .pultop-hscroll-title span {
        color: #fff !important;
    }
    .pultop-hscroll-image-wrapper {
        background: #333;
    }
    .pultop-hscroll-container::-webkit-scrollbar-track {
        background: #333;
    }
}