/* Reset ve Genel Stiller */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #252525;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --accent-color: #dd1f29;
    --accent-hover: #f40612;
    --card-bg: #1e1e1e;
    --border-color: #333;
    --rating-color: #ffd700;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--border-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--accent-color);
    font-size: 24px;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(45deg, var(--accent-color), #ff6b6b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-box {
    flex: 1;
    max-width: 500px;
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--bg-secondary);
}

.search-box button {
    padding: 12px 24px;
    background: var(--accent-color);
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.search-box button:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 20px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

/* Hero Section */
.hero {
    padding: 60px 0 40px;
    text-align: center;
}

.hero-content h2 {
    font-size: 48px;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #fff, #b3b3b3);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 18px;
    color: var(--text-secondary);
}

/* Filters */
.filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 30px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-btn:hover {
    border-color: var(--accent-color);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

/* Movies Grid */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
    min-height: 400px;
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 100px 20px;
    font-size: 24px;
    color: var(--text-secondary);
}

.loading i {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.movie-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid var(--border-color);
    position: relative;
}

.movie-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(229, 9, 20, 0.3);
    border-color: var(--accent-color);
}

.movie-card img {
    width: 100%;
    height: 375px;
    object-fit: cover;
    display: block;
}

.movie-card .no-image {
    width: 100%;
    height: 375px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 48px;
}

.movie-info {
    padding: 20px;
}

.movie-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.movie-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
    line-height: 1.3;
    flex: 1;
}

.rating {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 215, 0, 0.2);
    padding: 5px 10px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.rating i {
    color: var(--rating-color);
}

.movie-date {
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.movie-overview {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
}

.page-btn {
    padding: 12px 24px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-btn:hover:not(:disabled) {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    padding: 12px 24px;
    background: var(--accent-color);
    border-radius: 25px;
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--bg-secondary);
    margin: 2% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.close:hover {
    background: var(--accent-color);
    transform: rotate(90deg);
}

.modal-body {
    padding: 40px;
}

.modal-backdrop {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
}

.modal-details {
    padding: 30px;
}

.modal-details h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.modal-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.meta-item i {
    color: var(--accent-color);
}

.modal-overview {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin: 20px 0;
}

.genres {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.genre-tag {
    background: var(--accent-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

/* Player */
.player-container {
    margin: 30px 0;
}

.play-button {
    width: 100%;
    padding: 20px;
    background: linear-gradient(45deg, var(--accent-color), #ff6b6b);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.play-button:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(229, 9, 20, 0.5);
}

.play-button i {
    font-size: 24px;
}

#playerFrame iframe {
    width: 100%;
    min-height: 500px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: 30px 0;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

footer p {
    color: var(--text-secondary);
    margin: 10px 0;
}

.tmdb-credit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-box {
        width: 100%;
        max-width: 100%;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
    }
    
    .hero-content h2 {
        font-size: 32px;
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 20px;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .modal-backdrop {
        height: 250px;
    }
    
    .modal-details h2 {
        font-size: 24px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* Watch Page Styles */
.back-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s;
}

.back-button:hover {
    background: var(--accent-color);
    transform: translateX(-5px);
}

.watch-container {
    padding: 40px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.loading-watch {
    text-align: center;
    padding: 100px 20px;
    font-size: 24px;
    color: var(--text-secondary);
}

.loading-watch i {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.player-wrapper {
    width: 100%;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    margin-bottom: 40px;
}

.player-wrapper iframe {
    width: 100%;
    min-height: 600px;
    display: block;
}

.watch-info {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 40px;
    border: 1px solid var(--border-color);
}

.watch-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 20px;
    gap: 20px;
}

.watch-header h1 {
    font-size: 36px;
    margin-bottom: 15px;
    line-height: 1.2;
}

.watch-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 16px;
}

.watch-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.watch-meta i {
    color: var(--accent-color);
}

.rating-large {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 215, 0, 0.2);
    padding: 15px 25px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 24px;
    white-space: nowrap;
}

.rating-large i {
    color: var(--rating-color);
    font-size: 28px;
}

.watch-overview {
    margin: 30px 0;
}

.watch-overview h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.watch-overview p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.watch-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.detail-item h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-item h4 i {
    color: var(--accent-color);
}

.detail-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Responsive Watch Page */
@media (max-width: 768px) {
    .player-wrapper iframe {
        min-height: 400px;
    }
    
    .watch-info {
        padding: 20px;
    }
    
    .watch-header {
        flex-direction: column;
    }
    
    .watch-header h1 {
        font-size: 24px;
    }
    
    .rating-large {
        font-size: 18px;
        padding: 10px 20px;
    }
    
    .watch-details {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .episodes-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Episode Selector */
#episodeSelector {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.episode-controls h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.season-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.season-selector label {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.season-selector label i {
    color: var(--accent-color);
}

.season-selector select {
    padding: 12px 20px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 150px;
}

.season-selector select:hover {
    border-color: var(--accent-color);
}

.season-selector select:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--bg-secondary);
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.episode-card {
    background: var(--bg-tertiary);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid var(--border-color);
    display: flex;
    gap: 15px;
    padding: 15px;
    position: relative;
}

.episode-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(229, 9, 20, 0.3);
}

.episode-card.active {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.1) 0%, var(--bg-tertiary) 100%);
}

.episode-card.active::before {
    content: '▶';
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--accent-color);
    font-size: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.episode-number {
    background: var(--accent-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.episode-info {
    flex: 1;
    min-width: 0;
}

.episode-info h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.episode-date,
.episode-runtime {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 13px;
    margin-right: 15px;
}

.episode-date i,
.episode-runtime i {
    color: var(--accent-color);
}

.episode-card img {
    width: 120px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.episode-placeholder {
    width: 120px;
    height: 70px;
    background: var(--bg-secondary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 24px;
    flex-shrink: 0;
}
.type-badge {
    background: linear-gradient(45deg, var(--accent-color), #ff6b6b);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(229, 9, 20, 0.3);
}
