/* 
   TurkSeries - Core Styles
   Theme: Dark Premium (Netflix-style)
   Colors: BG #0f0f0f, Primary #E50914, Secondary #D4AF37
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&display=swap');

:root {
    --bg-color: #0f0f0f;
    --bg-secondary: #1f1f1f;
    --bg-tertiary: #2a2a2a;
    --primary-color: #E50914;
    /* Red */
    --secondary-color: #D4AF37;
    /* Gold */
    --text-color: #e5e5e5;
    --text-muted: #a3a3a3;
    --white: #ffffff;
    --black: #000000;
    --gradient-overlay: linear-gradient(to bottom, rgba(15, 15, 15, 0) 0%, rgba(15, 15, 15, 1) 100%);
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-strong: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* =====================
   HEADER
   ===================== */
.header {
    background-color: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    /* Glassmorphism */
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--white);
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--white);
}

/* =====================
   HERO SECTION
   ===================== */
.hero {
    position: relative;
    height: 80vh;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    padding: 0 5%;
    margin-bottom: 40px;
    transition: background-image 0.5s ease-in-out;
}

/* Placeholder gradient background for hero if no image */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #2e2e2e 0%, #0f0f0f 100%);
    z-index: -2;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #0f0f0f 0%, rgba(15, 15, 15, 0.8) 40%, rgba(15, 15, 15, 0) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 600px;
    z-index: 1;
    animation: fadeIn 0.8s ease-out;
}

/* Carousel Buttons */
.hero-nav {
    position: absolute;
    bottom: 20px;
    right: 5%;
    display: flex;
    gap: 10px;
    z-index: 2;
}

.hero-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-nav-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.hero-tag {
    color: var(--secondary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: inline-block;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    max-width: 90%;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    border-radius: 4px;
    transition: transform 0.2s, background-color 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #b20710;
    color: var(--white);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--white);
    margin-left: 15px;
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* =====================
   SECTIONS & GRID
   ===================== */
.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--white);
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.container {
    padding: 0 5%;
    margin-bottom: 60px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.card {
    background-color: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.card:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-strong);
    z-index: 10;
}

.card-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    background-color: var(--bg-tertiary);
}

.card-info {
    padding: 15px;
    position: relative;
}

.card-title {
    font-size: 1rem;
    color: var(--white);
    margin-bottom: 5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

/* Social Share & Community */
.share-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    /* Circle for icons */
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    color: #fff;
    text-decoration: none;
}

/* Specific style for rectangle text buttons if needed (Community buttons) */
.share-btn-text {
    width: auto;
    height: auto;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 1rem;
}

.share-btn:hover {
    transform: translateY(-3px);
    opacity: 0.9;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn-facebook {
    background-color: #1877F2;
}

.btn-telegram {
    background-color: #229ED9;
}

.btn-whatsapp {
    background-color: #25D366;
}

.btn-twitter {
    background-color: #000;
    border: 1px solid #333;
}

.btn-reddit {
    background-color: #FF4500;
}

.community-section {
    margin: 30px auto;
    padding: 25px;
    background: transparent;
    /* Removed grey background */
    /* border: 1px solid rgba(255,255,255,0.05); */
    text-align: center;
    max-width: 800px;
}

.community-title {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* =====================
   PLAYER PAGE
   ===================== */
.player-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: #000;
    /* aspect-ratio: 16/9; Remove fixed aspect ratio for container if we want full bleed, but usually 16/9 is good for video. User asked "full". */
    width: 100vw;
    height: 80vh;
    /* Make it tall */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    position: relative;
}

.player-search {
    width: 100%;
    background-color: var(--bg-secondary);
    padding: 20px 5%;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Header Search */
.header-search {
    margin-left: auto;
    margin-right: 25px;
    position: relative;
    display: flex;
    align-items: center;
}

.header-search input {
    background-color: #1a1a1a;
    border: 1px solid #333;
    padding: 8px 15px 8px 35px;
    /* Left padding for icon */
    border-radius: 4px;
    color: #fff;
    outline: none;
    width: 220px;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
}

.header-search input:focus {
    background-color: #000;
    border-color: var(--primary-color);
    width: 280px;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.2);
}

.header-search input::placeholder {
    color: #666;
}

.search-bar {
    width: 100%;
    max-width: 600px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    background-color: var(--bg-tertiary);
    border: 1px solid transparent;
    border-radius: 30px;
    color: var(--white);
    font-family: inherit;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary-color);
}

.episode-list {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.episode-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s;
}

.episode-item:hover {
    background-color: var(--bg-tertiary);
}

.episode-item.active {
    background-color: rgba(229, 9, 20, 0.1);
    border-left: 3px solid var(--primary-color);
}

.episode-num {
    font-weight: 700;
    color: var(--text-muted);
    margin-right: 15px;
    width: 30px;
}

.episode-title {
    color: var(--white);
}

/* =====================
   ADMIN & FORMS
   ===================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px;
    background-color: var(--bg-tertiary);
    border: 1px solid #333;
    border-radius: 4px;
    color: var(--white);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* =====================
   FOOTER
   ===================== */
.footer {
    background-color: var(--bg-secondary);
    padding: 60px 5% 20px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =====================
   ANIMATIONS
   ===================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 768px) {
    .header {
        padding: 10px 20px;
        height: auto;
        flex-wrap: wrap;
        /* Allow wrapping for search bar */
    }

    .logo {
        font-size: 1.5rem;
    }

    .nav-menu {
        display: none;
        /* Hide for simple mobile MVP, or add toggle logic */
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--bg-secondary);
        flex-direction: column;
        padding: 20px;
        text-align: center;
    }

    .header .search-container {
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-desc {
        font-size: 0.95rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hero {
        height: 60vh;
        /* Smaller hero on mobile */
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .card-title {
        font-size: 0.9rem;
    }

    .player-container {
        height: auto;
        aspect-ratio: 16/9;
        /* Standard video aspect ratio */
    }

    .container {
        padding: 0 15px;
        /* Reduce padding on mobile */
    }

    .series-details-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .series-details-container img {
        width: 150px !important;
        /* Smaller poster */
        margin-bottom: 20px;
    }

    .header-search {
        display: block;
        margin: 10px auto;
        width: 100%;
        max-width: 100%;
        /* Ensure full width */
        order: 3;
    }

    .header-search input {
        width: 100%;
        padding: 10px;
        border-radius: 4px;
        /* Optional enhancement */
        border: 1px solid #333;
    }

    /* Make Admin Tables Scrollable */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}