/* HT5PLAY Frontend Styles - Enhanced UI/UX */

/* --- Google Fonts (Optional - Example) --- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Orbitron:wght@500;700;900&display=swap');

/* --- Base & Reset --- */
:root {
    --primary-color: #e43f5a; /* Vibrant Red/Pink */
    --secondary-color: #1f4068; /* Dark Blue */
    --accent-color: #ffc107; /* Gold/Yellow */
    --light-text-color: #e0e0e0;
    --dark-text-color: #333;
    --bg-dark-primary: #1a1a2e; /* Dark Blue-Purple */
    --bg-dark-secondary: #162447; /* Darker Blue */
    --bg-dark-tertiary: #0b0c10; /* Very Dark (Footer) */
    --card-bg: #162447;
    --border-color: #1f4068;
    --font-body: 'Roboto', sans-serif;
    --font-heading: 'Orbitron', sans-serif; /* Gaming/Tech Font */
}

body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
    line-height: 1.7;
    background-color: var(--bg-dark-primary);
    color: var(--light-text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 16px;
}

*, *::before, *::after {
    box-sizing: inherit;
}

a {
    color: #87CEEB; /* Sky Blue for links */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
    text-decoration: none; /* Keep no underline on hover for cleaner look */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px; /* Subtle rounding for images */
}

.container {
    width: 90%;
    max-width: 1280px; /* Slightly wider for game content */
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    line-height: 1.3;
    font-weight: 700;
}

h1 { font-size: 2.8rem; text-shadow: 1px 1px 3px rgba(0,0,0,0.5); }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.8rem; }

p {
    margin-bottom: 1.2rem;
}

/* --- Navbar --- */
.navbar-custom {
    background-color: rgba(22, 36, 71, 0.85); /* Semi-transparent */
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary-color);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.navbar-custom .navbar-brand {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.8rem;
    color: var(--light-text-color);
    transition: transform 0.3s ease;
}
.navbar-custom .navbar-brand:hover {
    transform: scale(1.05);
    color: var(--accent-color);
}
.navbar-custom .navbar-brand img {
    max-height: 45px; /* Slightly larger logo */
    margin-right: 10px;
}
.navbar-custom .nav-link {
    color: var(--light-text-color);
    font-weight: 500; /* Orbitron medium */
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem !important;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.navbar-custom .nav-link:hover {
    color: #ffc107;
    background-color: #162447;
}
.navbar-custom .nav-link.active {
    color: var(--bg-dark-primary);
    background-color: var(--accent-color);
}
.navbar-toggler {
    border-color: rgba(255,255,255,0.2);
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(224, 224, 224, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}


/* --- Hero Section --- */
.hero-section {
    background: linear-gradient(rgba(26, 26, 46, 0.85), rgba(26, 26, 46, 0.95)), url('../assets/images/hero-bg-placeholder.jpg'); /* Add a placeholder or actual image */
    background-size: cover;
    background-position: center center;
    padding: 100px 20px 120px; /* More padding */
    text-align: center;
    color: #fff;
    border-bottom: 5px solid var(--primary-color);
}
.hero-section h1 {
    font-size: 3.8rem; /* Larger hero title */
    font-weight: 900; /* Orbitron Black */
    text-shadow: 2px 2px 5px rgba(0,0,0,0.7);
    margin-bottom: 25px;
    color: #fff; /* Override default heading color for hero */
}
.hero-section p {
    font-size: 1.4rem; /* Slightly larger hero subtitle */
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: var(--light-text-color);
}

/* --- Buttons --- */
.btn {
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 5px;
    padding: 10px 25px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.btn-custom-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
.btn-custom-primary:hover {
    background-color: #c0344c; /* Darker shade of primary */
    border-color: #c0344c;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.btn-sm.btn-custom-primary {
    padding: 8px 15px;
    font-size: 0.9rem;
}


/* --- Content Sections --- */
.content-section {
    padding: 50px 20px;
}
.content-section h2 { /* General section titles */
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 15px; /* Closer to sub-text */
}
.content-section > p { /* Sub-text for section titles */
    text-align: center;
    font-size: 1.1rem;
    color: #b0b0c0;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Game Grid & Cards --- */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* Slightly larger min for cards */
    gap: 25px;
}
.game-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}
.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 10px 25px rgba(var(--primary-color-rgb, 228, 63, 90), 0.4); /* Use RGB for colored shadow */
}
.game-card-link {
    display: block; /* Ensure link covers image area */
}
.game-card-img { /* Renamed from game-card img for specificity */
    width: 100%;
    height: 180px; /* Increased height */
    object-fit: cover;
    border-bottom: 3px solid var(--primary-color);
    transition: opacity 0.3s ease;
}
.game-card:hover .game-card-img {
    opacity: 0.85;
}
.game-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Make body grow to fill card */
}
.game-card-title {
    font-size: 1.2rem; /* Slightly larger */
    font-weight: 700; /* Orbitron Bold */
    color: var(--light-text-color);
    margin-bottom: 8px;
    margin-top: 0; /* Reset margin */
}
.game-card-title a {
    color: inherit;
    text-decoration: none;
}
.game-card-title a:hover {
    color: var(--accent-color);
}
.game-card-category {
    font-size: 0.85rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    font-family: var(--font-body); /* Use body font for category */
    font-weight: 700;
}

/* --- Footer --- */
.footer-custom {
    background-color: var(--bg-dark-tertiary);
    color: #c5c6c7;
    padding: 40px 0;
    margin-top: auto; /* Pushes footer to bottom */
    text-align: center;
    border-top: 3px solid var(--primary-color);
}
.footer-custom p {
    margin-bottom: 0.5rem;
}
.footer-custom a {
    color: #87CEEB; /* Sky Blue */
    margin: 0 10px;
}
.footer-custom a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* --- Page Specific Styles (e.g., page.php, post.php, game.php) --- */
.page-header-custom, .post-header-custom, .game-title-header {
    padding: 60px 20px;
    background: linear-gradient(rgba(31, 64, 104, 0.8), rgba(31, 64, 104, 0.9)), url('../assets/images/subheader-bg-placeholder.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    border-bottom: 5px solid var(--primary-color);
    margin-bottom: 30px; /* Space before content */
}
.page-header-custom h1, .post-header-custom h1, .game-title-header h1 {
    font-size: 3rem;
    color: #fff; /* Override for these headers */
}
.post-meta, .game-category-link {
    font-size: 1rem;
    color: var(--accent-color);
    font-family: var(--font-body);
}
.game-category-link {
    color: var(--accent-color) !important;
}

.article-content-section, .game-info-section { /* For page.php, post.php, game.php content areas */
    padding: 30px;
    background-color: rgba(22, 36, 71, 0.7); /* Semi-transparent card-bg */
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    margin-top: -40px; /* Overlap with header for depth */
    position: relative;
    z-index: 10;
}
.article-content-section article, .game-info-section {
    max-width: 800px;
    margin: 0 auto;
}
.article-content-section h2, .article-content-section h3,
.game-info-section h2 {
    color: var(--accent-color);
    margin-top: 1.8em;
    margin-bottom: 0.8em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.3em;
}
.article-content-section p, .game-info-section p {
    line-height: 1.8;
    margin-bottom: 1.2em;
    font-size: 1.05rem;
}
.article-content-section img, .game-info-section img { /* Images within content */
    margin: 1.5em auto;
    border: 3px solid var(--border-color);
}

/* Game Page Specific */
.game-container {
    border: 3px solid var(--primary-color);
    padding: 5px; /* Small padding around iframe */
}
.fullscreen-button {
    background-color: var(--primary-color) !important; /* Ensure it uses theme color */
    border: 1px solid var(--accent-color) !important;
    color: var(--light-text-color) !important;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}
.fullscreen-button:hover {
    opacity: 1;
    background-color: var(--accent-color) !important;
    color: var(--bg-dark-primary) !important;
}
.fullscreen-button .fas { /* If using Font Awesome icons */
    margin-right: 5px;
}

/* Blog Listing Specific */
.blog-post-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
}
.blog-post-card .card-img-top {
    height: 220px; /* Consistent image height for blog cards */
    object-fit: cover;
    border-bottom: 3px solid var(--primary-color);
}
.blog-post-card .card-title a {
    color: var(--light-text-color);
}
.blog-post-card .card-title a:hover {
    color: var(--accent-color);
}
.btn-read-more {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--light-text-color);
}
.btn-read-more:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--bg-dark-primary);
}

/* Pagination */
.pagination .page-link {
    background-color: var(--secondary-color);
    border-color: var(--border-color);
    color: var(--light-text-color);
    margin: 0 3px;
    border-radius: 4px;
    transition: all 0.3s ease;
}
.pagination .page-link:hover {
    background-color: var(--accent-color);
    color: var(--bg-dark-primary);
    border-color: var(--accent-color);
}
.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
.pagination .page-item.disabled .page-link {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: #6c757d;
}


/* --- Utility Classes (Keep or extend as needed) --- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem !important; } .mt-2 { margin-top: 1rem !important; } .mt-3 { margin-top: 1.5rem !important; } .mt-4 { margin-top: 2rem !important; } .mt-5 { margin-top: 3rem !important; }
.mb-1 { margin-bottom: 0.5rem !important; } .mb-2 { margin-bottom: 1rem !important; } .mb-3 { margin-bottom: 1.5rem !important; } .mb-4 { margin-bottom: 2rem !important; } .mb-5 { margin-bottom: 3rem !important; }
.pt-1 { padding-top: 0.5rem !important; } .pt-2 { padding-top: 1rem !important; } .pt-3 { padding-top: 1.5rem !important; } .pt-4 { padding-top: 2rem !important; } .pt-5 { padding-top: 3rem !important; }
.pb-1 { padding-bottom: 0.5rem !important; } .pb-2 { padding-bottom: 1rem !important; } .pb-3 { padding-bottom: 1.5rem !important; } .pb-4 { padding-bottom: 2rem !important; } .pb-5 { padding-bottom: 3rem !important; }

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    h1 { font-size: 2.4rem; }
    .hero-section h1 { font-size: 3rem; }
    .game-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    .hero-section h1 { font-size: 2.5rem; }
    .hero-section p { font-size: 1.2rem; }
    .content-section h2 { font-size: 2rem; }
    .game-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 15px;}
    .game-card-img { height: 150px; }
    .game-card-title { font-size: 1rem; }
    .navbar-custom .nav-link { padding: 0.5rem 0.8rem !important; }
    .article-content-section, .game-info-section { margin-top: -20px; padding: 20px; }
}

@media (max-width: 576px) {
    body { font-size: 15px; }
    h1 { font-size: 1.8rem; }
    .hero-section h1 { font-size: 2.2rem; }
    .hero-section { padding: 80px 15px 100px; }
    .content-section h2 { font-size: 1.8rem; }
    .game-grid { grid-template-columns: 1fr; } /* Single column on very small screens */
    .game-card-img { height: 200px; } /* Taller image for single column */
    .footer-custom { padding: 30px 15px; }
    .footer-custom a { margin: 0 5px; display: block; margin-bottom: 5px;}
}

/* Add a placeholder image for hero and subheaders if you don't have one yet */
/* Create a 1920x400px dark placeholder image and save as assets/images/hero-bg-placeholder.jpg */
/* Create a 1920x200px dark placeholder image and save as assets/images/subheader-bg-placeholder.jpg */