/* favtube/style.css */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: Arial, sans-serif; }
        
body {
    display: grid;
    grid-template-columns: 280px 1fr;
    grid-template-rows: 70px 1fr 50px;
    height: 100vh;
    overflow: hidden;
    background-color: #f9f9f9;
}

.frame-header {
    grid-column: 1 / 3;
    background-color: #202020;
    color: white;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    z-index: 10;
}

.frame-header .logo { display: flex; align-items: center; font-size: 24px; font-weight: bold; color: #fff; margin-right: 40px; white-space: nowrap; }
.frame-header .logo svg { margin-right: 10px; width: 32px; height: 32px; }

.search-bar { display: flex; flex-grow: 1; max-width: 650px; }
.search-bar input { padding: 10px 15px; width: 100%; border: none; border-radius: 4px 0 0 4px; outline: none; font-size: 15px; }
.search-bar button { padding: 10px 20px; background-color: #333; color: white; border: none; cursor: pointer; border-left: 1px solid #444; font-size: 15px; }
.search-bar button.btn-search { border-radius: 0; }
.search-bar button.btn-default { border-radius: 0; background-color: #555; padding: 10px 15px; }
.search-bar button.btn-channel { border-radius: 0 4px 4px 0; background-color: #d4a006; padding: 10px 15px; }

.search-bar button.btn-search:hover { background-color: #444; }
.search-bar button.btn-default:hover { background-color: #666; }
.search-bar button.btn-channel:hover { background-color: #b38805; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.info-btn { 
    background-color: #065fd4; color: white; text-decoration: none; 
    padding: 6px 12px; border-radius: 4px; font-size: 12px; font-weight: 500; 
    transition: background-color 0.2s; white-space: nowrap; 
}
.info-btn:hover { background-color: #0056b3; }

.quota-counter {
    background-color: #333; padding: 6px 12px;
    border-radius: 4px; font-size: 12px; color: #ddd; border: 1px solid #555; white-space: nowrap;
}

.frame-sidebar { background-color: #ffffff; border-right: 1px solid #ddd; padding: 20px; overflow-y: auto; }
.frame-sidebar h3 { font-size: 16px; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 5px; }
.frame-sidebar ul { list-style: none; }
.frame-sidebar li { margin-bottom: 15px; font-size: 14px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f1f1f1; padding-bottom: 10px; }
.frame-sidebar a { text-decoration: none; color: #065fd4; flex-grow: 1; font-weight: 500; }
.frame-sidebar a:hover { text-decoration: underline; }

.action-buttons { display: flex; flex-direction: column; align-items: center; margin-left: 10px; gap: 8px; }
.action-btn { cursor: pointer; font-size: 14px; opacity: 0.8; transition: opacity 0.2s; }
.action-btn:hover { opacity: 1; transform: scale(1.1); }

.frame-main { background-color: #f1f1f1; padding: 20px; overflow-y: auto; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-top: 20px; }

.video-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); display: flex; flex-direction: column; }

.video-player-container { width: 100%; aspect-ratio: 16/9; background-color: #000; position: relative; cursor: pointer; }
.video-thumbnail { width: 100%; height: 100%; object-fit: cover; }

.play-button {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 50px; height: 50px; background-color: rgba(0, 0, 0, 0.7); border-radius: 50%;
    display: flex; justify-content: center; align-items: center; pointer-events: none;
}
.play-button::before { content: ''; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent #fff; margin-left: 4px; }

.video-info { padding: 12px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.video-info h4 { font-size: 14px; margin-bottom: 5px; color: #0f0f0f; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-info p { font-size: 12px; color: #606060; margin-bottom: 10px; line-height: 1.4; }
.video-info .meta-stats { color: #888; font-size: 11px; margin-top: 3px; }

.fav-btn { padding: 6px 12px; background-color: #eee; color: #333; border: none; border-radius: 18px; cursor: pointer; font-size: 12px; font-weight: 500; width: 100%; transition: background 0.2s; margin-top: 5px; }
.fav-btn:hover { background-color: #ddd; }

.frame-footer { grid-column: 1 / 3; background-color: #ffffff; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #666; border-top: 1px solid #ddd; }

.loading-sentinel { text-align: center; padding: 20px; font-size: 14px; color: #666; display: none; }

#toastMsg {
    position: fixed; bottom: 60px; right: 20px; background-color: #282828; color: #fff;
    padding: 12px 20px; border-radius: 6px; z-index: 9999; font-size: 14px; box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    display: none; transition: opacity 0.3s;
}

/* === MODAL CSS VOOR VIDEO SPELER === */
.modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.85); }
.modal-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 90%; max-width: 1000px; background: #000; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.close-btn { position: absolute; top: -35px; right: 0; color: #fff; font-size: 30px; font-weight: bold; cursor: pointer; }
.close-btn:hover { color: #ccc; }
.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; width: 100%; border-radius: 8px; }
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* MEDIA QUERIES VOOR MOBIEL EN TABLET */
@media (max-width: 768px) {
    body { 
        grid-template-columns: 1fr; grid-template-rows: auto auto 1fr 50px; 
        height: 100vh; overflow-y: hidden;
    }
    .frame-header { grid-column: 1 / 2; flex-direction: column; padding: 15px; height: auto; }
    .frame-header .logo { margin: 0 0 10px 0; }
    .search-bar { width: 100%; }
    .header-actions { margin-left: 0; margin-top: 10px; width: 100%; flex-direction: column; gap: 10px; }
    .info-btn, .quota-counter { width: 100%; text-align: center; }
    .frame-sidebar { grid-column: 1 / 2; border-right: none; border-bottom: 2px solid #ddd; max-height: 200px; }
    .frame-main { grid-column: 1 / 2; overflow-y: auto; }
    .frame-footer { grid-column: 1 / 2; min-height: 50px; }
    .video-grid { grid-template-columns: repeat(auto-fill, minmax(100%, 1fr)); }
    .modal-content { width: 95%; top: 50%; }
}