:root {
    --bg-color: #0f0f0f;
    --sidebar-bg: #0f0f0f;
    --card-bg: #1a1a1a;
    --text-color: #f1f1f1;
    --text-muted: #aaaaaa;
    --accent-color: #ffffff;
    --hover-overlay: rgba(0, 0, 0, 0.6);
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 80px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* Pornstars icon is rendered via inline SVG in sidebar (no font dependency). */

a {
    text-decoration: none;
    color: inherit;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Sticky Header Scrolled State */
.header-scrolled {
    background-color: rgba(28, 30, 34, .72);
    -webkit-backdrop-filter: saturate(1.8) blur(20px);
    backdrop-filter: saturate(1.8) blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-collapsed-width);
    background-color: rgba(2, 4, 8, .72);
    -webkit-backdrop-filter: saturate(1.8) blur(20px);
    backdrop-filter: saturate(1.8) blur(20px);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    border-right: 1px solid rgba(255,255,255,0.08);
    /* Desktop Transitions */
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 0s; /* Kapanışta gecikme yok */
}

/* Desktop Hover Behavior */
@media (min-width: 769px) {
    /* Sidebar Varsayılan (Kapalı) Durum */
    .sidebar {
        width: 80px;
    }

    .sidebar-item {
        height: 50px;
        margin-bottom: 8px;
    }

    .sidebar-item a {
        display: flex;
        align-items: center;
        flex-direction: row !important;
        justify-content: flex-start !important;
        width: 100%;
        height: 100%;
        padding-left: 20px; /* İkonu ortalamak için */
        gap: 16px;
        color: #aaa;
    }
    
    .sidebar-icon {
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .sidebar-item i, .sidebar-item svg {
        font-size: 24px; /* İkon boyutu */
        height: 24px; /* SVG height override */
        width: 24px;
        display: block;
    }

    .sidebar-text {
        white-space: nowrap;
        opacity: 0;
        display: none; /* Kapalıyken yok */
        transform: translateX(-10px);
        font-size: 15px;
        font-weight: 500;
    }
    
    /* Logo - Kapalıyken Gizli */
    .sidebar-desktop-logo {
        height: 0;
        overflow: hidden;
        opacity: 0;
        margin-bottom: 0;
    }

    /* Hover Durumu (Sadece Ok görünür, genişlemeyi JS yönetir) */
    /* .sidebar:hover width kuralı kaldırıldı */

    /* JS ile Hover Genişleme veya Tıklama ile Açık */
    .sidebar.sidebar-hover-open,
    .sidebar.sidebar-expanded {
        width: 240px !important;
        transition-delay: 0s !important;
    }

    /* Genişleyince Yazı Görünümü */
    .sidebar.sidebar-hover-open .sidebar-text,
    .sidebar.sidebar-expanded .sidebar-text {
        display: block;
        animation: fadeInText 0.3s ease forwards;
        animation-delay: 0s;
    }
    
    .sidebar.sidebar-expanded .sidebar-text {
        display: block;
        animation: fadeInText 0.3s ease forwards;
        animation-delay: 0s;
    }
    
    @keyframes fadeInText {
        from { opacity: 0; transform: translateX(-10px); }
        to { opacity: 1; transform: translateX(0); }
    }

    /* Logo Görünümü */
    .sidebar.sidebar-hover-open .sidebar-desktop-logo,
    .sidebar.sidebar-expanded .sidebar-desktop-logo {
        animation: showLogo 0.3s ease forwards;
        animation-delay: 0s;
    }
    
    @keyframes showLogo {
        0% { height: 0; opacity: 0; margin-bottom: 0; }
        100% { height: auto; opacity: 1; }
    }

    /* Arrow Button (Geçici Görünüm) */
    #sidebar-collapse-btn {
        position: absolute;
        top: 24px; /* Logo hizası */
        left: 50%;
        transform: translateX(-50%);
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: rgba(255,255,255,0.1);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        border: none;
        z-index: 50;
        opacity: 0;
        pointer-events: none;
    }
    
    #sidebar-collapse-btn:hover {
        background: rgba(255,255,255,0.2);
    }

    /* Hover anında ok belirir */
    .sidebar:hover #sidebar-collapse-btn {
        opacity: 1;
        pointer-events: auto;
        transition: opacity 0.3s;
    }
    
    /* Genişleyince (JS veya Tıklama) ok kaybolur */
    .sidebar.sidebar-hover-open #sidebar-collapse-btn,
    .sidebar.sidebar-expanded #sidebar-collapse-btn {
        display: none !important;
        opacity: 0;
    }

    .main-content {
        margin-left: 80px;
        width: calc(100% - 80px);
    }
}

.sidebar-item {
    width: 100%;
    height: 40px;
    margin-bottom: 5px;
    cursor: pointer;
    list-style: none;
    padding: 0 8px;
}

.sidebar-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #bbb;
    transition: color 0.2s;
    font-size: 10px;
    font-weight: 500;
    text-decoration: none;
    gap: 12px;
}

.sidebar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.sidebar-item i, .sidebar-item svg {
    font-size: 20px;
    height: 20px;
    width: 20px;
}

.sidebar-item:hover a, .sidebar-item.active a {
    color: #fff;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
    padding: 0; /* Header sticky olduğunda kenar boşluğu olmaması için 0 */
    position: relative;
    z-index: 1;
}

/* Carousels Common */
.carousel-section {
    margin-bottom: 0; /* Marginleri index.php'de özel olarak vereceğiz */
    position: relative;
}

.carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    cursor: grab;
}

.carousel-container:active {
    cursor: grabbing;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

.carousel-container-inner {
    overflow-x: scroll;
    position: relative;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    contain: content;
    display: flex;
    flex: 1 1 auto;
    scroll-behavior: smooth;
    -ms-overflow-style: -ms-autohiding-scrollbar;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.carousel-container-content {
    display: flex;
    white-space: nowrap;
}

/* Pornstar Circles */
.star-item {
    width: 72px;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    border-top-left-radius: 9999px;
    border-top-right-radius: 9999px;
    padding: 4px 4px 12px;
    transition: background-color 0.2s;
}

.star-item:hover {
    background-color: rgba(255,255,255,0.1);
}

.star-img-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 8px;
}

.star-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform 0.2s ease;
}

.star-name {
    font-size: 11px;
    text-align: center;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    font-weight: 400;
    padding: 0 2px;
}

/* Chips Item (Common for Channels & Categories) */
.chips-item {
    height: 40px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center; /* İçeriği ortalamak için */
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 20px;
    padding: 0 12px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    margin-bottom: 12px;
    margin-left: 8px;
    margin-top: 6px;
    color: #ccc;
    font-size: 14px;
    font-weight: 500;
    max-width: 100%;
}
.chips-item.chips-large{
    padding: 0 12px 0 4px;
}
.chips-item:first-child {
    margin-left: 0;
}
.chips-item:hover {
    background: rgba(50, 50, 50, 0.8);
    border-color: rgba(255,255,255,0.1);
    color: #fff;
}

.chips-item.active {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.channel-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-right: 10px;
    color: #000;
    flex-shrink: 0;
    margin-left: -10px;
    margin-right: 8px;
}

.channel-name {
    font-size: 14px;
    font-weight: 500;
    color: inherit;
    white-space: nowrap;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 20px;
}

/* Related videos grid - 4 columns fixed for detail page */
.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.related-grid .video-card {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.related-grid .video-thumbnail-wrapper {
    width: 100%;
    max-width: 100%;
}

.related-grid .video-info {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.related-grid .video-info h3 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .related-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

.video-card {
    position: relative;
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s;
}

.video-thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    border-radius: 12px;
    overflow: hidden;
    background: #111;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.video-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
}

.video-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
}

.duration-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    color: #fff;
    padding: 0;
    font-size: 13px;
    font-weight: 700;
    z-index: 3;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    pointer-events: none;
}

/* (Hover UI removed) Hover interactions are handled via JavaScript only. */

/* Search Modal New Structure */
.search-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
    z-index: 2000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 40px;
    opacity: 0;
    transition: opacity 0.3s;
}

.search-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.search-box {
    width: 600px;
    max-width: 90%;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: translateY(-20px);
    transition: transform 0.3s;
}

.search-modal-overlay.active .search-box {
    transform: translateY(0);
}

.search-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.search-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.search-back-btn {
    margin-right: 16px;
    color: #aaa;
    cursor: pointer;
}

.search-back-btn:hover {
    color: #fff;
}

.search-input-field {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    width: 100%;
    outline: none;
}

.search-tabs {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #777;
    font-weight: 500;
}

.tab-item {
    cursor: pointer;
    transition: color 0.2s;
}

.tab-item:hover {
    color: #aaa;
}

.tab-item.active {
    color: #fff;
}

.search-results-container {
    padding: 10px 0;
    max-height: 400px;
    overflow-y: auto;
}

.search-tab-content {
    display: none;
}

.search-tab-content.active {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: rgba(255,255,255,0.05);
}

.search-result-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 16px;
    object-fit: cover;
}

.text-avatar {
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
}

.brand-avatar {
    background: #e67e22;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
}

.search-result-name {
    display: block;
    font-weight: 500;
    color: #fff;
    font-size: 15px;
}

.search-result-sub {
    font-size: 12px;
    color: #777;
}
.sidebar-item.active a {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}
/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 240px;
        height: 100vh;
        flex-direction: column;
        justify-content: flex-start;
        border-right: 1px solid rgba(255,255,255,0.08);
        border-top: none;
        padding-top: 20px;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-item {
        margin-bottom: 4px;
        border-radius: 12px;
        transition: background-color 0.2s;
        padding-left: 0; /* Padding a etiketinde */
    }

    .sidebar-item a {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px; /* İstenen gap */
        padding: 4px 12px;
        font-size: 16px;
        font-weight: 500;
        color: #aaa;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        text-decoration: none;
    }

   

    .sidebar-item.active a {
        color: #fff;
        font-weight: bold;
    }

    .sidebar-item:hover a {
        color: #fff;
    }

    .sidebar-icon {
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar-item i, .sidebar-item svg {
        font-size: 20px;
        height: 20px;
        width: 20px;
    }

    .sidebar-text {
        display: inline-block;
    }

    .sidebar-item span {
        display: inline-block;
    }

    /* Mobile Footer Visibility */
    .sidebar-footer {
        display: block !important;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        margin-bottom: 60px;
        padding: 0;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
        gap: 16px;
        padding: 0 10px;
    }

    .header-glow-bg {
        height: 250px;
    }
}

/* Masaüstünde footer varsayılan gizli, genişleyince görünür */
@media (min-width: 769px) {
    .sidebar-footer {
        display: none;
        opacity: 0;
    }

    .sidebar.sidebar-hover-open .sidebar-footer,
    .sidebar.sidebar-expanded .sidebar-footer {
        display: block;
        animation: fadeInFooter 0.5s ease forwards;
        animation-delay: 0s;
    }

    @keyframes fadeInFooter {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

/* Login Modal Styles */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.login-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.login-box {
    width: 400px;
    max-width: 90%;
    background: #1a1a1a;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.login-modal-overlay.active .login-box {
    transform: scale(1);
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    color: #aaa;
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 500;
}

.login-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #333;
    padding: 8px 0;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}

.login-input:focus {
    border-color: #fff;
}

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #777;
    width: 18px;
    height: 18px;
}

.login-btn {
    width: 100%;
    padding: 14px;
    border-radius: 30px;
    background: transparent;
    border: 1px solid #444;
    color: #ddd;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.login-btn:hover {
    background: #333;
    color: #fff;
    border-color: #555;
}

.google-btn {
    width: 100%;
    padding: 12px;
    border-radius: 30px;
    background: #1f1f1f;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    margin-bottom: 24px;
    font-weight: 500;
}

.google-btn:hover {
    background: #2a2a2a;
}

.login-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 13px;
}

.forgot-link {
    color: #777;
}

.signup-link {
    color: #fff;
    font-weight: bold;
}

