/* =========================================
   FRONTEND STYLES (index.php)
   ========================================= */
:root { --bg: #121212; --text: #e0e0e0; --card: #1e1e1e; --accent: #e74c3c; --header: rgba(0,0,0,0.95); }
[data-theme="light"] { --bg: #f9f9f9; --text: #333; --card: #fff; --header: rgba(255,255,255,0.95); }
body { font-family: 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); margin:0; padding:0; transition: 0.3s; }

header { position: sticky; top: 0; z-index: 900; background: var(--header); backdrop-filter: blur(10px); padding: 10px 30px; display: flex; align-items: center; flex-wrap: wrap; border-bottom: 1px solid rgba(128,128,128,0.2); min-height: 70px; }
.logo-text { font-size: 1.5rem; font-weight: 800; letter-spacing: 2px; color: var(--text); text-decoration: none; margin-right: 30px; }
.logo-img { max-height: 40px; vertical-align: middle; }
.nav-menu { display: flex; gap: 25px; margin-right: auto; }
.nav-menu a { color: var(--text); text-decoration: none; font-weight: 600; text-transform: uppercase; border-bottom: 2px solid transparent; }
.nav-menu a:hover, .nav-menu a.active { border-bottom-color: var(--accent); color: var(--accent); }
.header-right { margin-left: auto; display: flex; gap: 15px; align-items: center; }

.search-form { display: flex; align-items: center; }
.search-input { background: transparent; border: 1px solid var(--text); color: var(--text); padding: 5px 10px; border-radius: 20px; outline: none; font-size: 0.9rem; width: 150px; transition: width 0.3s, border-color 0.3s; }
.search-input:focus { width: 200px; border-color: var(--accent); }
.search-input::placeholder { color: var(--text); opacity: 0.6; }
.mobile-search-trigger { display: none; cursor: pointer; }
.mobile-search-trigger svg { width: 24px; height: 24px; fill: var(--text); }

.theme-icon { cursor: pointer; width: 24px; height: 24px; fill: var(--text); }
.home-btn-circle { width: 40px; height: 40px; background: var(--accent); color: #fff; border-radius: 50%; display: flex; justify-content: center; align-items: center; text-decoration: none; font-weight: bold; font-size: 0.9rem; }

.container { max-width: 1800px; margin: 0 auto; padding: 20px; min-height: 80vh; }
.video-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; }
.video-card { position: relative; aspect-ratio: 4/6; background: #000; border-radius: 10px; overflow: hidden; }
.video-card video { width: 100%; height: 100%; object-fit: cover; }

.video-tags { color: #888; font-size: 0.75rem; margin-top: 5px; font-style: italic; }

.live-viewer-badge { position: fixed; bottom: 20px; left: 20px; width: 50px; height: 50px; background: #e74c3c; color: white; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: bold; box-shadow: 0 4px 10px rgba(231, 76, 60, 0.5); z-index: 1000; cursor: default; animation: pulse 2s infinite; }
.live-count { font-size: 1rem; }
@keyframes pulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); } 70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); } }

/* OVERLAY LAYOUT */
.overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.85); opacity: 0; transition: 0.3s; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 5px; }
.video-card:hover .overlay { opacity: 1; }

/* COMPACT ELEMENTS TO FIT CARD */
.btn-red { background: var(--accent); color: white; padding: 6px 16px; border-radius: 20px; text-decoration: none; font-weight: bold; cursor: pointer; border:none; margin: 3px; font-size: 0.9rem; }
.vid-title-overlay { color: white; font-weight: bold; margin: 3px 0; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90%; }
.prompt-container { margin: 5px 0; width: 95%; position: relative; }
.prompt-text { color: #ccc; font-size: 0.75rem; max-height: 2.8em; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.copy-btn { display: none; margin-top: 3px; background: transparent; border: 1px solid #fff; color: #fff; padding: 2px 8px; cursor: pointer; font-size: 0.7rem; border-radius: 5px; }
.prompt-container:hover .copy-btn { display: inline-block; }
.actions { margin-top: 5px; display: flex; gap: 10px; }
.action-icon { cursor: pointer; font-size: 1rem; user-select: none; }

/* AIO MINI PORTRAIT */
.mini-portrait { position: relative; margin: 0 auto 5px auto; width: 30px !important; height: 45px !important; border-radius: 4px; border: 1px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.8); object-fit: cover; background: #000; pointer-events: none; display: block; }
@media (min-width: 769px) { .mini-portrait { width: 40px !important; height: 60px !important; margin-bottom: 8px; } }

.fyp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.fyp-card { position: relative; aspect-ratio: 9/16; background: #000; border-radius: 8px; overflow: hidden; cursor: pointer; }
.fyp-card video { width: 100%; height: 100%; object-fit: cover; }
.play-icon-overlay { position: absolute; top:50%; left:50%; transform:translate(-50%, -50%); width:50px; height:50px; background:rgba(0,0,0,0.5); border-radius:50%; display:flex; align-items:center; justify-content:center; opacity:0; transition:0.3s; pointer-events: none;}
.play-icon-overlay::after { content:'▶'; color:white; font-size:24px; margin-left:4px; }
.fyp-card:hover .play-icon-overlay { opacity: 1; }
.fyp-views { position: absolute; bottom: 10px; left: 10px; color: white; font-size: 0.8rem; font-weight: bold; text-shadow: 0 1px 3px rgba(0,0,0,0.8); display: flex; align-items: center; gap: 5px; pointer-events: none; }
.fyp-views svg { fill: white; width: 16px; height: 16px; }

.gallery-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 30px; border-bottom: 1px solid rgba(128,128,128,0.2); padding-bottom: 15px; }
.gallery-info { text-align: left; }
.gallery-title { font-size: 2rem; color: var(--accent); text-transform: uppercase; margin: 0; }
.gallery-caption { font-size: 0.9rem; color: #888; margin: 5px 0 0 0; }
.gallery-tabs { display: flex; gap: 15px; }
.g-tab { padding: 8px 16px; border: 1px solid var(--text); border-radius: 20px; text-decoration: none; color: var(--text); font-weight: bold; font-size: 0.9rem; transition: 0.3s; }
.g-tab.active, .g-tab:hover { background: var(--accent); border-color: var(--accent); color: white; }

.image-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.image-card { aspect-ratio: 4/6; overflow: hidden; border-radius: 8px; position: relative; cursor: pointer; }
.image-card img { width: 100%; height: 100%; object-fit: cover; transition: 0.3s; }
.image-card:hover img { transform: scale(1.1); }
.rating-badge { position: absolute; top: 10px; right: 10px; background: rgba(231, 76, 60, 0.9); color: white; padding: 4px 8px; border-radius: 12px; font-weight: bold; font-size: 0.8rem; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.image-card:hover .rating-badge { opacity: 1; }
.gallery-views { position: absolute; bottom: 10px; left: 10px; color: white; font-size: 0.8rem; font-weight: bold; text-shadow: 0 1px 3px rgba(0,0,0,0.8); display: flex; align-items: center; gap: 5px; pointer-events: none; z-index: 2; }
.gallery-views svg { fill: white; width: 16px; height: 16px; }

.load-more-container { text-align: center; margin-top: 30px; }
.btn-load-more { background: transparent; border: 2px solid var(--text); color: var(--text); padding: 10px 30px; border-radius: 30px; cursor: pointer; font-weight: bold; font-size: 1rem; transition: 0.3s; }
.btn-load-more:hover { background: var(--accent); border-color: var(--accent); color: white; }
.hidden-item { display: none; }

#age-gate { position: fixed; inset: 0; background: #000; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }

.lightbox { display: none; position: fixed; z-index: 2000; padding-top: 50px; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.95); overflow: auto; }
.close-btn { position: absolute; top: 10px; right: 20px; color: #f1f1f1; font-size: 40px; cursor: pointer; z-index: 2001; }

.search-lightbox-content { margin: 15% auto; width: 80%; max-width: 600px; background: transparent; text-align: center; }
.search-lightbox-input { width: 100%; padding: 15px; font-size: 1.2rem; border-radius: 30px; border: 2px solid var(--accent); background: #1e1e1e; color: white; outline: none; }

.lightbox-content { margin: auto; display: flex; width: 90%; max-width: 1200px; height: 80vh; background: #111; border-radius: 8px; overflow: hidden; position: relative; }
#lb-img-container { flex: 1; background: #000; display: flex; align-items: center; justify-content: center; }
#lb-img { max-width: 100%; max-height: 100%; object-fit: contain; }
#lb-text-container { flex: 1; padding: 40px; overflow-y: auto; color: #ddd; border-left: 1px solid #333; display: flex; flex-direction: column; }
.rating-ui { margin-top: 20px; padding-top: 20px; border-top: 1px solid #333; }
.stars { display: flex; gap: 5px; cursor: pointer; font-size: 1.5rem; color: #555; }
.star:hover, .star.active { color: #f1c40f; }

.fyp-lightbox-content { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; position: relative; }
#fyp-video-container { width: auto; height: 100%; max-width: 100%; aspect-ratio: 9/16; position: relative; background: #000; }
#fyp-video { width: 100%; height: 100%; object-fit: cover; }
.fyp-controls { position: absolute; bottom: 80px; right: 10px; display: flex; flex-direction: column; gap: 20px; align-items: center; z-index: 2002; }
.fyp-btn { display: flex; flex-direction: column; align-items: center; cursor: pointer; transition: 0.2s; color: white; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }
.fyp-btn:hover { transform: scale(1.1); }
.fyp-icon { font-size: 2rem; margin-bottom: 2px; }
.fyp-count { font-size: 0.8rem; font-weight: bold; }

.pagination { display: flex; justify-content: center; margin-top: 40px; gap: 10px; }
.pagination a { padding: 8px 12px; border: 1px solid var(--text); color: var(--text); text-decoration: none; border-radius: 4px; }
.pagination a.active, .pagination a:hover { background: var(--accent); border-color: var(--accent); color: white; }

/* CUSTOM PAGE LAYOUT */
.page-layout { display: flex; gap: 40px; max-width: 1200px; margin: 0 auto; padding: 40px; background: var(--card); border-radius: 10px; }
.page-header { flex: 1; border-right: 1px solid #333; padding-right: 20px; position: sticky; top: 100px; height: fit-content; }
.page-header h1 { margin-top: 0; color: var(--accent); text-transform: uppercase; font-size: 2.5rem; }

.page-content { flex: 3; line-height: 1.4; font-size: 1rem; }
.page-content p { margin-bottom: 10px; margin-top: 0; }
.page-content a { color: var(--accent); text-decoration: underline; }
.page-content a:hover { text-decoration: none; }

/* FILTER BAR STYLE */
.tag-filter-container { display: flex; gap: 10px; margin-bottom: 30px; justify-content: center; flex-wrap: wrap; }
.tag-btn { background: transparent; border: 1px solid var(--text); color: var(--text); padding: 8px 16px; border-radius: 20px; text-decoration: none; transition: 0.3s; font-size: 0.9rem; text-transform: capitalize; }
.tag-btn:hover, .tag-btn.active { background: var(--accent); border-color: var(--accent); color: white; }

footer { border-top: 1px solid rgba(128,128,128,0.2); padding: 30px; margin-top: 50px; display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; color: #888; }

@media (max-width: 768px) {
    .video-grid { grid-template-columns: repeat(2, 1fr); }
    .image-grid { grid-template-columns: repeat(3, 1fr); }
    .fyp-grid { grid-template-columns: repeat(3, 1fr); }
    .lightbox-content { flex-direction: column; height: auto; min-height: 80vh; }
    #lb-img-container { height: 300px; }
    #lb-text-container { border-left: none; border-top: 1px solid #333; }
    header { padding: 15px; } .nav-menu { order: 3; width: 100%; margin-top: 15px; justify-content: center; border-top: 1px solid #333; padding-top: 10px; flex-wrap: wrap; }
    .search-form { display: none; } 
    .mobile-search-trigger { display: block; margin-right: 15px; }
    .gallery-header { flex-direction: column; align-items: center; text-align: center; gap: 20px; }
    .gallery-info { text-align: center; }
    #fyp-video-container { width: 100%; }
    .page-layout { flex-direction: column; padding: 20px; }
    .page-header { border-right: none; border-bottom: 1px solid #333; padding-right: 0; padding-bottom: 20px; position: static; text-align: center; }
}


/* =========================================
   ADMIN DASHBOARD STYLES (looki.php)
   ========================================= */
body.admin-login-body { background: #111; color: #eee; font-family: sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; }
.admin-login-body form { background: #222; padding: 40px; border-radius: 8px; text-align: center; }
.admin-login-body input { padding: 10px; display: block; margin: 10px auto; width: 200px; }
.admin-login-body button { padding: 10px 20px; background: #e74c3c; border: none; color: white; cursor: pointer; }

body.admin-body { background: #f0f0f0; margin: 0; display: flex; color: #333; font-family: 'Segoe UI', sans-serif; }
.admin-body .sidebar { width: 250px; background: #222; color: #fff; height: 100vh; padding: 20px; position: fixed; box-sizing: border-box; }
.admin-body .sidebar a { display: block; color: #bbb; text-decoration: none; padding: 15px; margin-bottom: 5px; border-radius: 4px; }
.admin-body .sidebar a:hover, .admin-body .sidebar a.active { background: #e74c3c; color: white; }
.admin-body .btn-view-site { background: #000 !important; color: #fff !important; text-align: center; font-weight: bold; border: 1px solid #333; margin-top: 20px; }
.admin-body .btn-view-site:hover { background: #333 !important; color: #fff !important; }

.admin-body .content { margin-left: 250px; padding: 40px; width: calc(100% - 250px); box-sizing: border-box; }
.admin-body .card { background: white; padding: 25px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); margin-bottom: 20px; }

.admin-body label { font-weight: bold; display: block; margin-top: 15px; margin-bottom: 5px; color: #333; }
.admin-body input[type="text"], .admin-body input[type="file"], .admin-body input[type="number"], .admin-body textarea, .admin-body select { width: 100%; padding: 10px; margin-bottom: 5px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; }
.admin-body textarea { resize: vertical; }
.admin-body button { background: #e74c3c; color: white; padding: 10px 20px; border: none; cursor: pointer; border-radius: 4px; margin-top: 15px; }

.admin-body .item-list { display: grid; gap: 10px; }
.admin-body .item { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; padding: 10px; }
.admin-body .btn-edit { color: #3498db; margin-right: 10px; text-decoration: none; font-weight: bold;} 
.admin-body .btn-del { color: #e74c3c; text-decoration: none; }

.admin-body .search-bar { display: flex; gap: 10px; margin-bottom: 20px; align-items: flex-end; }
.admin-body .search-bar input, .admin-body .search-bar select { margin-bottom: 0; width: auto; }

.admin-body .pagination { margin-top: 20px; text-align: center; } 
.admin-body .pagination a { display: inline-block; padding: 8px 12px; border: 1px solid #ccc; text-decoration: none; color: #333; margin: 0 2px; border-radius: 4px; background: transparent; } 
.admin-body .pagination a.active { background: #e74c3c; color: white; border-color: #e74c3c; }

.admin-body .stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 30px; }
.admin-body .stat-box { background: #e74c3c; color: white; padding: 20px; border-radius: 8px; text-align: center; }
.admin-body .stat-box h2 { margin: 0; font-size: 3rem; }

.admin-body .chart-wrap { position: relative; height: 250px; border-bottom: 2px solid #ccc; border-left: 2px solid #ccc; margin: 20px 0; display: flex; align-items: flex-end; padding-left: 10px; gap: 2%; }
.admin-body .chart-point-group { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.admin-body .chart-bar { width: 10px; background: #e74c3c; border-radius: 5px; transition: height 0.5s ease; position: relative; }
.admin-body .chart-bar::after { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; background: #fff; border: 3px solid #e74c3c; border-radius: 50%; }
.admin-body .chart-line { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.admin-body .date-lbl { margin-top: 10px; font-size: 0.8rem; color: #666; text-align: center; }

.admin-body table { width: 100%; border-collapse: collapse; } 
.admin-body th, .admin-body td { text-align: left; padding: 12px; border-bottom: 1px solid #ddd; } 
.admin-body th { background: #f4f4f4; }

.admin-body #regions_div { width: 100%; height: 400px; margin-bottom: 30px; }
.admin-body .bulk-actions { margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee; }
.admin-body .tag-options { display: flex; gap: 15px; margin-bottom: 15px; flex-wrap: wrap; }
.admin-body .tag-options label { font-weight: normal; cursor: pointer; display: flex; align-items: center; gap: 5px; margin: 0; color: #333; }