.newtab { width: -moz-available;  width: -webkit-fill-available;}
body {background-color: #2a2a2a;color: #ccc; font-family: 'Inter', sans-serif; font-size: 11px; margin-top: 0px;}
p {max-width: 100%; text-align: left;}

*, *::before, *::after {
    box-sizing: border-box;
}

#search-result-navbar {
    width: 100%;
    max-width: 704px;
    background-color: #444444;
    color: #c4c4c4;
    padding: 5px;
    position: relative;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
    border-radius: 5px 5px 0px 0px;
    border-top: 1px solid #666;
    border-left: 1px solid #666;
    border-right: 1px solid #666;
}

#sort-navbar {
    width: 100%;
    max-width: 704px;
    background-color: #444444;
    color: #c4c4c4;
    padding: 5px;
    position: relative;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0 auto;
    border-radius: 5px 5px 0px 0px;
    border-top: 1px solid #666;
    border-left: 1px solid #666;
    border-right: 1px solid #666;
    margin-top: 5px;
}

.home-icon {
    margin-right: 10px;
    margin-left: 2px;
    color: #c4c4c4;
    text-decoration: none;
}


@media (min-width: 769px) {
    .newtab { max-width:704px; margin: auto;}

    .centered-content {
        width: 704px;
        margin: 0 auto;
    }
    .prompt-container {
        max-height: 75px;
    }

    #search-result-navbar, #sort-navbar {
        font-size: 13px;
    }

    .home-icon {
    margin-right: 5px;
}
}

@media (max-width: 768px) {
    
    #search-result-navbar, #sort-navbar {
        font-size: 12px; /* Reduced from 30px */
        width: 100%; /* Full width on mobile */
        max-width: 100%;
        border-radius: 10px 10px 0px 0px;
    }

    .turnstile {
        width: 100%;
        max-width: 0px;
    }
}

.turnstile {
    display: inline-table;
    width: 100%;
    margin-top: 5px;
    margin-bottom: 1px;
}


/* Flex container setup to align items */
.voting-container {
    display: flex;
    align-items: center; /* Align items vertically */
    max-width: 704px; /* Maximum width on desktop */
    flex-wrap: nowrap; /* Prevent wrapping of items */
    margin-left: 0; /* Align container to the left on desktop */
    margin-top: 5px;
}

/* Style for the score box */
.score {
    border: 3px solid #6c6c6c;
    border-radius: 3px;
    padding: 5px 10px;
    margin-right: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    color: #ffffff;
    background-color: #424242;
    font-weight: bold;
}

/* Style for the downvote button */
.downvoteButton {
    width: 70px;
    background-color: #562d2d;
    border: 2px solid #873939;
    border-radius: 3px;
    color: #c4c4c4;
    margin-right: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;

}

/* Style for the upvote button */
.upvoteButton {
    flex-grow: 1;
    background-color: #3a643a;
    border: 2px solid #549c54;
    border-radius: 3px;
    color: #c4c4c4;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;

}

.downvoted {
    background-color: #873939
    }
    
    .upvoted {
    background-color: #549c54;
    }
    

/* Style for the flag button */
.flagButton {
    width: 40px;
    background-color: #333;
    border: 2px solid #777;
    border-radius: 3px;
    color: #c4c4c4;
    margin-right: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
}

.flagged {
    background-color: #ab402d;
}

@media (min-width: 768px) {
    .prompt-container {
        font-size: 0.5rem!important;
        max-height: 75px;
    }
}

/* Media query for screens that are 1000px wide or less (mobile devices) */
@media (max-width: 768px) {
    .voting-container {
        max-width: none;
        width: 100%;
        margin-top: 0px; /* Give a little space */
        padding-left: 3px;
        padding-right: 3px;
    }
    .upvoteButton {
        font-size: 13px; /* Reduced */
        height: 30px;    /* Reduced */
        margin-top: 3px !important;
        border: 1px solid #549c54;
    }
    .downvoteButton {
        font-size: 13px; /* Reduced */
        height: 30px;    /* Reduced */
        width: 70px;     /* Adjusted */
        margin-right: 5px;
        margin-top: 3px !important;
        border: 1px solid #873939;
    }
    .score {
        font-size: 13px; /* Reduced */
        height: 30px;    /* Reduced */
        width: auto;     /* Allow content to size it */
        padding: 5px 10px;
        margin-top: 3px !important;
        margin-right: 5px;
        border: 1px solid #6c6c6c;
    }
    .flagButton {
        font-size: 13px; /* Reduced */
        height: 30px;    /* Reduced */
        width: 40px;    /* Adjusted */
        margin-right: 5px;
        margin-top: 3px !important;
        border: 1px solid #777;
    }

    .favoriteButton {
        font-size: 13px; /* Reduced */
        height: 30px!important;    /* Reduced */
        width: 30px;    /* Adjusted */
        margin-top: 3px !important;
    }

    .prompt-container {
        font-size: 0.5rem!important;
        max-height: 75px;
    }
    .expand-button {
        font-size: 30px;
        margin-top: -25px!important;
        border-radius:10px!important;
    }
    .generate-button {
        font-size: 30px;
        margin-top: -25px!important;
        border-radius:10px!important;
    }
    .infop {
        margin-right:8px!important;
        margin-bottom:3px!important;
    }
    .infopneg {
        margin-right:8px!important;
        margin-bottom:3px!important;
        margin-top:10px!important;
    }
    .taptovoteinfo {
        margin-top: 48px!important;
        font-size: 20px!important;

    }
    .modal-content {
        width: 95%!important;
        padding: 30px!important;
        max-width: 95%!important;
        margin: 10px auto!important;
    }

    .modal-content h2 {
        font-size: 16px!important;
    }

    .modal-content p {
        font-size: 13px!important;
        margin-bottom: 10px !important;
    }

    #flagDescription {
        height: 80px!important;
        font-size: 13px!important;
    }

    .modal-buttons button {
        padding: 8px 16px!important;
        font-size: 13px !important;
    }



    .info-container {
        padding: 3px !important;
        font-size: 0.9em !important;  /* Significantly reduced base font size */
        margin: 10px 0px 0px 0px !important;
        max-width: 100%!important;
    }


    .user-info {
        font-size: 1.2em!important;
    }

    .username {
        font-size: 1.2em!important;
        font-weight: bold!important;
    }

    .user-badge {
        padding: 3px 5px !important;
        font-size: 0.5rem !important;
        margin-left: 0px !important;
    }

    .stats-info {
        font-size: 0.55rem!important;
        gap: 10px!important;
    }

    .stat-item {
        gap: 2px!important;
    }

    .details-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .detail-item {
        gap: 6px!important;
    }

    .detail-label {
        font-size: 1em!important;
    }

    .prompt-box {
        padding: 8px!important;
        margin-top: 18px!important;
    }

    .prompt-header {
        top: -17px!important;
        left: 3px!important;
        padding: 5px 12px!important;
        font-size: 1em!important;
    }

    .infop, .infopn {
        font-size: 1.1em!important;
        line-height: 1.5!important;
    }

    .action-buttons {
        gap: 12px !important;
        margin-top: 10px !important;
        font-size: 0.9em !important;
    }

    .expand-button, .generate-button {
        width: 100%!important;
        padding: 7px 0px!important;
        font-size: 0.9em!important;
        justify-content: center!important;
        border-radius: 8px!important;
    }

    .expand-button i, .generate-button i {
        font-size: 1.1em!important;
    }

    /* Adjust gradient fade for mobile */
    .prompt-container::after {
        height: 75px!important;
    }

    .user-avatar {
        width: 3em!important;
        height: 3em!important;
    }
    
    .user-avatar i {
        font-size: 1.8em;
    }

    .user-info a {
        flex-wrap: wrap;
        gap: 5px !important;
    }
    
    .badges-container {
        justify-content: flex-start;
        margin-left: 0.2rem !important;
    }
    
    .image-count {
        font-size: 0.5rem !important;
    }

    .prompt-section {
        gap: 15px!important;
    }

}

@keyframes flip {
    0% {
        transform: rotateX(0deg);
        text-shadow: none;
    }
    50% {
        transform: rotateX(180deg);
        text-shadow: 0 0 2px #7d9b6c, 0 0 2px #7d9b6c, 0 0 2px #7d9b6c, 0 0 2px #7d9b6c;
    }

    100% {
        transform: rotateX(360deg);
        text-shadow: none;
    }
}

.flip {
    display: flex;
    transition: transform 1s ease-in-out;
    animation: flip 1s;
}

.flip.flip {
    transform: rotateX(360deg);
}


.comment-form {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    margin-top: 5px;
}


.comment-form-actions {
display: flex;
justify-content: flex-end;
align-items: center;
margin-top: 10px;
}

.tenor-button {
background: none;
border: none;
cursor: pointer;
margin-right: 10px;
}

.tenor-search {
margin-top: 5px;
}

.tenor-results {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
gap: 10px;
margin-top: 10px;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.comments-header h3 {
    margin: 0;
    font-size: 16px;
    color: #fff;
    align-self: end;
}

.comment-form textarea {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #555;
    border-radius: 4px 0 0 4px;
    background-color: #3c3c3c;
    color: #fff;
    font-size: 14px;
    resize: vertical;
    min-height: 36px;
    height: 36px;
    width: 100%;
    overflow-y: hidden; /* Hide scrollbar */
}

.comment-form button {
    border: none;
    background-color: #555;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    padding: 5px 15px;
    height: 36px;
    margin-right: 1px;
    border-radius: 2px 2px 2px 2px;
}

.comment-form button:hover {
    background-color: #45a049;
}

.sort-options {
    display: flex;
    gap: 10px;
}

.sort-button {
    background-color: #555;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.sort-button:hover {
    background-color: #777;
}

.sort-button:active {
    background-color: #666;
}

.sort-button.active {
    background-color: #555555;
}

.sort-options button {
    margin-left: 10px;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    background-color: #333;
    color: #ccc;
    cursor: pointer;
}

.comment {
    padding: 5px 2px 0px 5px;
    border-bottom: 2px solid #444;
    margin-boottom: 5px;
    
}

.comment .comment-votes {
    display: flex;
    align-items: center;
}

.comment .replies {
    border-left: 2px solid #444;
}

.comment .comment-votes button {
    margin-right: 0px;
    padding: 5px;
    border: none;
    border-radius: 5px;
    background-color: #333;
    color: #ccc;
    cursor: pointer;
}

.comment .comment-votes .upvoted {
    background-color: #549c54;
}

.comment .comment-votes .downvoted {
    background-color: #873939;
}

.comment .comment-reply {
    margin-top: 10px;
    padding-left: 20px;
    border-left: 2px solid #444;
    flex-wrap: wrap;
}

.comments-container .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

.comments-container .comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 3px;
    margin-left: -5px;
}

.comment-time {
    margin-left: 5px;
    font-size: 12px;
    color: #888;
}

.comment-content {
    display: flex;
    flex-direction: column;
}

.comment-text {
    margin-bottom: 10px;
}

.greentext {
    display: block;
    color: #789922;
}

.comment-actions {
flex-direction: row;
justify-content: flex-end;
align-items: center;
}

.comments-container .comment-votes {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.comments-container .comment-score {
    margin-right: 5px;
}

.comments-container .comment-votes button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.comments-container .comment-votes .upvoted {
    color: #4CAF50;
}

.comments-container .comment-votes .downvoted {
    color: #F44336;
}

.comments-container .show-reply-button {
    margin-left: auto;
}

.comments-container .comment-reply {
    margin-top: 10px;
}

.comments-container .comment-content p {
    margin: 0;
    padding-bottom: 0px;
    font-size: 14px;
}

.comment-count {
    font-weight: normal;
    margin-right: 5px;
}

.comment-reply {
    display: flex;
    align-items: stretch;
    margin-top: 10px;
    margin-bottom: 10px;
}

.comment-reply textarea {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #555;
    border-radius: 4px 0 0 4px;
    background-color: #444;
    color: #fff;
    font-size: 14px;
    resize: vertical;
    min-height: 36px;
    height: 36px;
    margin-right: 5px;
    overflow-y: hidden; /* Hide scrollbar */
}

.comment-reply button {
    padding: 8px 12px;
    border: none;
    background-color: #487e48;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    margin-right: 5px;
    height: 36px;
    border-radius: 2px 2px 2px 2px;
}

.comment-reply button:hover {
    background-color: #45a049;
}

.show-reply-button {
    background-color: rgba(0, 0, 0, 0.0);
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
    margin-left: 10px;
}

.show-reply-button:hover {
    background-color: #666;
}

    .comment-content {
display: flex;
flex-direction: column;
width: 100%;
}

.comment-text {
margin-bottom: 10px;
text-align: left;
width: 100%;
}


.comment-votes {
display: flex;
align-items: center;
}

.comment-vote-button {
background: none;
border: none;
cursor: pointer;
padding: 0 5px;
font-size: 14px;
color: #888;
}

.comment-score {
margin: 0 5px;
}

.show-reply-button {
margin-right: 0px;
background-color: rgba(0, 0, 0, 0.0);
color: #fff;
border: none;
padding: 6px 10px;
border-radius: 4px;
cursor: pointer;
font-size: 12px;
transition: background-color 0.3s;
}

.show-reply-button:hover {
background-color: #666;
}

.comment-header {
display: flex;
align-items: center;
width: 100%;
}

.comment-time {
margin-left: 5px;
font-size: 12px;
color: #888;
}

.continue-thread {
margin-top: 10px;
margin-left: 20px;
}

.continue-thread-button {
margin-left: 0px;
padding: 7px 10px;
border: none;
border-radius: 5px;
background-color: #555;
color: #fff;
cursor: pointer;
margin-top: 5px;
font-size: 14px;
font-weight: 700;
border: 1px solid #777;
margin-bottom: 10px;
transition: background-color 0.3s;
}

.continue-thread-button:hover {
background-color: #666;
}

.back-to-parent-button {
margin-bottom: 5px;
margin-left: 10px;
padding: 7px 10px;
border: none;
border-radius: 5px;
background-color: #444;
color: #fff;
cursor: pointer;
margin-top: 10px;
font-size: 14px;
font-weight: 700;
border: 1px solid #777;
transition: background-color 0.3s;
}

.show-more-replies {
margin-left: 20px;
padding: 7px 10px;
border: none;
border-radius: 5px;
background-color: #444;
color: #fff;
cursor: pointer;
margin-top: 5px;
font-size: 14px;
font-weight: 700;
border: 1px solid #777;
margin-bottom: 10px;
}

.back-to-parent-button:hover {
background-color: #666;
}

.comments-list .comment:nth-child(n+4) {
display: none;
}

.comments-list.expanded .comment:nth-child(n+4) {
display: block;
}

.show-more-comments.show-less {
margin-top: 10px;
}

.comment-gif {
max-height: 100px;
width: auto;
object-fit: contain;
align-self: baseline;
margin-top: 5px;
margin-bottom: 5px;
border-radius: 5px;
}


    .show-more-comments {
        margin-left: 10px;
        padding: 7px 10px;
        border: none;
        border-radius: 5px;
        background-color: #444;
        color: #fff;
        cursor: pointer;
        margin-top: 5px;
        font-size: 14px;
        font-weight: 700;
        border: 1px solid #777;
    }

                                            .gificon {
            background-color: #555;
            width: 28px;
            height: 23px;
    }

                                        .tenorsearch {
        width: 100%; 
        box-sizing: border-box; 
        height: 25px; 
        min-height: 30px; 
        padding: 8px; 
        flex-grow: 1; 
        padding: 10px; 
        border: 1px solid #555; 
        border-radius: 4px 0 0 4px; 
        background-color: #444; 
        color: #fff; 
        font-size: 14px; 
        resize: vertical;
         overflow-y: hidden;
}



.info-container {
    font-family: 'Inter', sans-serif;
    max-width: 704px;
    margin: 0 auto;
    padding: 10px 5px 5px 5px;
    background: #2a2a2a;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    margin-top: -5px;
}

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

.username {
    color: #ddd;
    font-weight: bold;
    font-size: 1.5em;
}

.stats-info {
    display: flex;
    gap: 15px;
    color: #888;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 8px;
    padding: 10px;
    background: #333;
    border-radius: 6px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    color: #888;
    font-size: 0.9em;
}

.detail-value {
    color: #ddd;
}

.prompt-section {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.prompt-box {
    background: #333;
    border-radius: 6px;
    overflow: visible; /* Changed from hidden to allow overlap */
    margin-bottom: 10px;
    padding: 12px;
    border: 1px solid #4a4a4a;
    position: relative; /* For positioning the header */
    margin-top: 12px; /* Make room for overlapping header */
}

.prompt-box.negative {
    margin-top: 20px;
}

.prompt-header {
    position: absolute;
    top: -12px;
    left: 8px;
    display: inline-block;
    padding: 4px 8px;
    color: #ddd;
    font-weight: bold;
    background: #2a2a2a;
    border-radius: 4px;
    border: 1px solid #4a4a4a;
    font-size: 0.9em;
    letter-spacing: 0.5px;
    z-index: 1; /* Ensure it stays above the container */
}

.prompt-box.negative .prompt-header {
    background: #2a2a2a;
}

.prompt-content {
    padding: 0;
}


.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 5px;
}

.infop, .infopn {
    display: block;
    margin: 0;
    padding: 0;
    color: #9b9b9b;
    font-size: 0.95em;
    line-height: 1.4;
}

.infop span, .infopn span {
    white-space: pre-line;
    display: inline-block;
    margin: 0;
    padding: 0;
}

.action-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.expand-btn {
    background: #444;
    color: #ddd;
}

.generate-btn {
    background: #3a3a2a;
    color: #8a8930;
    border: 1px solid #8a8930;
}

.action-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}



.header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #444;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.header-row p {
    margin: 0;
    padding: 4px 8px;
    background: #333;
    border-radius: 6px;
    border: 1px solid #4a4a4a;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.details-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #444;
}

.details-container .row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    margin: 0;
}

.details-container .row p {
    flex: 0 1 auto;
    font-size: 13px;
    padding: 4px 8px;
    background: #333;
    border-radius: 6px;
    border: 1px solid #4a4a4a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.details-container .row p strong {
    color: #888;
}

.details-container .row p span {
    color: #bbb;
}



.user-avatar {
    width: 4em;
    height: 4em;
    border-radius: 50%;
    overflow: hidden;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar img,
.user-avatar video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar i {
    font-size: 1.5em;
    color: #666;
}

.user-info a {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.image-count {
    font-size: 0.85em;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
}

.image-count i {
    font-size: 0.9em;
}

.badges-container {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}



.prompt-container {
    position: relative;
    overflow: hidden;
}

.prompt-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 75px;
    background: linear-gradient(to bottom, transparent, #2a2a2a);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.prompt-container.no-gradient::after {
    opacity: 0;
}

.prompt-content p {
    margin: 0;
    line-height: 1.5;
}

.prompt-content p + p {
    margin-top: 10px;
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.expand-button, .generate-button {
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    background-color: #333;
}

.expand-button {
    border: 1px solid #777;
    color: #9b9b9b;
}

.generate-button {
    border: 2px solid #8a8930;
    color: #8a8930;
}

.expand-button:hover, .generate-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.hidden {
    display: none !important;
}

.generate-button {
    background: #333;
    color: #8a8930;
    border: 2px solid #8a8930;
}

.generate-button:hover {
    background: #3a3a3a;
    transform: translateY(-1px);
}

.user-badge {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 6px;
    border-radius: 5px;
    font-size: 0.9em;
    border: 1px solid #555;
    vertical-align: middle;
}

.guest-badge {
    color: #888!important;
}

.member-badge {
    background-color: #444;
    color: #ddd!important;
}

.premium-badge {
    background: linear-gradient(45deg, #2a2a2a, #3a3a3a);
    color: #fff09d!important;
    border: 1px solid #666;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    position: relative;
}

/* Hover effects */
.premium-badge:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* Media query for screens that are 1000px wide or less (mobile devices) */
@media (max-width: 768px) {
    .tenor-results {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
gap: 20px;
margin-top: 20px;
}

    .show-more-comments {
        margin-left: 20px;
        padding: 15px 15px;
        border: none;
        border-radius: 5px;
        background-color: #444;
        color: #fff;
        cursor: pointer;
        margin-top: 10px;
        font-size: 30px;
        font-weight: 700;
        border: 1px solid #777;
        margin-bottom: 15px;
    }

    .sort-options button {
        font-size: 35px;
    }

    .comments-header {
    }
    
    .comments-header h3 {
        margin-bottom: 5px;
        margin-top: 10px;
        font-size: 30px;
    }
    
    .sort-options {
    }
    
    .sort-button {
        flex-grow: 1;
        text-align: center;
        font-size: 18px;
        padding: 10px 15px;
    }

    .comments-container {
        padding: 0px;
    }
    
    .comments-container .avatar {
        width: 32px;
        height: 32px;
        margin-left: 3px;
        margin-top: 0px;
    }
    
    .comments-container .comment-header {
        margin-bottom: 10px;
        font-size: 11px;
    }
    
    .comments-container .comment-content {
        flex-wrap: nowrap;
        align-items: center;
    }
    
    .comments-container .comment-votes {
        display: flex;
        align-items: center;
    }
    
    .comments-container .comment-votes button {
        font-size: 14px;
    }
    
    .comments-container .comment-score {
        font-size: 14px;
        margin-right: 5px;
    }
    
    .comments-container .comment-content p {
        font-size: 12px;
        margin-right: 30px!important;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .comments-container .show-reply-button {
        font-size: 12px;
        padding: 0px 0px;
        margin-right: 0px
    }
    
    .comments-container .comment-reply textarea {
        font-size: 11px;
        padding: 4px;
        width: 100%;
        margin-bottom: 0px;
        height: 40px;
    }
    
    .comments-container .comment-reply button {
        font-size: 12px;
        padding: 10px 8px;
        border-radius: 4px 4px 4px 4px;
    }
    .comment-form textarea {
        font-size: 11px;
        min-height: 40px;
    }

    .comment-form button {
        -shrink: 0;
        padding: 0px 20px;
        border-radius: 2px 2px 2px 2px;
        height: 40px;
        vertical-align: top;
        margin-right: 3px;
        margin-left: 5px;
        font-size: 12px;
    }
    .comment-reply textarea {
        font-size: 16px;
        min-height: 40px;
    }

    .comment-reply button {
        font-size: 16px;
        padding: 10px 15px;
    }

    .show-reply-button {
        margin-right: 20px;
        margin-bottom: 0;
    }
    
    .comment-form textarea,
    .comment-reply textarea {
        width: 100%;
        box-sizing: border-box;
        height: 40px;
        min-height: 40px;
        padding: 8px;
        font-size: 12px;
    }

    .comment-form button,
    .comment-reply button {
        height: 40px;
        font-size: 12px;
        vertical-align: top;
        padding: 6px 10px;
        border-radius: 2px 2px 2px 2px;
        background-color: #487e48;
    }

    .comment-actions {
        display: flex; 
        align-items: center;
        margin-left: 10px;
    }

    .show-reply-button {
        margin-right: 20px;
        margin-bottom: 0;
    }

    .comment-votes {
        display: flex;
        align-items: center;
    }

    .comment-text {
        text-align: left;
        width: 100%;
        transform: none !important;
        -webkit-text-size-adjust: 100% !important;
    }

    .comment-gif {
        max-height: 80px;
        width: auto;
        object-fit: contain;
        align-self: baseline;
        margin-top: 8px;
        margin-left: 25px;
        margin-bottom: 10px;
        border-radius: 5px;
    }

    .comment-time {
        font-size: 12px;
    }

    .continue-thread-button {
        margin-left: 20px;
        padding: 15px 15px;
        border: none;
        border-radius: 5px;
        background-color: #444;
        color: #fff;
        cursor: pointer;
        margin-top: 10px;
        font-size: 30px;
        font-weight: 700;
        border: 1px solid #777;
        margin-bottom: 15px;
    }

    .back-to-parent-button {
        margin-bottom: 5px;
        margin-left: 10px;
        padding: 7px 10px;
        border: none;
        border-radius: 5px;
        background-color: #444;
        color: #fff;
        cursor: pointer;
        margin-top: 10px;
        font-size: 14px;
        font-weight: 700;
        border: 1px solid #777;
        transition: background-color 0.3s;
    }

        .show-more-replies {
            margin-left: 20px;
            padding: 15px 15px;
            border: none;
            border-radius: 5px;
            background-color: #444;
            color: #fff;
            cursor: pointer;
            margin-top: 10px;
            font-size: 30px;
            font-weight: 700;
            border: 1px solid #777;
            margin-bottom: 15px;
}

        .gificon {
            background-color: #555;
            width: 25px;
            height: 20px;
    }

    .comment-form {
        margin-top: 0px !important;
        margin-bottom: 0px !important;
}

.tenorsearch {
    width: 100%;
    box-sizing: border-box;
    height: 40px;
    min-height: 40px;
    flex-grow: 1;
    padding: 5px;
    border: 1px solid #555;
    border-radius: 4px 0 0 4px;
    background-color: #444;
    color: #fff;
    font-size: 12px;
    resize: vertical;
    overflow-y: hidden;
    margin-top: 5px;
    margin-left: 3px;
    margin-right: 3px;
}

.details-container {
    font-size: 25px;
    margin: 0px 5px 3px 5px;
}

.details-container .row p {
    padding: 2px 2px;
    margin: 2px 2px 4px -5px;
}

    
}





.plyr--video {
    width: 100%;
    height: auto;
}

.plyr__control--overlaid {
    display: none;
}

.plyr--paused .plyr__control--overlaid {
    display: block;
}


@media (max-width: 768px) {
    .plyr--video .plyr__controls {
        padding: 20px 10px 10px;
    }

    .plyr--video .plyr__control {
        padding: 12px;
    }

    .plyr--video .plyr__control svg {
        width: 18px;
        height: 18px;
    }

    .plyr--video .plyr__progress__container {
        height: 10px;
    }

    .plyr--video .plyr__progress input[type="range"],
    .plyr--video .plyr__progress__buffer {
        height: 10px;
    }

    .plyr--video .plyr__control--overlaid {
        padding: 20px;
    }

    .plyr--video .plyr__control--overlaid svg {
        width: 28px;
        height: 28px;
    }

    .plyr--video .plyr__control:hover {
        background: rgba(255, 255, 255, 0.3);
    }
}


.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    overflow: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #333;
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 500px;
    margin: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease-in-out;
}

.modal-content h2 {
    margin-top: 0;
    color: #f0f0f0;
    font-size: 24px;
    border-bottom: 2px solid #555;
    padding-bottom: 10px;
}

.modal-content p {
    color: #ccc;
    margin-bottom: 20px;
    font-size: 14px;
}

#flagDescription {
    width: 100%;
    height: 53px;
    resize: vertical;
    background-color: #444;
    border: 1px solid #555;
    border-radius: 5px;
    color: #fff;
    padding: 10px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

#flagDescription:focus {
    outline: none;
    border-color: #007bff;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.modal-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.modal-buttons button:hover {
    transform: translateY(-2px);
}

.modal-buttons button:active {
    transform: translateY(0);
}

.btn-cancel {
    background-color: #555;
    color: #fff;
    margin-right: 10px;
}

.btn-cancel:hover {
    background-color: #666;
}

.btn-confirm {
    background-color: #007bff;
    color: #fff;
}

.btn-confirm:hover {
    background-color: #0056b3;
}

/* Animation for modal appearance */
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.modal-content {
    animation: modalFadeIn 0.3s ease-out forwards;
}

.unmute-button-overlay {
    position: absolute;
    top: 10px; /* Adjusted for a bit more space from the edge */
    right: 10px; /* Adjusted for a bit more space from the edge */
    z-index: 20;
    background-color: rgba(0, 0, 0, 0.7); /* Slightly darker background for more contrast */
    color: #ffffff; /* White icon */
    border-radius: 50%;
    width: 48px!important; /* Increased size */
    height: 48px!important; /* Increased size */
    font-size: 22px!important; /* Increased icon size */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85; /* More opaque by default */
    transition: opacity 0.2s ease-in-out, background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
}

.unmute-button-overlay:hover {
    background-color: rgba(0, 0, 0, 0.9); /* Darker on hover */
    opacity: 1;
    transform: scale(1.1); /* Slight zoom effect on hover */
}

.unmute-button-overlay:active {
    transform: scale(1); /* Revert scale on click for a pressed effect */
}

/* Ensure the parent container of the video can host an absolutely positioned button */
.image-container .plyr,
.image-container > video
{
    position: relative;
}

/* Lora Badge Styles */
.detail-item-loras {
    grid-column: span 1;
    min-width: 0;
}

.lora-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    overflow: hidden;
}

.lora-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0px 4px 2px 4px;
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
    border-bottom: none;
    border-radius: 3px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

.lora-name {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #ccc;
    font-size: 0.85em;
}

.lora-source-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    opacity: 0.8;
    margin-right: -2px;
}

.lora-badge-civitai {
    padding-left: 2px;
    padding-right: 4px;
}

@media (max-width: 768px) {
    .detail-item-loras {
        grid-column: span 1;
    }
}

.lora-strength-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #4a4a4a;
}

.lora-strength-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a6a4a, #6a8a6a);
}

/* Smooth scroll for sequence thumbnails */
.sequence-images {
    scroll-behavior: smooth;
}