/* Iframe Components Styles */

/* Container Styles */
.custom-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    width: 99.5%;
    max-width: 2000px;
    margin: 0 auto;
    padding: 0 2px;
}

/* Iframe Wrapper Styles */
.custom-iframe-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

/* Iframe Box Styles */
.custom-iframe-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid #F0F8FF;
    background-color: #F0F8FF;
    box-shadow: 0 4px 12px #F0F8FF;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.custom-iframe-box.fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    aspect-ratio: unset !important;
    border-radius: 0 !important;
    background-color: #000 !important;
    overflow: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    max-width: none !important;
    max-height: none !important;
}

.custom-iframe-box.fullscreen .custom-iframe {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    overflow: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

.custom-iframe-box.fullscreen .custom-poster-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

.custom-iframe-box:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.custom-iframe-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

.custom-iframe {
    width: 100%;
    height: 100%;
    display: none;
    border: none;
    pointer-events: auto;
}

/* Info Box Styles */
.custom-info-box {
    display: flex;
    flex-direction: column;
    padding: 6px;
    background-color: #000000;
    border-radius: 6px;
    border: 1px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    max-width: 280px;
    margin: 0 auto;
    width: 100%;
    font-size: 11px;
}

.custom-top-section {
    background-color: #ffffff;
    color: #000000;
    padding: 6px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 11px;
    border: 1px solid #000000;
}

.custom-top-section .custom-info {
    color: #ffffff;
}

.custom-top-section .custom-views {
    color: #ffffff;
    background-color: #000000;
    padding: 2px 6px;
    border-radius: 4px;
}

.custom-top-section .custom-icons {
    color: #ffffff;
}

.custom-top-section .custom-like-count {
    color: #ffffff;
    background-color: #000000;
    padding: 2px 6px;
    border-radius: 4px;
}

.custom-info {
    display: flex;
    flex-direction: column;
}

.custom-views {
    font-size: 11px;
}

.custom-icons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.custom-icon {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.custom-heart {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s ease;
    position: relative;
}

.custom-heart:hover {
    transform: scale(1.1);
}

.custom-heart-icon {
    color: #666;
    font-size: 18px;
    transition: all 0.3s ease;
}

.custom-heart.liked .custom-heart-icon {
    color: #ff4757;
    animation: heartBeat 0.3s ease-in-out;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.custom-like-count {
    color: #666;
    font-size: 11px;
    margin-left: 5px;
    transition: color 0.3s ease;
}

.custom-heart.liked + .custom-like-count {
    color: #ff4757;
}

.custom-bottom-section {
    background-color: #000000;
    color: #ffffff;
    padding: 6px 8px;
    text-align: center;
    font-size: 11px;
    border-top: 1px solid #ffffff;
    overflow: hidden;
    position: relative;
}

.custom-bottom-section p {
    margin: 4px 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    word-break: break-word;
    max-height: 5.6em;
    color: #ffffff;
    transition: font-size 0.3s ease;
}

.custom-bottom-section b {
    font-size: 12px;
    color: #ffffff;
}

/* Button Group Styles */
.custom-button-group {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-top: 6px;
    justify-content: space-between;
    width: 100%;
}

/* View More Button Styles */
.custom-view-more-btn {
    background-color: #000;
    color: #fff;
    padding: 6px 12px;
    border: 1px solid #ffffff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    flex: 1;
    white-space: nowrap;
    text-align: center;
}

.custom-view-more-btn:hover {
    background-color: #333;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Open Iframe Button Styles */
.custom-open-iframe-btn {
    background-color: #000000;
    color: #ffffff;
    padding: 6px 12px;
    border: 1px solid #ffffff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    white-space: nowrap;
}

.custom-open-iframe-btn:hover {
    background-color: #ffffff;
    color: #000000;
}

.custom-open-iframe-btn i {
    font-size: 14px;
}

/* Remove Fullscreen Button Styles */
.custom-fullscreen-btn {
    display: none;
}

/* Add Customize Button Styles */
.custom-customize-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-customize-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.custom-customize-btn i {
    font-size: 16px;
}

/* Exit Fullscreen Button Styles */
.custom-exit-fullscreen-btn {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background-image: url('../images/pbdq.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 50px;
    height: 50px;
    border: none;
    cursor: pointer;
    z-index: 10000;
    transition: transform 0.3s ease;
}

.custom-exit-fullscreen-btn:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Floating Button Styles */
.custom-floating-btn {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background-image: url('../images/pbdq.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 50px;
    height: 50px;
    border: none;
    cursor: pointer;
    z-index: 10000;
    transition: transform 0.3s ease;
}

.custom-floating-btn:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Responsive Design */
@media (min-width: 2560px) {
    .custom-iframe-box {
        width: 1000px;
        height: 560px;
    }

    .custom-info-box {
        max-width: 400px;
        padding: 12px;
        font-size: 14px;
        background-color: #000000;
        color: #ffffff;
        border: 1px solid #ffffff;
    }

    .custom-top-section {
        padding: 8px 10px;
        margin-bottom: 10px;
        font-size: 14px;
        background-color: #ffffff;
        color: #000000;
        border: 1px solid #000000;
    }
    
    .custom-views {
        font-size: 14px;
        color: #ffffff;
        background-color: #000000;
    }
    
    .custom-heart-icon {
        font-size: 20px;
        color: #000000;
    }
    
    .custom-like-count {
        font-size: 14px;
        color: #ffffff;
        background-color: #000000;
    }
    
    .custom-bottom-section {
        padding: 8px 10px;
        font-size: 14px;
        background-color: #000000;
        color: #ffffff;
        border-top: 1px solid #ffffff;
    }
    
    .custom-bottom-section b {
        font-size: 16px;
        color: #ffffff;
    }
    
    .custom-button-group {
        gap: 10px;
    }
    
    .custom-view-more-btn,
    .custom-open-iframe-btn {
        font-size: 12px;
        padding: 8px 16px;
        background-color: #000000;
        color: #ffffff;
        border: 1px solid #ffffff;
    }
    
    .custom-open-iframe-btn i {
        font-size: 16px;
        color: #ffffff;
    }

    .custom-view-more-btn:hover,
    .custom-open-iframe-btn:hover {
        background-color: #ffffff;
        color: #000000;
    }
}

@media (min-width: 1440px) and (max-width: 2559px) {
    .custom-iframe-box {
        width: 600px;
        height: 340px;
    }
}

@media (min-width: 1025px) and (max-width: 1439px) {
    .custom-iframe-box {
        width: 500px;
        height: 280px;
    }
}

@media (max-width: 1024px) {
    .custom-container {
        gap: 10px;
        width: 99%;
        padding: 0 1px;
    }
    
    .custom-info-box {
        max-width: 220px;
        padding: 6px;
        font-size: 9px;
        background-color: #000000;
        border: 1px solid #ffffff;
    }

    .custom-iframe-box {
        width: 440px;
        height: 240px;
    }
    
    .custom-top-section {
        padding: 5px 7px;
        margin-bottom: 6px;
        font-size: 9px;
        background-color: #ffffff;
        color: #000000;
        border: 1px solid #000000;
    }
    
    .custom-views {
        font-size: 9px;
        color: #ffffff;
        background-color: #000000;
    }
    
    .custom-heart-icon {
        font-size: 14px;
        color: #000000;
    }
    
    .custom-like-count {
        font-size: 9px;
        color: #ffffff;
        background-color: #000000;
    }
    
    .custom-bottom-section {
        padding: 5px 7px;
        font-size: 9px;
        background-color: #000000;
        color: #ffffff;
        border-top: 1px solid #ffffff;
    }
    
    .custom-bottom-section b {
        font-size: 10px;
    }
    
    .custom-button-group {
        flex-direction: row;
        gap: 6px;
    }
    
    .custom-view-more-btn,
    .custom-open-iframe-btn {
        font-size: 8px;
        padding: 4px 8px;
    }
    
    .custom-open-iframe-btn i {
        font-size: 10px;
    }
    
    .custom-bottom-section p {
        -webkit-line-clamp: 3;
        max-height: 4.2em;
        line-height: 1.3;
    }
}

@media (max-width: 768px) {
    .custom-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        width: 100%;
        padding: 8px;
    }

    .custom-info-box {
        max-width: 100%;
        width: 100%;
        padding: 6px;
        font-size: 10px;
        background-color: #000000;
        border: 1px solid #ffffff;
    }

    .custom-iframe-box {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }

    .custom-top-section {
        font-size: 10px;
        padding: 4px 6px;
        margin-bottom: 4px;
        background-color: #ffffff;
        color: #000000;
        border: 1px solid #000000;
    }
    
    .custom-views {
        font-size: 10px;
        color: #ffffff;
        background-color: #000000;
    }
    
    .custom-heart-icon {
        font-size: 14px;
        color: #000000;
    }
    
    .custom-like-count {
        font-size: 10px;
        color: #ffffff;
        background-color: #000000;
    }

    .custom-bottom-section {
        padding: 4px 6px;
        font-size: 10px;
        background-color: #000000;
        color: #ffffff;
        border-top: 1px solid #ffffff;
    }
    
    .custom-bottom-section b {
        font-size: 11px;
    }
    
    .custom-button-group {
        flex-direction: row;
        gap: 6px;
        justify-content: center;
    }
    
    .custom-view-more-btn,
    .custom-open-iframe-btn {
        font-size: 8px;
        padding: 4px 8px;
    }
    
    .custom-open-iframe-btn i {
        font-size: 12px;
    }
    
    .custom-customize-btn {
        width: 25px;
        height: 25px;
        top: 8px;
        right: 8px;
    }
    
    .custom-customize-btn i {
        font-size: 14px;
    }
    
    .custom-bottom-section p {
        -webkit-line-clamp: 3;
        max-height: 3.9em;
        line-height: 1.3;
    }

    .custom-iframe-box.fullscreen {
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        max-height: none !important;
    }
}

@media (max-width: 480px) {
    .custom-container {
        gap: 6px;
        padding: 6px;
    }
    
    .custom-iframe-box {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        max-width: 190px;
    }
    
    .custom-info-box {
        padding: 4px;
        font-size: 8px;
        max-width: 160px;
        background-color: #000000;
        border: 1px solid #ffffff;
    }
    
    .custom-bottom-section {
        font-size: 8px;
        padding: 4px 5px;
        background-color: #000000;
        color: #ffffff;
        border-top: 1px solid #ffffff;
    }
    
    .custom-button-group {
        gap: 4px;
    }
    
    .custom-view-more-btn,
    .custom-open-iframe-btn {
        font-size: 7px;
        padding: 2px 5px;
    }
    
    .custom-open-iframe-btn i {
        font-size: 9px;
    }
    
    .custom-top-section {
        font-size: 8px;
        padding: 4px 5px;
        background-color: #ffffff;
        color: #000000;
        border: 1px solid #000000;
    }
    
    .custom-heart-icon {
        font-size: 11px;
        color: #000000;
    }
    
    .custom-views {
        font-size: 8px;
        color: #ffffff;
        background-color: #000000;
    }
    
    .custom-like-count {
        font-size: 8px;
        color: #ffffff;
        background-color: #000000;
    }
    
    .custom-bottom-section b {
        font-size: 9px;
    }
    
    .custom-bottom-section p {
        -webkit-line-clamp: 3;
        max-height: 3.6em;
        line-height: 1.2;
    }

    .custom-customize-btn {
        width: 20px;
        height: 20px;
        top: 5px;
        right: 5px;
    }
    
    .custom-customize-btn i {
        font-size: 11px;
    }

    .custom-iframe-box.fullscreen {
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        max-height: none !important;
    }
}

@media (max-width: 375px) {
    .custom-container {
        gap: 4px;
        padding: 4px;
    }
    
    .custom-iframe-box {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        max-width: 140px;
    }
    
    .custom-info-box {
        padding: 2px;
        font-size: 7px;
        max-width: 140px;
        background-color: #000000;
        border: 1px solid #ffffff;
    }
    
    .custom-bottom-section {
        font-size: 7px;
        padding: 2px 3px;
        background-color: #000000;
        color: #ffffff;
        border-top: 1px solid #ffffff;
    }
    
    .custom-button-group {
        gap: 2px;
    }
    
    .custom-view-more-btn,
    .custom-open-iframe-btn {
        font-size: 6px;
        padding: 1px 4px;
    }
    
    .custom-open-iframe-btn i {
        font-size: 8px;
    }
    
    .custom-top-section {
        font-size: 7px;
        padding: 2px 3px;
        background-color: #ffffff;
        color: #000000;
        border: 1px solid #000000;
    }
    
    .custom-heart-icon {
        font-size: 10px;
        color: #000000;
    }
    
    .custom-views {
        font-size: 7px;
        color: #ffffff;
        background-color: #000000;
    }
    
    .custom-like-count {
        font-size: 7px;
        color: #ffffff;
        background-color: #000000;
    }
    
    .custom-bottom-section b {
        font-size: 8px;
    }
    
    .custom-bottom-section p {
        -webkit-line-clamp: 3;
        max-height: 3.3em;
        line-height: 1.1;
    }

    .custom-customize-btn {
        width: 18px;
        height: 18px;
        top: 4px;
        right: 4px;
    }
    
    .custom-customize-btn i {
        font-size: 10px;
    }

    .custom-iframe-box.fullscreen {
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        max-height: none !important;
    }
}

/* Body Styles for Fullscreen Mode */
body.iframe-fullscreen {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

/* Text size classes */
.text-small {
    font-size: 9px !important;
}

.text-medium {
    font-size: 11px !important;
}

.text-large {
    font-size: 13px !important;
}

/* Text size control button */
.text-size-control {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.text-size-control:hover {
    background: rgba(255, 255, 255, 0.2);
} 