﻿.tt-banner-top {
    margin: 20px 0;
    padding: 0;
}

/* Grid layout for banners */
.tt-banner-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.tt-banner-item {
    border-radius: 8px;
    overflow: hidden;
    background: var(--tt-bg-secondary, #2a2a2a);
}

    /* Center single banner */
    .tt-banner-item:only-child {
        grid-column: 1 / -1;
        justify-self: center;
        max-width: 600px;
    }

    /* Center last item if it's alone in its row (odd total count) */
    .tt-banner-item:nth-child(odd):last-child {
        grid-column: 1 / -1;
        justify-self: center;
        max-width: 600px;
    }

.tt-banner-link,
.tt-banner-static {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.tt-banner-image {
    width: auto;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.tt-banner-link:hover .tt-banner-image {
    transform: scale(1.02);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tt-banner-top {
        margin: 15px 0;
    }

    .tt-banner-grid {
        gap: 2px;
    }
}

@media (max-width: 480px) {
    .tt-banner-top {
        margin: 10px 0;
    }

    .tt-banner-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

/* Catfish Banner (Sticky Bottom) */
.tt-banner-catfish {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.85);
    padding: 8px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.tt-banner-catfish-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

.tt-banner-catfish-item {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
    background: var(--tt-bg-secondary, rgba(42, 42, 42, 0.8));
}

    /* Center single catfish banner */
    .tt-banner-catfish-item:only-child {
        grid-column: 1 / -1;
        justify-self: center;
        max-width: 600px;
    }

    /* Center last item if it's alone in its row (odd total count) */
    .tt-banner-catfish-item:nth-child(odd):last-child {
        grid-column: 1 / -1;
        justify-self: center;
        max-width: 600px;
    }

.tt-banner-catfish-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    transition: background 0.3s ease;
    z-index: 1000;
}

.tt-banner-catfish-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.tt-banner-catfish .tt-banner-image {
    max-height: 80px;
}

/* Responsive adjustments for catfish */
@media (max-width: 768px) {
    .tt-banner-catfish {
        padding: 8px;
    }

    .tt-banner-catfish-content {
        gap: 10px;
        padding: 0 5px;
    }

    .tt-banner-catfish .tt-banner-image {
        max-height: 60px;
    }

    .tt-banner-catfish-close {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .tt-banner-catfish {
        padding: 4px;
    }

    .tt-banner-catfish-content {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 0;
    }

    .tt-banner-catfish .tt-banner-image {
        max-height: 50px;
    }

    .tt-banner-catfish-close {
        width: 20px;
        height: 20px;
        top: 3px;
        right: 3px;
    }

    .tt-banner-catfish-close svg {
        width: 12px;
        height: 12px;
    }
}

/*banner popup*/
.banner-preload {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(3px);
}

.banner-preload-container {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popupZoom 0.3s ease-out;
}

@keyframes popupZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.banner-preload-container a {
    display: block;
    line-height: 0;
}

.banner-preload-container img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.banner-preload-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
    transition: all 0.3s ease;
    z-index: 10001;
    font-size: 20px;
}

.banner-preload-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: rotate(90deg) scale(1.1);
}

.banner-preload.fade-out {
    opacity: 0;
}

/* Responsive adjustments for popup */
@media (max-width: 768px) {
    .banner-preload-container {
        max-width: 95%;
        max-height: 85vh;
    }

    .banner-preload-container img {
        max-height: 85vh;
        border-radius: 6px;
    }

    .banner-preload-close {
        top: -10px;
        right: -10px;
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .banner-preload-container {
        max-width: 95%;
        max-height: 80vh;
    }

    .banner-preload-container img {
        max-height: 80vh;
        border-radius: 4px;
    }

    .banner-preload-close {
        top: -8px;
        right: -8px;
        width: 28px;
        height: 28px;
        font-size: 16px;
        border-width: 1px;
    }
}