/* Default Theme - Liseer */

:root {
    /* Primary Colors - Blue Cyan */
    --theme-primary: #00B4D8;
    --theme-primary-dark: #0096C7;
    --theme-secondary: #3b9cc1;
    --theme-accent: #00B4D8;

    /* Background & Surface */
    --theme-bg: #ffffff;
    --theme-surface: #f8fafc;
    --theme-surface-hover: #f1f5f9;

    /* Text Colors */
    --theme-text: #1a1a1a;
    --theme-text-secondary: #4a4a4a;
    --theme-text-muted: #8a8a8a;

    /* Border & Shadow */
    --theme-border: #e5e5e5;
    --theme-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --theme-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);

    /* Link Button Colors */
    --theme-link-bg: linear-gradient(135deg, #00B4D8 0%, #0096C7 100%);
    --theme-link-hover: linear-gradient(135deg, #0096C7 0%, #0077B6 100%);
    --theme-link-text: #ffffff;

    /* Spacing */
    --theme-container-max: 680px;
    --theme-spacing-xs: 4px;
    --theme-spacing-sm: 8px;
    --theme-spacing-md: 16px;
    --theme-spacing-lg: 24px;
    --theme-spacing-xl: 32px;

    /* Typography */
    --theme-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --theme-font-size-sm: 0.875rem;
    --theme-font-size-base: 1rem;
    --theme-font-size-lg: 1.125rem;
    --theme-font-size-xl: 1.5rem;
    --theme-font-size-2xl: 1.75rem;

    /* Border Radius */
    --theme-radius-sm: 6px;
    --theme-radius-md: 10px;
    --theme-radius-lg: 14px;
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    max-width: 100%;
}

body {
    font-family: var(--theme-font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--theme-bg);
    color: var(--theme-text);
    line-height: 1.6;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout */
.theme-default {
    min-height: 100vh;
    background: #f0f0f0;
    padding: var(--theme-spacing-lg) 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.theme-container {
    max-width: var(--theme-container-max);
    width: 100%;
    padding: var(--theme-spacing-xl) var(--theme-spacing-lg);
    background: var(--theme-bg);
    border-radius: var(--theme-radius-lg);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

/* Sidebar Ads */
.sidebar-ad {
    flex-shrink: 0;
    align-self: flex-start;
    position: sticky;
    top: 20px;
    width: 300px;
    display: flex;
    justify-content: center;
}

.sidebar-ad.stopped {
    position: relative;
    top: auto;
    margin-top: 500px;
}

.sidebar-ad-left {
    order: -1;
    justify-content: flex-end;
}

.sidebar-ad-right {
    order: 1;
    justify-content: flex-start;
}

.ad-placeholder {
    background: rgba(0, 0, 0, 0.03);
    border: 1px dashed #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
}

/* Tablet - Hide ads */
@media (max-width: 1200px) {
    .sidebar-ad {
        display: none;
    }

    .theme-default {
        display: block;
        padding: var(--theme-spacing-md);
    }

    .theme-container {
        max-width: 100%;
    }
}

/* Mobile - Full width, no radius, no space */
@media (max-width: 768px) {
    .theme-default {
        padding: 10px;
        background: var(--theme-bg);
    }

    .theme-container {
        border-radius: 0;
        box-shadow: none;
        padding: var(--theme-spacing-md);
        padding-top: 6px;
        max-width: 100%;
    }

    .theme-title {
        font-size: var(--theme-font-size-xl);
    }

    .theme-link-item {
        padding: 12px 14px;
    }
}

/* Header */
.theme-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--theme-spacing-md);
    padding-bottom: var(--theme-spacing-md);
    border-bottom: 1px dashed #e8e8e8;
}

.theme-logo {
    display: flex;
    align-items: center;
}

.theme-logo-img {
    height: 38px;
    max-width: 180px;
    object-fit: contain;
}

.theme-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: var(--theme-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.3rem;
}

.theme-share-btn:hover {
    color: var(--theme-text);
}

/* Content */
.theme-content {
    margin-bottom: var(--theme-spacing-xl);
}

.theme-title {
    font-size: var(--theme-font-size-2xl);
    font-weight: 700;
    color: var(--theme-text);
    margin: 0 0 var(--theme-spacing-lg) 0;
    line-height: 1.35;
}

.theme-description {
    font-size: var(--theme-font-size-base);
    color: var(--theme-text-secondary);
    line-height: 1.75;
    margin-bottom: var(--theme-spacing-md);
}

.theme-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: -16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-meta .category-chip {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 5px;
    border: 1px solid currentColor;
    line-height: 1;
}

.theme-meta .meta-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Color Variants based on List Type */
.theme-meta.type-keyword .category-chip {
    color: #0ea5e9;
    background: #f0f9ff;
}

.theme-meta.type-keyword-thumb .category-chip {
    color: #8b5cf6;
    background: #faf5ff;
}

.theme-meta.type-icon .category-chip {
    color: #f59e0b;
    background: #fffbeb;
}

.theme-meta.type-full-image .category-chip,
.theme-meta.type-full-thumb .category-chip {
    color: #10b981;
    background: #ecfdf5;
}

.theme-description p {
    margin: 0;
}

.theme-description p+p {
    margin-top: 1em;
}

.theme-description p:empty,
.theme-description p>br:only-child {
    display: block;
    margin: 0;
    line-height: 0.5;
}

.theme-description p:has(> br:only-child) {
    margin: 0;
    line-height: 0.5;
}

.theme-description h2 {
    font-size: var(--theme-font-size-lg);
    font-weight: 600;
    color: var(--theme-text);
    margin: var(--theme-spacing-lg) 0 var(--theme-spacing-sm) 0;
}

.theme-description ul,
.theme-description ol {
    padding-left: 1.5em;
    margin: 0.5em 0;
}

.theme-description li {
    margin-bottom: 0.3em;
}

/* Link Buttons */
.theme-links {
    display: flex;
    flex-direction: column;
    gap: var(--theme-spacing-sm);
    margin: var(--theme-spacing-lg) 0;
}

.theme-link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--theme-link-bg);
    border-radius: var(--theme-radius-md);
    color: var(--theme-link-text);
    font-weight: 500;
    font-size: var(--theme-font-size-base);
    transition: all 0.2s ease;
    cursor: pointer;
}

.theme-link-item:hover {
    background: var(--theme-link-hover);
    transform: translateY(-1px);
    box-shadow: var(--theme-shadow-md);
}

.theme-link-item .link-title {
    flex: 1;
}

.theme-link-item .link-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    font-size: 12px;
    margin-left: 12px;
    flex-shrink: 0;
}

/* --- List Type: Text Icon (keyword-thumb) --- */
.theme-links.list-type-keyword-thumb {
    display: flex;
    flex-direction: column;
    gap: var(--theme-spacing-sm);
}

.theme-links.list-type-keyword-thumb .theme-link-item {
    padding: 0;
    background: var(--theme-link-bg);
    border-radius: var(--theme-radius-md);
    color: var(--theme-link-text);
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    border: none;
    box-shadow: none;
    gap: 0;
    overflow: hidden;
    height: 70px;
    /* Smaller height */
    position: relative;
}

.theme-links.list-type-keyword-thumb .theme-link-item:hover {
    background: var(--theme-link-hover);
    transform: translateY(-1px);
    box-shadow: var(--theme-shadow-md);
}

.theme-links.list-type-keyword-thumb .link-thumb {
    width: 90px;
    /* Smaller width */
    height: 100%;
    flex-shrink: 0;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    border: none;
    box-sizing: border-box;
    /* Standard linear fade */
    -webkit-mask-image: linear-gradient(to right, black 65%, transparent 100%);
    mask-image: linear-gradient(to right, black 65%, transparent 100%);
}

.theme-links.list-type-keyword-thumb .link-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.theme-links.list-type-keyword-thumb .link-title {
    flex: 1;
    font-weight: 600;
    font-size: 16px;
    /* Smaller text */
    line-height: 1.4;
    color: var(--theme-link-text);
    padding: 0 0 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    z-index: 1;
    margin-left: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.theme-links.list-type-keyword-thumb .link-arrow {
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.25);
    color: inherit;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-right: 14px;
    flex-shrink: 0;
    z-index: 2;
}

/* Specific override for standard Keyword list (Text) */
.theme-links.list-type-keyword .link-title {
    font-size: 17px;
    font-weight: 600;
}

@media (max-width: 480px) {
    .theme-links.list-type-keyword-thumb .theme-link-item {
        height: 70px;
    }

    .theme-links.list-type-keyword-thumb .link-thumb {
        width: 90px;
    }

    .theme-links.list-type-keyword-thumb .link-title,
    .theme-links.list-type-keyword .link-title {
        font-size: 16px;
        margin-left: 10px;
    }
}

/* --- List Type: Image Grid (icon) - App Grid Style --- */
.theme-links.list-type-icon {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 0 4px;
}

.theme-links.list-type-icon .theme-link-item {
    display: block;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 18px;
    transition: transform 0.2s ease;
}

.theme-links.list-type-icon .theme-link-item:hover {
    transform: translateY(-2px);
    background: transparent;
    box-shadow: none;
}

.theme-links.list-type-icon .link-thumb {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 18px;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.theme-links.list-type-icon .theme-link-item:hover .link-thumb {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: scale(1.02);
}

.theme-links.list-type-icon .link-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.theme-links.list-type-icon .link-title,
.theme-links.list-type-icon .link-arrow {
    display: none;
}

@media (max-width: 480px) {
    .theme-links.list-type-icon {
        gap: 12px;
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- List Type: Full Thumbnail (full-image / full-thumb) - YouTube Style --- */
.theme-links.list-type-full-image,
.theme-links.list-type-full-thumb {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.theme-links.list-type-full-image .theme-link-item,
.theme-links.list-type-full-thumb .theme-link-item {
    display: flex;
    flex-direction: column;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease;
}

.theme-links.list-type-full-image .theme-link-item:hover,
.theme-links.list-type-full-thumb .theme-link-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.theme-links.list-type-full-image .link-thumb,
.theme-links.list-type-full-thumb .link-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    /* Dark bg for video feel */
}

.theme-links.list-type-full-image .link-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.theme-links.list-type-full-image .link-thumb picture {
    display: block;
    width: 100%;
    height: 100%;
}

.theme-links.list-type-full-image .theme-link-item:hover .link-thumb img,
.theme-links.list-type-full-thumb .theme-link-item:hover .link-thumb img {
    transform: scale(1.05);
}

/* Play Button */
.theme-links.list-type-full-image .play-button,
.theme-links.list-type-full-thumb .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 40px;
    background: rgba(33, 33, 33, 0.85);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    transition: all 0.2s ease;
    z-index: 10;
    backdrop-filter: blur(2px);
}

.theme-links.list-type-full-image .theme-link-item.is-youtube:hover .play-button,
.theme-links.list-type-full-thumb .theme-link-item.is-youtube:hover .play-button {
    background: #ff0000;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Title Overlay (Non-YouTube) */
.theme-links.list-type-full-image .thumb-title-overlay,
.theme-links.list-type-full-thumb .thumb-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 16px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 40%, transparent 100%);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* Standard Title (YouTube - Below Image) */
.theme-links.list-type-full-image .link-title,
.theme-links.list-type-full-thumb .link-title {
    padding: 12px 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--theme-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.theme-links.list-type-full-image .link-arrow {
    display: none;
}


/* Footer */
.theme-footer {
    text-align: center;
    padding: var(--theme-spacing-xl) 0;
    color: var(--theme-text-muted);
    font-size: var(--theme-font-size-sm);
    margin-top: var(--theme-spacing-xl);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--theme-text-secondary);
    text-decoration: none;
    font-size: var(--theme-font-size-sm);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--theme-text);
}

/* Responsive */
@media (max-width: 768px) {
    .theme-container {
        padding: var(--theme-spacing-md) var(--theme-spacing-sm);
    }

    .theme-title {
        font-size: var(--theme-font-size-xl);
    }
}

/* ===== Ad Traffic Read More Feature ===== */
.theme-description-wrapper {
    position: relative;
}

.theme-description-wrapper.truncated .theme-description {
    max-height: 150px;
    overflow: hidden;
    position: relative;
}

.theme-description-wrapper.truncated .theme-description::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
    pointer-events: none;
}

.read-more-btn {
    display: none;
    width: 100%;
    text-align: center;
    padding: 12px 24px;
    margin: 8px 0 16px 0;
    background: transparent;
    border: none;
    color: var(--theme-secondary);
    font-weight: 500;
    font-size: var(--theme-font-size-lg);
    cursor: pointer;
    transition: all 0.2s ease;
}

.read-more-btn:hover {
    color: var(--theme-primary-dark);
}

.theme-description-wrapper.truncated .read-more-btn {
    display: block;
}

.theme-description-wrapper.truncated .home-more-ad {
    display: none;
}

.theme-description-wrapper.expanded .theme-description {
    max-height: none;
    overflow: visible;
}

.theme-description-wrapper.expanded .theme-description::after {
    display: none;
}

.theme-description-wrapper.expanded .read-more-btn {
    display: none;
}

/* --- Post Detail View --- */
.theme-post-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.post-detail-thumb {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.post-detail-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.post-detail-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--theme-text);
}

.post-detail-content p {
    margin-bottom: 1.5em;
}

.post-detail-cta {
    margin-top: 16px;
    text-align: center;
}

.theme-btn-primary {
    display: inline-block;
    padding: 14px 32px;
    background: var(--theme-link-bg);
    color: #fff;
    font-weight: 600;
    font-size: 1.125rem;
    border-radius: 50px;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 180, 216, 0.3);
}

.theme-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 180, 216, 0.4);
    color: #fff;
}

.post-back-link {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--theme-border);
}

.post-back-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--theme-text-muted);
    font-weight: 500;
    transition: color 0.2s ease;
}


/* --- Post Detail Gallery (Swiper) --- */
.post-detail-gallery {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.gallery-img-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f0f0f0;
}

.gallery-img-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    max-height: 600px;
}

/* Swiper Pagination (Animated Bullets) */
.swiper-pagination {
    bottom: 20px !important;
    z-index: 100 !important;
}

.swiper-pagination-bullet {
    width: 14px !important;
    height: 14px !important;
    background: rgba(0, 0, 0, 0.5) !important;
    opacity: 1 !important;
    border-radius: 50% !important;
    transition: width 0.3s ease, background 0.3s ease !important;
    margin: 0 5px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.swiper-pagination-bullet-active {
    width: 50px !important;
    border-radius: 7px !important;
    background: rgba(0, 0, 0, 0.5) !important;
    /* Transparent Black Track */
    position: relative;
    overflow: hidden;
}

.swiper-pagination-bullet-active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.8) !important;
    /* Transparent White Progress */
    border-radius: 5px;
    animation: swiper-progress 5s linear forwards;
}

@keyframes swiper-progress {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

/* Share Modal Styles */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.share-modal-overlay.active {
    opacity: 1;
}

.share-modal-content {
    background: var(--theme-bg);
    width: 90%;
    max-width: 400px;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.share-modal-overlay.active .share-modal-content {
    transform: translateY(0);
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.share-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.close-share-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--theme-text-secondary);
    padding: 0;
    line-height: 1;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.share-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    background: var(--theme-surface);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--theme-text);
}

.share-option-btn:hover {
    background: var(--theme-surface-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.share-option-btn i {
    font-size: 1.5rem;
}

.share-option-btn.whatsapp i {
    color: #25D366;
}

.share-option-btn.facebook i {
    color: #1877F2;
}

.share-option-btn.twitter i {
    color: #000000;
}

/* X logo usually black */
.share-option-btn.copy-link i {
    color: var(--theme-text-secondary);
}

/* Mobile Bottom Sheet Style */
@media (max-width: 768px) {
    .share-modal-overlay {
        align-items: flex-end;
    }

    .share-modal-content {
        width: 100%;
        max-width: 100%;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        transform: translateY(100%);
    }

    .share-modal-overlay.active .share-modal-content {
        transform: translateY(0);
    }
}