/* MapTechData Movies - Main Stylesheet */
/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #e50914;
    --secondary-color: #221f1f;
    --text-color: #ffffff;
    --bg-color: #141414;
    --card-bg: #2f2f2f;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar Styles */
.navbar {
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 10%, transparent);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background: var(--secondary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    gap: 20px;
}

.nav-brand {
    flex-shrink: 0;
}

.nav-brand .site-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav-brand .site-title {
    color: var(--primary-color);
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-brand .site-title:hover {
    opacity: 0.8;
}

/* Navigation Toggle Button */
.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s;
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Search Form */
.nav-search {
    display: flex;
}

.search-form {
    display: flex;
    background: var(--card-bg);
    border-radius: 25px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.search-form:focus-within {
    border-color: var(--primary-color);
}

.search-input {
    background: none;
    border: none;
    padding: 10px 20px;
    color: var(--text-color);
    outline: none;
    width: 250px;
    font-size: 14px;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    background: var(--primary-color);
    border: none;
    padding: 10px 20px;
    color: var(--text-color);
    cursor: pointer;
    transition: opacity 0.3s;
}

.search-btn:hover {
    opacity: 0.8;
}

/* Main Content */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    padding: 20px 0;
}

/* Movie Sections */
.movie-section {
    margin: 40px 0;
}

.section-title {
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--text-color);
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

/* Movie Cards */
.movie-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    background: var(--card-bg);
    cursor: pointer;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(229, 9, 20, 0.3);
}

.movie-card a {
    text-decoration: none;
    color: var(--text-color);
    display: block;
}

.movie-poster {
    position: relative;
    padding-bottom: 150%;
    overflow: hidden;
    background: #1a1a1a;
}

.movie-poster img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.05);
}

.movie-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.movie-card:hover .movie-overlay {
    opacity: 1;
}

.movie-overlay i {
    font-size: 48px;
    color: var(--primary-color);
}

.movie-info {
    padding: 15px;
}

.movie-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-year {
    font-size: 14px;
    color: #999;
    margin-bottom: 5px;
}

.movie-rating {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #ffd700;
    font-size: 14px;
}

/* Advertisement Containers */
.ad-container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
    text-align: center;
    min-height: 90px;
}

.ad-header {
    margin-bottom: 20px;
}

.ad-footer {
    margin-top: 20px;
}

/* Footer */
.footer {
    background: var(--secondary-color);
    margin-top: 60px;
    padding: 40px 0 20px;
    border-top: 3px solid var(--primary-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.footer-section p {
    color: #ccc;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.3s, transform 0.3s;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #999;
    font-size: 14px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 80px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.empty-state h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.empty-state p {
    color: #999;
    font-size: 18px;
}

/* Search Header */
.search-header {
    margin: 30px 0;
}

.search-header h1 {
    font-size: 32px;
    color: var(--text-color);
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 40px;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--secondary-color);
        flex-direction: column;
        padding: 20px;
        display: none;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu a::after {
        display: none;
    }
    
    .nav-search {
        width: 100%;
        margin-top: 15px;
    }
    
    .search-input {
        width: 100%;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .movie-title {
        font-size: 14px;
    }
    
    .movie-info {
        padding: 10px;
    }
    
    .nav-brand .site-title {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 20px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .ad-container,
    .search-form {
        display: none;
    }
    
    .main-content {
        margin-top: 0;
    }
}