@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap');

:root {
    --bg-primary: #0a0a0c;
    --bg-secondary: #1a1a1c;
    --bg-tertiary: #2a2a2c;
    --accent: #e50914; /* Solid Red */
    --text-main: #ffffff;
    --text-muted: #999999;
    --border: #333333;
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Header Redesign */
.main-header {
    background: #000;
    border-bottom: 2px solid var(--accent);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2%;
    max-width: 1600px;
    margin: 0 auto;
}

.portal-logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -1px;
    text-transform: uppercase;
}

.logo-badge {
    background: #fff;
    color: #000;
    padding: 0 4px;
    margin-left: 2px;
}

.header-search {
    flex: 0 1 400px;
}

.header-search form {
    display: flex;
    background: #222;
    border: 1px solid #333;
    border-radius: var(--radius);
    overflow: hidden;
}

.header-search input {
    width: 100%;
    padding: 0.6rem 1rem;
    background: transparent;
    border: none;
    color: white;
    outline: none;
}

.header-search button {
    background: #333;
    border: none;
    color: white;
    padding: 0 1rem;
    cursor: pointer;
}

.admin-link a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    border: 1px solid #333;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius);
}

/* Site Notice */
.site-notice {
    background: #111;
    border-bottom: 1px solid #222;
    padding: 10px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #888;
}

/* Category Bar */
.primary-nav {
    background: #111;
    border-bottom: 1px solid #222;
}

.primary-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    max-width: 1600px;
    margin: 0 auto;
    overflow-x: auto;
}

.primary-nav a {
    display: block;
    padding: 0.8rem 1.2rem;
    color: #ccc;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
}

.primary-nav a:hover, .primary-nav a.active {
    color: var(--accent);
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 40px 2% 20px;
}

.home-h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 10px;
    color: #fff;
}

.home-p {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Movie Grid - 5 Desktop, 2 Mobile */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    padding: 10px 2%;
    max-width: 1600px;
    margin: 0 auto;
}

.movie-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid #2a2a2c;
}

.movie-card:hover {
    border-color: var(--accent);
    background: #2a2a2c;
}

.movie-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
}

.movie-info {
    padding: 10px;
}

.movie-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

/* Review Page */
.review-header {
    height: 40vh;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 2rem 5%;
}

.review-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: brightness(0.3);
}

.review-content {
    max-width: 900px;
    margin: 20px auto 4rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid #333;
}

.review-text {
    font-size: 1rem;
    color: #ddd;
    line-height: 1.7;
}

.review-text h2 {
    color: #fff;
    border-left: 4px solid var(--accent);
    padding-left: 15px;
    margin: 30px 0 15px;
    font-size: 1.4rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 30px 0;
}

.page-link {
    padding: 8px 15px;
    background: #222;
    border: 1px solid #333;
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.page-link:hover {
    background: #333;
    border-color: var(--accent);
}

.page-link.active {
    background: var(--accent);
    border-color: var(--accent);
}

/* Footer Rich Text */
.home-footer-rich-text {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 2%;
}

.rich-text-content {
    background: #111;
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid #222;
    font-size: 0.95rem;
    color: #999;
}

.rich-text-content h2 { color: #fff; margin-bottom: 15px; }

/* Ad Containers */
.ad-container {
    text-align: center;
    margin: 20px 0;
    background: #111;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #333;
}

/* Footer */
footer {
    background: #000;
    padding: 40px 2%;
    border-top: 1px solid #222;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
}

footer a {
    color: #888;
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover { color: var(--accent); }

/* Mobile Responsibility */
@media (max-width: 768px) {
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 5px;
    }
    
    .home-h1 { font-size: 1.8rem; }
    .hero-section { padding: 30px 15px 15px; }
    
    .top-bar { 
        padding: 0.8rem 15px; 
        flex-direction: column;
        gap: 15px;
    }
    .portal-logo { font-size: 1.4rem; }
    
    .header-search { 
        display: block; 
        width: 100%;
        flex: 1 1 100%;
    }
}
