/*
Theme Name: Shorts Theme
Description: Full Screen Vertical Video Theme with Bidirectional Scroll
Version: 2.0
Author: Özel Tema
*/

:root {
    --bg-dark: #000000;
    --surface: #121212;
    --text-light: #ffffff;
    --text-muted: #aaaaaa;
    --accent: #ff0050;
}

* { box-sizing: border-box; }
body, html { margin: 0; padding: 0; background: var(--bg-dark); color: var(--text-light); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }

/* Header */
.site-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; background: var(--surface); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid #333; height: 65px; }
.logo { font-size: 24px; font-weight: bold; color: var(--text-light); }
.header-nav ul { display: flex; gap: 20px; }
.header-nav ul li a:hover { color: var(--accent); }
.search-form { display: flex; gap: 5px; }
.search-form input { padding: 8px 15px; border-radius: 20px; border: none; background: #333; color: #fff; outline: none; }
.search-form button { border-radius: 20px; background: var(--accent); color: white; border: none; padding: 8px 15px; cursor: pointer; }
.menu-toggle { display: none; background: none; border: none; color: #fff; font-size: 28px; cursor: pointer; }

/* Layout & Sidebar */
.main-layout { display: flex; min-height: calc(100vh - 65px); }
.sidebar { width: 250px; background: var(--surface); padding: 20px; position: sticky; top: 65px; height: fit-content; border-right: 1px solid #333; z-index: 90; transition: right 0.3s ease; }
.sidebar-nav ul li { margin-bottom: 15px; font-size: 15px; }
.sidebar-nav ul li a i { margin-right: 10px; width: 20px; text-align: center; } /* FontAwesome Icon Space */
.sidebar-nav ul li a:hover { color: var(--accent); }
.sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 998; }

.content-area { flex: 1; padding: 20px; }

/* Grid Düzeni (6'dan 1'e Düşen Sünmeyen Resimler) */
.page-title { margin-top: 0; border-bottom: 1px solid #333; padding-bottom: 10px; font-size: 20px; }
.video-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 15px; }
.video-card { aspect-ratio: 9 / 16; background: #111; border-radius: 8px; overflow: hidden; position: relative; display: block; cursor: pointer; }
.video-card img,.video-card video { width: 100%; height: 100%; object-fit: cover; position: absolute; top:0; left:0; }
.video-card video { z-index: 1; opacity: 0; transition: opacity 0.3s; }
.video-card:hover video { opacity: 1; }
.video-card h3 { position: absolute; bottom: 10px; left: 10px; right: 10px; margin: 0; font-size: 13px; z-index: 2; text-shadow: 1px 1px 3px #000; }

@media (max-width: 1400px) {.video-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1024px) {.video-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {.video-grid { grid-template-columns: repeat(2, 1fr); } }

/* IG / TikTok Single Video (Scroll Snap) */
.single-feed-container { height: calc(100vh - 65px); overflow-y: scroll; scroll-snap-type: y mandatory; scroll-behavior: smooth; margin: -20px; background: #000; position: relative; }
.single-video-section { height: calc(100vh - 65px); width: 100%; scroll-snap-align: start; scroll-snap-stop: always; position: relative; display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #222; }
.single-video-section video { height: 100%; max-width: 100%; object-fit: contain; }
.play-pause-indicator { position: absolute; font-size: 60px; color: rgba(255,255,255,0.7); z-index: 5; display: none; pointer-events: none; }

/* IG Style Right Action Bar */
.video-overlay-ui { position: absolute; bottom: 80px; right: 15px; display: flex; flex-direction: column; gap: 25px; align-items: center; z-index: 10; }
.ui-btn { background: none; border: none; color: #fff; font-size: 26px; cursor: pointer; display: flex; flex-direction: column; align-items: center; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); transition: transform 0.2s; padding: 0; }
.ui-btn:hover { transform: scale(1.1); }
.ui-btn.liked { color: var(--accent); }
.ui-btn span { font-size: 13px; margin-top: 5px; font-weight: bold; }

/* Video Description & Tags (Read More) */
.video-details { position: absolute; bottom: 20px; left: 15px; z-index: 10; width: calc(100% - 80px); text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
.video-details h2 { margin: 0 0 5px; font-size: 16px; }
.video-desc-text { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; margin-bottom: 5px; }
.video-desc-text.expanded { -webkit-line-clamp: unset; }
.read-more-btn { background: none; border: none; color: #ddd; cursor: pointer; padding: 0; font-weight: bold; font-size: 13px; }
.tags-container { display: none; margin-top: 8px; font-size: 13px; }
.tags-container a { color: var(--accent); margin-right: 5px; font-weight: bold; }
.video-desc-text.expanded ~.read-more-btn +.tags-container { display: block; }

.loading-indicator { text-align: center; padding: 20px; width: 100%; grid-column: 1 / -1; color: var(--text-muted); font-size: 14px; }

/* Comments Panel */
.comments-panel { display: none; position: absolute; bottom: 0; left: 0; width: 100%; height: 55vh; background: var(--surface); z-index: 20; padding: 20px; border-top-left-radius: 15px; border-top-right-radius: 15px; overflow-y: auto; box-shadow: 0 -5px 15px rgba(0,0,0,0.5); }
.comments-panel.is-open { display: block; animation: slideUp 0.3s ease-out; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.comment-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.comment-form input,.comment-form textarea { padding: 12px; border-radius: 8px; border: none; background: #333; color: white; outline: none; font-family: inherit; }
.comment-form button { background: var(--accent); color: white; border: none; padding: 12px; border-radius: 8px; cursor: pointer; font-weight: bold; }
.comment-list p { background: #222; padding: 12px; border-radius: 8px; font-size: 14px; margin-bottom: 10px; border-left: 3px solid var(--accent); }

/* Footer */
.site-footer { padding: 20px; text-align: center; border-top: 1px solid #333; font-size: 13px; color: var(--text-muted); }
.footer-nav ul { display: flex; justify-content: center; gap: 15px; margin-bottom: 10px; }

/* Mobil Uyum (Right Drawer) */
@media (max-width: 480px) {
 .video-grid { grid-template-columns: 1fr; gap: 0; padding: 0; height: calc(100vh - 65px); overflow-y: scroll; scroll-snap-type: y mandatory; margin: -20px; }
 .video-grid.video-card { height: calc(100vh - 65px); width: 100vw; border-radius: 0; scroll-snap-align: start; scroll-snap-stop: always; }
 .header-nav { display: none; }
 .menu-toggle { display: block; }
 .sidebar { position: fixed; right: -100%; top: 0; width: 280px; height: 100vh; z-index: 1000; border-left: 1px solid #333; border-right: none; }
 .sidebar.is-open { right: 0; }
 .sidebar-overlay.is-open { display: block; }
 .main-layout { flex-direction: column; }
}