/* 
 * HT5PLAY - HTML5 Gaming Website
 * Main CSS Stylesheet
 * Client: Tahir Shahzad (support@ht5play.com)
 */

:root {
    --primary-color: #7b1fa2; /* Purple */
    --secondary-color: #ff4081; /* Pink */
    --dark-color: #1e1e2f; /* Dark Blue/Purple */
    --light-color: #f8f9fa; /* Light Gray */
    --accent-color: #00bcd4; /* Cyan */
    --success-color: #4caf50; /* Green */
    --warning-color: #ff9800; /* Orange */
    --danger-color: #f44336; /* Red */
    --gray-color: #6c757d; /* Gray */
    --dark-gray: #343a40; /* Dark Gray */
    --light-gray: #e9ecef; /* Light Gray */
}

/* ======= Base Styles ======= */
body {
    background-color: #121221;
    color: var(--light-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: var(--primary-color);
    color: var(--light-color);
}

/* ======= Header Styles ======= */
.site-header {
    background-color: var(--dark-color);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

.navbar-dark {
    padding: 10px 0;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--secondary-color) !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--secondary-color);
}

.dropdown-menu-dark {
    background-color: var(--dark-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-menu-dark .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
}

/* ======= Footer Styles ======= */
.site-footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 50px 0 0;
    margin-top: 50px;
}

.site-footer h5 {
    color: var(--secondary-color);
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light-color);
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--secondary-color);
    color: var(--light-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    margin-top: 30px;
    font-size: 0.9rem;
}

/* ======= Game Cards ======= */
.game-card {
    background-color: var(--dark-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    height: 100%;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.game-thumbnail {
    position: relative;
    overflow: hidden;
    padding-top: 75%; /* 4:3 Aspect Ratio */
}

.game-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.game-card:hover .game-thumbnail img {
    transform: scale(1.05);
}

.game-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.game-card:hover .game-card-overlay {
    opacity: 1;
}

.play-button {
    width: 60px;
    height: 60px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--light-color);
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.game-card:hover .play-button {
    transform: scale(1);
}

.game-info {
    padding: 15px;
}

.game-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.game-title a {
    color: var(--light-color);
}

.game-title a:hover {
    color: var(--secondary-color);
}

.game-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--gray-color);
}

/* ======= Featured Games Slider ======= */
.featured-games-section {
    margin-bottom: 40px;
}

.featured-game {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--dark-color);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
}

.featured-game-image {
    position: relative;
    height: 100%;
}

.featured-game-image img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.featured-game-content {
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-game-content h2 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.carousel-control-prev, .carousel-control-next {
    width: 5%;
    opacity: 0.8;
}

.carousel-control-prev-icon, .carousel-control-next-icon {
    background-color: var(--primary-color);
    padding: 25px;
    border-radius: 50%;
}

/* ======= Section Styles ======= */
.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-header h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-header p {
    color: var(--gray-color);
}

/* ======= Category Cards ======= */
.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    height: 150px;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.category-card a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    color: var(--light-color);
}

.category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.8);
}

.category-name {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
}

.category-name h3 {
    font-size: 1.2rem;
    margin: 0;
    text-align: center;
}

.category-pill {
    display: inline-block;
    padding: 5px 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    margin: 0 5px 10px 0;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.category-pill:hover {
    background-color: var(--secondary-color);
    color: var(--light-color);
}

/* ======= Game Detail Page ======= */
.game-detail-card {
    background-color: var(--dark-color);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.game-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: var(--gray-color);
    font-size: 0.9rem;
}

.game-meta a {
    color: var(--accent-color);
}

.game-frame-container {
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    background-color: #000;
}

.game-frame {
    position: relative;
    width: 100%;
}

.game-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.game-controls {
    display: flex;
    gap: 10px;
}

.game-description, .game-instructions {
    margin-top: 30px;
}

.game-description h3, .game-instructions h3 {
    font-size: 1.5rem;
    color: var(--light-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.description-content, .instructions-content {
    line-height: 1.8;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    display: inline-block;
    padding: 5px 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background-color: var(--secondary-color);
    color: var(--light-color);
}

.game-sidebar {
    position: sticky;
    top: 20px;
}

.related-games-widget, .categories-widget {
    background-color: var(--dark-color);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.related-games-widget h3, .categories-widget h3 {
    font-size: 1.3rem;
    color: var(--light-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.related-game-item {
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.related-game-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.related-game-item a {
    color: var(--light-color);
}

.related-game-info {
    padding: 5px 10px;
}

.related-game-info h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

/* ======= Blog Styles ======= */
.blog-card {
    background-color: var(--dark-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.blog-image {
    position: relative;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.5s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 20px;
}

.blog-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.blog-title a {
    color: var(--light-color);
}

.blog-title a:hover {
    color: var(--secondary-color);
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--gray-color);
    margin-bottom: 15px;
}

.blog-excerpt {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: 600;
}

.read-more i {
    transition: all 0.3s ease;
}

.read-more:hover i {
    transform: translateX(5px);
}

/* ======= Blog Post Detail ======= */
.blog-post-detail {
    background-color: var(--dark-color);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.post-title {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.post-meta {
    display: flex;
    gap: 20px;
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.post-featured-image {
    border-radius: 10px;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.post-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content h2, .post-content h3 {
    color: var(--secondary-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
}

.post-content blockquote {
    border-left: 4px solid var(--secondary-color);
    padding-left: 20px;
    margin-left: 0;
    font-style: italic;
    color: var(--gray-color);
}

.post-share {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-share-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-facebook {
    background-color: #3b5998;
    color: white;
}

.btn-twitter {
    background-color: #1da1f2;
    color: white;
}

.btn-whatsapp {
    background-color: #25d366;
    color: white;
}

.recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-post-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.recent-post-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.recent-post-item a {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--light-color);
}

.recent-post-item a:hover {
    color: var(--secondary-color);
}

.post-date {
    display: block;
    color: var(--gray-color);
}

/* ======= Search Page ======= */
.search-header {
    margin-bottom: 30px;
}

.search-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.search-form-large {
    max-width: 700px;
    margin: 0 auto;
}

.popular-searches {
    text-align: center;
    color: var(--gray-color);
}

.popular-searches a {
    margin: 0 5px;
}

.result-count {
    margin-bottom: 20px;
    color: var(--gray-color);
    font-size: 1.1rem;
}

/* ======= 404 Page ======= */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 0;
}

.error-code {
    font-size: 6rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 20px;
    line-height: 1;
}

.error-message {
    font-size: 1.5rem;
    color: var(--light-color);
    margin-bottom: 30px;
}

/* ======= Ad Containers ======= */
.ad-container {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    margin-bottom: 20px;
    overflow: hidden;
}

/* ======= Responsive Styles ======= */
@media (max-width: 991px) {
    .game-sidebar {
        position: static;
        margin-top: 30px;
    }
    
    .featured-game-content {
        padding: 20px;
    }
    
    .featured-game-content h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 767px) {
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .game-title, .post-title {
        font-size: 1.8rem;
    }
    
    .featured-game .row {
        flex-direction: column;
    }
    
    .featured-game-image {
        height: 200px;
    }
    
    .featured-overlay {
        justify-content: center;
    }
}

@media (max-width: 575px) {
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .game-title, .post-title {
        font-size: 1.5rem;
    }
    
    .blog-meta, .game-meta, .post-meta {
        flex-direction: column;
        gap: 5px;
    }
}
