/* ========================================
   SCREENVERSE - LAYOUT FIXES
   ======================================== */

/* Fix long site names */
body {
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header improvements */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    gap: 1rem;
}

/* Logo fixes */
.logo {
    flex-shrink: 0;
    max-width: 250px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--primary);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.75rem;
    letter-spacing: 1px;
}

.logo-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.logo-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Navigation wrapper */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Nav menu improvements */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu > li > a {
    color: var(--text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: block;
    transition: 0.3s;
    border-radius: 5px;
}

.nav-menu > li > a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
    color: var(--primary);
    background: rgba(229, 9, 20, 0.1);
}

/* Dropdown submenus */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    min-width: 220px;
    padding: 0.5rem 0;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-menu li:hover > .sub-menu,
.nav-menu li.focus > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu li {
    width: 100%;
    position: relative;
}

.nav-menu .sub-menu a {
    padding: 0.75rem 1.5rem;
    display: block;
    white-space: nowrap;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.nav-menu .sub-menu a:hover {
    background: var(--bg);
    border-left-color: var(--primary);
    color: var(--text);
    padding-left: 1.75rem;
}

/* Dropdown indicator */
.nav-menu .menu-item-has-children > a::after {
    content: '▼';
    font-size: 0.65rem;
    margin-left: 0.5rem;
    opacity: 0.6;
    transition: 0.3s;
}

.nav-menu .menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

/* Actions container */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* Search box improvements */
.search-box {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-box input,
.search-form input[type="search"] {
    padding: 0.6rem 1rem;
    border: 2px solid var(--card-bg);
    background: var(--bg);
    color: var(--text);
    border-radius: 25px;
    width: 250px;
    outline: none;
    transition: 0.3s;
    font-size: 0.95rem;
}

.search-box input:focus,
.search-form input[type="search"]:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

.search-box button,
.search-form button {
    background: var(--primary);
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text);
    transition: 0.3s;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box button:hover,
.search-form button:hover {
    background: #b00710;
    transform: scale(1.05);
}

/* Hero section improvements */
.hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.8)), 
                radial-gradient(circle at center, rgba(229, 9, 20, 0.1), transparent);
    background-size: cover;
    background-position: center;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4rem;
    margin-bottom: 1rem;
    letter-spacing: 3px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Movie card improvements */
.movie-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    transition: 0.3s;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.movie-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.movie-poster {
    position: relative;
    width: 100%;
    height: 330px;
    overflow: hidden;
    background: var(--bg);
}

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

/* Placeholder for missing images */
.movie-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
}

.placeholder-icon {
    font-size: 4rem;
    opacity: 0.3;
    filter: grayscale(100%);
}

.placeholder-title {
    color: var(--text-secondary);
    font-size: 1rem;
    text-align: center;
    font-weight: 600;
    word-wrap: break-word;
    max-width: 100%;
    line-height: 1.4;
}

/* Movie info section */
.movie-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.movie-info h3 {
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.4;
    min-height: 2.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-info .rating {
    color: var(--accent);
    font-weight: bold;
    font-size: 0.95rem;
}

.movie-info .genre {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.3;
}

/* Footer improvements */
.footer-section h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 1rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Social links text style */
.social-links-text {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.social-link-text {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    border-bottom: 1px solid transparent;
    display: block;
    font-size: 0.95rem;
}

.social-link-text:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
    padding-left: 0.5rem;
}

.social-link-text::before {
    content: '▶';
    margin-right: 0.5rem;
    font-size: 0.7rem;
    opacity: 0.6;
    transition: 0.3s;
}

.social-link-text:hover::before {
    opacity: 1;
    color: var(--primary);
}

.footer-newsletter {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-newsletter h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--accent);
}

.footer-newsletter p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 0;
    flex-direction: row;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 4px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    overflow: hidden;
}

.newsletter-form:focus-within {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.3);
}

.newsletter-form input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border-radius: 25px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
    transition: 0.3s;
}

.newsletter-form input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.newsletter-form input:focus::placeholder {
    opacity: 0.5;
}

.newsletter-form button {
    padding: 0.875rem 1.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

.newsletter-form button:hover {
    background: #c40812;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.5);
}

.newsletter-form button:active {
    transform: translateY(0);
}

/* Newsletter icon/badge */
.footer-newsletter h4::before {
    content: '📧';
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* Loading state for button */
.newsletter-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Newsletter success message (for future use) */
.newsletter-message {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.newsletter-message.success {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.newsletter-message.error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Responsive Improvements */
@media (max-width: 991px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 70px);
        background: var(--card-bg);
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s ease;
        z-index: 999;
        box-shadow: 2px 0 20px rgba(0,0,0,0.5);
        overflow-y: auto;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    /* Mobile menu styles */
    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .nav-menu > li > a {
        padding: 1rem;
        width: 100%;
    }
    
    /* Mobile dropdown */
    .nav-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(0, 0, 0, 0.3);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav-menu li:hover > .sub-menu,
    .nav-menu li.open > .sub-menu {
        max-height: 500px;
    }
    
    .nav-menu .sub-menu a {
        padding: 0.75rem 1rem 0.75rem 2rem;
        border-left: 3px solid transparent;
    }
    
    .nav-menu .menu-item-has-children > a::after {
        float: right;
        transform: rotate(-90deg);
    }
    
    .nav-menu .menu-item-has-children.open > a::after {
        transform: rotate(0deg);
    }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap;
    }
    
    .logo a {
        font-size: 1.5rem;
    }
    
    .logo-icon {
        font-size: 1.75rem;
    }
    
    .search-box {
        order: 3;
        width: 100%;
        margin-top: 1rem;
    }
    
    .search-box input,
    .search-form input[type="search"] {
        width: 100%;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Footer responsive */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-section {
        text-align: left;
    }
    
    .social-links-text {
        gap: 0.5rem;
    }
    
    .footer-newsletter {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
    
    /* Newsletter responsive */
    .newsletter-form {
        flex-direction: column;
        border-radius: 15px;
        padding: 8px;
    }
    
    .newsletter-form input {
        padding: 0.875rem 1rem;
        text-align: center;
    }
    
    .newsletter-form button {
        width: 100%;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .logo a {
        font-size: 1.25rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .movie-poster {
        height: 280px;
    }
    
    .placeholder-icon {
        font-size: 3rem;
    }
}

/* Dark mode toggle styling */
.dark-mode-toggle {
    background: var(--card-bg);
    border: 2px solid var(--primary);
    color: var(--text);
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.3s;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-mode-toggle:hover {
    background: var(--primary);
    transform: scale(1.05);
}

/* Section spacing */
section {
    padding: 3rem 0;
}

section h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Fix overflow issues */
* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}
