.trzeci-panel {
    background-color: #1B2838;
    min-height: 800px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    box-sizing: border-box;
    transition: all 0.5s ease-in-out; 
}



.sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 180px;
    flex-shrink: 0;
    margin-right: 15px; 
}

.sidebar input {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #34495e;
    background: #243447;
    color: white;
}

.sidebar button {
    padding: 8px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#video-results {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px; 
    max-width: 60vw; 
    width: 55vw;
    flex-shrink: 0;
}

.video-card {
    background: #243447;
    border-radius: 4px;
    padding: 6px;
    border: 1px solid #34495e;
    display: flex;
    flex-direction: column;
}


.video-card h3 {
    color: #ecf0f1;
    font-size: 10px;
    margin: 0;
    font-family: sans-serif;
    line-height: 1.2;
    height: 2.4em;
    overflow: hidden;
}

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

.modal-content {
    position: relative;
    margin: 5% auto;
    width: 80%;
    max-width: 900px;
    background: #000;
}

#youtube-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
}

.close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: #3498db;
}

#pagination-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

#load-more-btn {
    padding: 10px 25px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

#load-more-btn:hover {
    background-color: #2980b9;
}

#yt-live-cell {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

.live-container {
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.live-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ff0000;
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-weight: bold;
    z-index: 10;
    font-family: sans-serif;
}

.live-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px;
    font-size: 14px;
    font-family: sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.error-msg, .yt-loading {
    color: #555;
    font-family: sans-serif;
    font-weight: bold;
}