/*
Theme Name: Simple Movie Site
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: A simple and clean movie and TV show website powered by TMDB API
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: simple-movie-site
Tags: movie, tv, entertainment, responsive, simple, minimal
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
}

header {
    background-color: #fff;
    border-bottom: 2px solid #ddd;
    padding: 20px 0;
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav a {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #3498db;
}

.search-form {
    display: flex;
    gap: 10px;
}

.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    line-height: 1.8;
    font-size: 16px;
    color: #444;
}

.page-content h2 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 24px;
}

.page-content h3 {
    margin-top: 25px;
    margin-bottom: 12px;
    color: #34495e;
    font-size: 20px;
}

.page-content p {
    margin-bottom: 15px;
}

.page-content ul, .page-content ol {
    margin-left: 25px;
    margin-bottom: 15px;
}

.page-content li {
    margin-bottom: 8px;
}

.page-content a {
    color: #3498db;
    text-decoration: none;
}

.page-content a:hover {
    text-decoration: underline;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 200px;
}

.search-button {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.search-button:hover {
    background-color: #2980b9;
}

.section-title {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.movie-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.movie-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.image-placeholder {
    width: 100%;
    height: 270px;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

.movie-card-content {
    padding: 15px;
}

.movie-card-content h3 {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card--has-popup {
    position: relative;
}

.movie-card--has-popup::after {
    content: none;
}

.movie-card--has-popup .sm-popup-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e74c3c;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 5;
    pointer-events: none;
    line-height: 1.4;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.rating {
    color: #f39c12;
    font-size: 14px;
    margin-bottom: 5px;
}

.release-date {
    color: #7f8c8d;
    font-size: 12px;
}

.media-type {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-top: 8px;
}

.text-center {
    text-align: center;
    margin: 30px 0;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.page-title {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
}

footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

.movie-detail {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.movie-detail-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.movie-detail-poster {
    flex: 0 0 300px;
}

.movie-detail-poster img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.movie-detail-info {
    flex: 1;
}

.movie-detail-info h1 {
    font-size: 36px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.movie-detail-meta {
    color: #7f8c8d;
    margin-bottom: 20px;
    font-size: 14px;
}

.movie-detail-overview {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
}

.movie-detail-section {
    margin-top: 30px;
}

.movie-detail-section h3 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.cast-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.cast-item {
    text-align: center;
}

.cast-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}

.cast-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
}

.cast-item-character {
    font-size: 12px;
    color: #7f8c8d;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.pagination a,
.pagination span {
    padding: 8px 16px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.pagination a:hover {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination .current {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.video-section {
    margin-top: 30px;
}

.video-section h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.video-player {
    position: relative;
    width: 100%;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.video-player iframe {
    width: 100%;
    height: 450px;
    border: none;
}

.video-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.video-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.video-btn:hover {
    background-color: #3498db;
    border-color: #3498db;
    color: white;
}

.video-btn.active {
    background-color: #3498db;
    border-color: #3498db;
    color: white;
}

.video-type {
    font-size: 12px;
    font-weight: 600;
    background-color: #ecf0f1;
    color: #7f8c8d;
    padding: 2px 8px;
    border-radius: 12px;
}

.video-btn:hover .video-type,
.video-btn.active .video-type {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.video-name {
    font-size: 14px;
    color: #333;
}

.video-btn:hover .video-name,
.video-btn.active .video-name {
    color: white;
}

.ad-section {
    margin: 30px 0;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
}

.ad-section .widget {
    margin-bottom: 0;
}

.ad-section .widget-title {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.ad-content {
    width: 100%;
    min-height: 100px;
}

.ad-content iframe,
.ad-content img {
    max-width: 100%;
}

.ad-card {
    background: #f8f9fa;
    border: 1px dashed #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ad-card::before {
    content: '🔥';
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 20px;
    font-weight: bold;
    color: #e74c3c;
    animation: adLabelBounce 1.5s ease-in-out infinite;
    z-index: 10;
}

.ad-card:hover {
    transform: scale(1.02);
    border-color: #e74c3c;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.3);
}

.ad-card .ad-section {
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

@keyframes adLabelBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
}

@keyframes adFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes adBorderFlash {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(52, 152, 219, 0.3);
    }
}

.ad-section {
    margin: 30px 0;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
}

.sm-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sm-popup-overlay.sm-popup-show {
    opacity: 1;
    visibility: visible;
}

.sm-popup-content {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.sm-popup-overlay.sm-popup-show .sm-popup-content {
    transform: scale(1);
}

.sm-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: none;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sm-popup-close:hover {
    background-color: rgba(0, 0, 0, 0.2);
    color: #e74c3c;
}

.sm-popup-ad-inner {
    padding: 20px;
}

.sm-popup-ad-inner iframe {
    width: 100%;
    height: 400px;
    border: none;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-form {
        width: 100%;
        justify-content: center;
    }
    
    .search-input {
        width: 100%;
        max-width: 300px;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .movie-card img {
        height: 210px;
    }
    
    .image-placeholder {
        height: 210px;
    }
    
    .movie-detail-header {
        flex-direction: column;
    }
    
    .movie-detail-poster {
        flex: 0 0 auto;
        max-width: 300px;
        margin: 0 auto;
    }
}