/* assets/css/style.css */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* --- Basic Reset & Variables --- */
:root {
    --primary-bg: #121212;
    --secondary-bg: #1e1e1e;
    --card-bg: #282828;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --accent-color: #3b82f6;
    --border-color: #3a3a3a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--primary-bg);
    color: var(--text-primary);
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* --- Header & Footer (Placeholder Styles) --- */
header, footer {
    background-color: var(--secondary-bg);
    padding: 15px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}
header h1 {
    font-size: 1.8rem;
}
footer p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* --- Post Grid Layout (Homepage) --- */
.post-grid {
    display: grid;
    /* Mobile: 2 columns */
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.post-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background-color: var(--card-bg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    aspect-ratio: 2 / 3; /* Movie poster aspect ratio */
}

.post-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.post-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 10px 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.post-title {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin: 0;
}

/* --- View Count Badge on Post Card --- */
.view-count-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2; /* Ensures it's above the thumbnail */
}
/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.pagination a {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-secondary);
    transition: background-color 0.2s, color 0.2s;
}

.pagination a:hover,
.pagination a.active {
    background-color: var(--accent-color);
    color: var(--text-primary);
    border-color: var(--accent-color);
}

/* --- Watch Page --- */
.watch-page-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}

.notice-bar {
    background-color: #ffc107;
    color: #000;
    padding: 8px;
    font-weight: 500;
    margin-bottom: 15px;
    border-radius: 5px;
}

.video-player-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.video-info h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.video-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.video-parts {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.video-parts h4 {
    margin-right: 10px;
    align-self: center;
}

.part-button {
    background-color: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.part-button.active, .part-button:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.suggested-videos {
    margin-top: 20px;
}

/* --- Media Queries for Responsiveness --- */

/* Tablet */
@media (min-width: 600px) {
    .post-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Small Desktop */
@media (min-width: 900px) {
    .post-grid {
        /* স্বয়ংক্রিয়ভাবে কলাম সংখ্যা ঠিক করবে */
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    .post-title {
        font-size: 1rem;
    }
    .video-info h1 {
        font-size: 1.8rem;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .post-grid {
        gap: 20px;
    }
}