/*
Theme Name: My Movie Theme
Description: Theme xem phim online với giao diện tối
Version: 1.0
*/

/* Base Styles cho Dark Theme */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #111111 !important;
    color: #ffffff !important;
    line-height: 1.6;
}

/* CSS Variables - Dark Theme Only */
:root {
    --primary-bg: #111111;
    --secondary-bg: #1a1a1a;
    --card-bg: #222222;
    --border-color: #333333;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --accent-color: #555555;
    --hover-bg: #333333;
    --overlay-bg: rgba(0, 0, 0, 0.8);
}

/* Ensure Tailwind compatibility */
.movie-card .movie-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.movie-card:hover .movie-overlay {
    opacity: 1 !important;
}

/* Fix any conflicting styles */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Dark theme overrides for Tailwind */
.bg-gray-800 {
    background-color: #1f2937 !important;
}

.bg-gray-700 {
    background-color: #374151 !important;
}

.text-white {
    color: #ffffff !important;
}

.text-gray-300 {
    color: #d1d5db !important;
}

.text-gray-400 {
    color: #9ca3af !important;
}

.text-gray-500 {
    color: #6b7280 !important;
}

/* Remove yellow accent and use dark theme */
.bg-yellow-500,
.text-yellow-500,
.hover\\:bg-yellow-600:hover {
    background-color: #555555 !important;
    color: #ffffff !important;
}

.hover\\:text-yellow-500:hover {
    color: #cccccc !important;
}

/* Hide any stray HTML comments */
.movie-card {
    position: relative;
}

.movie-card::before {
    content: '';
    display: block;
}

/* Ensure clean rendering */
* {
    box-sizing: border-box;
}

/* Force dark theme colors */
.text-yellow-500,
.text-yellow-400 {
    color: #9ca3af !important;
}

.bg-yellow-500,
.bg-yellow-400 {
    background-color: #6b7280 !important;
    color: #ffffff !important;
}

.border-yellow-500 {
    border-color: #6b7280 !important;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
.top-bar {
    background-color: var(--secondary-bg);
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.header-main {
    background-color: var(--primary-bg);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.logo img {
    max-height: 50px;
}

.logo h1 {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: bold;
}

/* Navigation */
.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
}

.main-nav li {
    position: relative;
    margin-right: 30px;
}

.main-nav a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 10px 0;
    display: block;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--text-secondary);
}

/* Dropdown Menu */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--card-bg);
    min-width: 200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.main-nav li:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown ul {
    flex-direction: column;
    padding: 10px 0;
}

.dropdown li {
    margin: 0;
}

.dropdown a {
    padding: 8px 20px;
    border-bottom: 1px solid var(--border-color);
}

.dropdown a:hover {
    background-color: var(--hover-bg);
}

/* Search Bar */
.search-bar {
    position: relative;
}

.search-bar input {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 40px 10px 15px;
    border-radius: 25px;
    width: 300px;
    outline: none;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-bar button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    background-color: var(--card-bg);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999;
}

.mobile-menu ul {
    flex-direction: column;
    padding: 20px;
}

.mobile-menu li {
    margin: 0 0 15px 0;
}

/* Breadcrumb */
.breadcrumb {
    background-color: var(--secondary-bg);
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--text-primary);
}

/* Movie Card */
.movie-card {
    position: relative;
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.movie-card:hover {
    transform: translateY(-5px);
}

/* Ensure consistent card heights */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    align-items: stretch;
}

.movie-card .movie-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.movie-card .movie-poster {
    position: relative;
    overflow: hidden;
}

.movie-card img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.movie-card:hover img {
    transform: scale(1.05);
}

.movie-card .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.movie-card:hover .overlay {
    opacity: 1;
}

.movie-card .quality-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--accent-color);
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

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

.movie-card .movie-title {
    color: var(--text-primary);
    font-weight: bold;
    margin-bottom: 5px;
    text-decoration: none;
}

.movie-card .movie-title:hover {
    color: var(--text-secondary);
}

.movie-card .movie-meta {
    color: var(--text-muted);
    font-size: 14px;
}

/* Player */
.movie-player {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.player-container {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    background-color: #000;
}

.player-container iframe,
.player-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.player-controls {
    padding: 15px;
    background-color: var(--secondary-bg);
}

.server-selector,
.episode-selector {
    margin-bottom: 15px;
}

.server-selector select,
.episode-selector select {
    background-color: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 5px;
    margin-right: 10px;
}

.episode-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.episode-btn {
    background-color: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.episode-btn:hover,
.episode-btn.active {
    background-color: var(--hover-bg);
    border-color: var(--accent-color);
}

/* Sidebar */
.sidebar-widget {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-widget h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

/* Footer */
.footer {
    background-color: var(--secondary-bg);
    border-top: 1px solid var(--border-color);
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    margin-top: 30px;
    text-align: center;
    color: var(--text-muted);
}

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

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

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

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

/* Animation Keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--hover-bg);
    color: var(--text-primary);
}

.btn-dark {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
}

.btn-dark:hover {
    background-color: var(--hover-bg);
}

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

.pagination a,
.pagination span {
    display: block;
    padding: 8px 15px;
    margin: 0 3px;
    background-color: var(--card-bg);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: var(--hover-bg);
}

.pagination .current {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 5px;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent-color);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: var(--text-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--hover-bg);
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
    }
    
    .search-bar input {
        width: 200px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .search-bar input {
        width: 150px;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* WordPress Specific */
.alignleft {
    float: left;
    margin-right: 20px;
}

.alignright {
    float: right;
    margin-left: 20px;
}

.aligncenter {
    text-align: center;
    margin: 0 auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-style: italic;
    text-align: center;
    color: var(--text-muted);
}

/* Comments */
.comments-area {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.comment-list {
    list-style: none;
}

.comment {
    background-color: var(--secondary-bg);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.comment-author {
    font-weight: bold;
    color: var(--text-primary);
}

.comment-meta {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 10px;
}

.comment-content {
    color: var(--text-secondary);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.p-10 { padding: 10px; }
.p-20 { padding: 20px; }
.p-30 { padding: 30px; }

.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Favorites */
.favorite-btn.favorited {
    background-color: #374151 !important;
}

.favorite-btn.favorited i {
    color: #ef4444 !important;
}

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

/* Sidebar */
.sidebar {
    max-height: fit-content;
}

.sidebar .bg-gray-800 {
    background-color: #1f2937 !important;
    border: 1px solid #374151;
}

.sidebar h3 {
    color: #f9fafb !important;
}

/* Notification */
.notification {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
