.modal {
        display: none; /* Hidden by default */
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: rgba(0, 0, 0, 0.5); /* Black background with opacity */
    }

    .modal-content {
        background-color: #fff;
        margin: 5% auto;
        padding: 20px;
        border-radius: 8px;
        width: 80%;
        height: 80%;
        position: relative;
    }

    .close-button {
        position: absolute;
        top: 10px;
        right: 20px;
        font-size: 24px;
        cursor: pointer;
    }
h3.whats_new, h3.showinfo, h3.admin {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: bold;
    text-transform: uppercase;
    color: #ffffff; /* readable font color */
}

p.whats_new {
	color: #ffffff;
}

label.quicksearch {
    color: #ffffff;
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 6px;
    display: inline-block;
}

.quicksearch-dropdown {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
}

.quicksearch-dropdown select {
    width: 100%;
    background-color: #2f2f2f;
    color: #fff;
    border: 2px solid transparent;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: normal;
    cursor: pointer;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.quicksearch-dropdown select.populated {
    border-color: #287ADE;
}

.quicksearch-dropdown select:disabled {
    background-color: #2f2f2f;
    color: #aaa;
    cursor: not-allowed;
    border-color: transparent;
}

.quicksearch-dropdown select option:checked,
.quicksearch-dropdown select option:focus {
    background-color: #287ADE;
    color: #fff;
}

.quicksearch-dropdown select option:hover {
    background-color: #287ADE;
    color: #fff;
}

.quicksearch-container {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    padding: 0;
    margin: 0;
    justify-content: flex-start;
}

.live-card-info h2.card-info {
    font-size: 1.5rem;
    color: #287ADE;
    margin-bottom: 5px;
    font-weight: bold;
}

.live-card-info h4.card-info,
.audio-card-info h4.card-info,
.upcoming-card-info h4.card-info,
.video-card-info h4.card-info {
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 5px;
}

.live-card-info h5.card-info,
.audio-card-info h5.card-info,
.upcoming-card-info h5.card-info,
.video-card-info h5.card-info {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 3px;
}

@media (max-width: 768px) {
    h2.whats_new {
        font-size: 1.75rem;
    }

    .live-card-info h2.card-info {
        font-size: 1.25rem;
    }

    .live-card-info h4.card-info,
    .audio-card-info h4.card-info,
    .upcoming-card-info h4.card-info,
    .video-card-info h4.card-info {
        font-size: 1.1rem;
    }

    .live-card-info h5.card-info,
    .audio-card-info h5.card-info,
    .upcoming-card-info h5.card-info,
    .video-card-info h5.card-info {
        font-size: 0.9rem;
    }
}

.row.whats-new-nav {
    display: flex;
    align-items: stretch;
    background-color: #2f2f2f;
    border-bottom: 4px solid #287ADE;
    height: 60px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    position: sticky;
    top: 70px;
    z-index: 1000;
}

.row.whats-new-nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background-color: #287ADE;
    z-index: 2;
}

.whats-new-nav-tab {
    flex-grow: 1;
    text-align: center;
    cursor: pointer;
    background-color: #161616;
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0;
    margin: 0;
    border: none;
    position: relative;
    z-index: 1; 
}

.whats-new-nav-tab:active {
    transform: none !important;
    box-shadow: none !important;
    outline: none !important;
    border-style: none !important;
}

.whats-new-nav-tab:focus {
    outline: none !important;
    box-shadow: none !important;
}

.whats-new-nav-tab-end {
    flex-grow: 2;
    background-color: #2f2f2f;
}

.whats-new-nav-tab:hover:not(.active) {
    background-color: #287ADE;
    transform: translateY(-2px);
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
}

.whats-new-nav-tab.active {
    background-color: #287ADE;
    z-index: 3;
}

.container.whats-new-overview, .streams {
    margin-top: 20px;
    padding: 0 20px 0 20px;
}

@media (max-width: 767.98px) {
    .row.whats-new-nav {
        position: static;
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .whats-new-nav-tab {
        height: 50px;
        flex-grow: 0;
        border-bottom: 1px solid #287ADE;
    }

    .whats-new-nav-tab:last-child {
        border-bottom: none;
    }
}

.live-card-container, .audio-card-container, .upcoming-card-container, .video-card-container {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0 0 0;
    margin: 0;
    width: 100%;
    align-items: flex-start;
}

.video-card-container-full, .audio-card-container-full {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping to new lines */
    padding: 10px 0 0 0;
    margin: 0;
    width: 100%;
    justify-content: center;
}

.live-card, .audio-card, .upcoming-card, .video-card {
    position: relative;
    display: inline-block;
    margin: 0 10px 10px 0;
    padding: 0;
    box-sizing: border-box;
    flex-shrink: 0;
}

.video-card-full, .audio-card-full {
    position: relative;
    display: inline-block;
    margin: 0 10px 10px 0;
    padding: 0;
    box-sizing: border-box;
    flex-shrink: 0;
}

.live-card:not(:last-child), .audio-card:not(:last-child), .upcoming-card:not(:last-child), .video-card:not(:last-child) {
    margin-right: 10pt;
}

.video-card-full:not(:last-child), .audio-card-full:not(:last-child) {
    margin-right: 10pt;
}

.live-card {
    outline: 4px solid #287ade;
}

.live-card-info, .audio-card-info, .upcoming-card-info, .video-card-info, .card-info-download {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.5s;
    color: white;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.live-card:hover .live-card-info, .audio-card:hover .audio-card-info, .upcoming-card:hover .upcoming-card-info, .video-card:hover .video-card-info {
    opacity: 1;
    pointer-events: auto; /* enable interaction on visible overlay */
}

.live-card-info, .audio-card-info, .upcoming-card-info, .video-card-info, .card-info-download {
    pointer-events: none; /* disable interaction when hidden */
}

.card-info-download {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
}

.live-card-img, .audio-card-img, .upcoming-card-img, .video-card-img {
    display: block;
    width: auto;
    height: auto;
    object-fit: cover;
    margin: 0;
    padding: 0;
    border: none;
}

.audio-card-img {
    max-height: 200px;
}

.video-card-img {
    max-height: 300px;
}

.live-card-img, .upcoming-card-img {
    max-height: 200px;
}

/* DVZ Shoutbox */
#shoutbox {
    width: 100%;
    margin-bottom: 10px;
    border: 4px solid #287ADE; /* blue border to match site */
    background-color: #2f2f2f; /* dark gray background */
    border-radius: 8px;
    color: #ddd; /* readable light font color */
    font-family: Arial, sans-serif;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

#shoutbox .head {
    padding: 10px 12px;
    font-weight: bold;
    font-size: 1.25rem;
    color: #ffffff;
    background-color: transparent;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: default;
    user-select: none;
    flex: 0 0 auto; /* fixed height */
}

#shoutbox.front .head {
    cursor: pointer;
}

#shoutbox .head .right {
    font-size: 13px;
    margin: 0;
}

#shoutbox .head .right a {
    color: #287ADE;
    padding: 6px 8px;
    text-decoration: none;
    transition: color 0.3s ease;
}

#shoutbox .head .right a:hover,
#shoutbox .head .right a:focus {
    color: #5ea0ff;
    outline: none;
}

#shoutbox.collapsed .head {
    opacity: 0.7;
}

#shoutbox.collapsed .body {
    display: none;
}

#shoutbox .body {
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    flex: 1 1 auto; /* allow to grow if needed */
    overflow: visible;
}

#shoutbox .panel {
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    background-color: #2f2f2f;
    padding: 8px 12px;
    color: #ccc;
    font-size: 0.9rem;
    border-radius: 4px;
    margin-bottom: 8px;
}

#shoutbox .panel.minposts {
    background: #3a3a2a;
    color: #b0b070;
}

#shoutbox .panel.blocked {
    background: #4a2a2a;
    color: #d08080;
}

#shoutbox .panel p {
    margin: 0;
}

#shoutbox .window {
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    background-color: #2f2f2f;
    padding: 8px 0 8px 0;
    box-sizing: border-box;
    color: #ddd;
    font-size: 0.95rem;
    flex: 1 1 auto; /* fill available vertical space if possible */
    max-height: 300px; /* optional max height for usability */
}

#shoutbox .data {
    display: table;
    width: 100%;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    font-family: Arial, sans-serif;
    font-size: 0.95rem;
    color: #ddd;
}

#shoutbox.front .data {
    border-top: none;
}

#shoutbox .entry {
    display: table-row !important;
    width: 100%;
    transition: background-color 0.2s ease;
}

#shoutbox .entry:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
}

#shoutbox .entry.new {
    background-color: rgba(40, 122, 222, 0.15);
}

#shoutbox .entry:target {
    background-color: rgba(50, 200, 255, 0.2);
}

#shoutbox .entry > div {
    border-bottom: dashed 1px rgba(255, 255, 255, 0.1);
    padding: 6px 8px;
    vertical-align: middle;
}

#shoutbox .entry:last-child > div {
    border-bottom: none;
}

#shoutbox .entry > div {
    display: table-cell;
    padding: 6px 8px;
    color: #ddd;
}

#shoutbox .avatar {
    height: 24px;
    width: 24px;
    text-align: center;
}

#shoutbox .avatar img {
    margin: 0 auto;
    vertical-align: middle;
    max-height: 22px;
    max-width: 22px;
    border: solid 1px rgba(40, 122, 222, 0.5);
    box-shadow: 0 0 4px rgba(40, 122, 222, 0.7);
    cursor: pointer;
    border-radius: 4px;
    background-color: #1a1a1a;
}

#shoutbox .user {
    border-right: solid 1px rgba(255, 255, 255, 0.1);
    text-align: right;
    white-space: nowrap;
    padding-right: 8px;
    font-weight: 600;
    color: #87bfff;
}

#shoutbox .text {
    width: 100%;
    color: #ccc;
    word-break: break-word;
    word-wrap: break-word;
    padding-left: 8px;
}

#shoutbox .info {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    text-align: right;
    padding-left: 8px;
}

#shoutbox .entry.unread .info:before {
    display: inline-block;
    margin-right: 8px;
    height: 6px;
    width: 6px;
    content: '';
    background: #ff6400;
    border-radius: 50%;
    vertical-align: middle;
}

#shoutbox .info a {
    color: #5ea0ff;
    text-decoration: none;
}

#shoutbox .info a:hover,
#shoutbox .info a:focus {
    text-decoration: underline;
    outline: none;
}

#shoutbox .mod {
    padding: 6px 8px;
    font-size: 10px;
    font-weight: bold;
    color: #7a7a7a;
    text-decoration: none;
}

#shoutbox .mod:nth-of-type(2) {
    margin-right: 5px;
    border-left: solid 1px rgba(255, 255, 255, 0.1);
}

#shoutbox .ip {
    margin-right: 10px;
    color: #bbbbbb;
}

/* Input text styling */
#shoutbox input.text {
    margin: 0;
    padding: 10px 12px;
    width: 100%;
    box-sizing: border-box;
    border: none;
    border-radius: 0 0 8px 8px; /* rounded bottom corners */
    background-color: #161616;
    color: #ddd;
    font-family: Arial, sans-serif;
    font-size: 1rem;
    box-shadow: inset 0 2px 4px rgba(40, 122, 222, 0.3);
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
    outline: none;
    cursor: text;
    flex: 0 0 auto;
}

#shoutbox input.text:focus {
    box-shadow: 0 0 8px #287ADE;
    background-color: #1a1a1a;
    color: #fff;
}

/* Scrollbar styling for the shoutbox window */
#shoutbox .window::-webkit-scrollbar {
    width: 8px;
}

#shoutbox .window::-webkit-scrollbar-track {
    background: #2f2f2f;
}

#shoutbox .window::-webkit-scrollbar-thumb {
    background-color: #287ADE;
    border-radius: 4px;
    border: 2px solid #2f2f2f;
}

/* Responsive tweaks */
@media (max-width: 480px) {
    #shoutbox .head {
        font-size: 1rem;
        padding: 8px 10px;
    }

    #shoutbox input.text {
        font-size: 0.9rem;
        padding: 8px 10px;
    }

    #shoutbox .user {
        font-size: 0.9rem;
    }

    #shoutbox .text {
        font-size: 0.9rem;
    }
}
