/*
Theme Name: D27 Gaming Theme
Description: A modern, lightweight WordPress theme designed specifically for Geometry Dash gaming websites. Features custom game post types, optimized performance, comprehensive SEO, and fully customizable navigation and sidebar through WordPress Customizer.
Author: D27 Gaming
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: d27-gaming
Tags: gaming, games, entertainment, custom-post-types, responsive-design, seo-ready, performance-optimized
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #1a1a2e;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
}

/* Header Styles */
.site-header {
    background: rgba(0, 0, 0, 0.9);
    padding: 1rem 0;
    position: relative;
    backdrop-filter: blur(10px);
    z-index: 10000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.site-title {
    color: #00d4ff;
    font-size: 2rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-logo {
    font-size: 2.5rem;
}

/* Navigation */
.main-navigation {
    position: relative;
    z-index: 10001;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.main-navigation a:hover {
    background: #00d4ff;
    color: #000;
}

/* Dropdown Menu Styles */
.dropdown-menu {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

.dropdown-link {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.98);
    border: 1px solid rgba(0, 212, 255, 0.5);
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 99999;
}

.dropdown-link--menu {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
}

.dropdown-menu:hover .dropdown-link {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link li {
    margin: 0;
}

.dropdown-link a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 0;
}

.dropdown-link a:hover {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    padding-left: 2rem;
}

.dropdown-link li:last-child a {
    border-bottom: none;
}

/* Search Box */
.search-box {
    position: relative;
}

.search-box input {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 200px;
}

.search-box input::placeholder {
    color: #ccc;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

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

/* Game Box & Game Frame - Same Size */
#game-box,
.game-frame {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 1136.02px;
    height: 711.38px;
    margin: 0 auto;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.game-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: none;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    border: none;
    border-radius: 15px;
    width: 200px;
    height: 80px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.play-button:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.6);
    background: linear-gradient(45deg, #0099cc, #00d4ff);
}

.play-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background-image: var(--game-thumbnail);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    opacity: 0.8;
    z-index: 1;
}

.play-button.has-thumbnail::before {
    display: block;
}

.play-button:not(.has-thumbnail)::before {
    display: none;
}

.play-button .play-text {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
    margin-left: 40px;
}

/* Game Controls Box Below Frame */
.game-controls-box {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    max-width: 1136.02px;
    margin: 2rem auto 2rem auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.game-title {
    flex: 1;
    min-width: 200px;
}

.game-title h1 {
    color: #fff;
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    text-align: left;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.game-action-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.action-btn {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    min-width: 120px;
    text-align: center;
    justify-content: center;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.4);
    background: linear-gradient(45deg, #0099cc, #00d4ff);
}

.action-btn.fullscreen-btn {
    background: linear-gradient(45deg, #ff6b00, #cc5500) !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 999 !important;
}

.action-btn.fullscreen-btn:hover {
    background: linear-gradient(45deg, #cc5500, #ff6b00);
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.4);
}







/* Two Column Layout */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.game-description {
    background: rgba(0, 0, 0, 0.8);
    padding: 2rem;
    border-radius: 10px;
    color: #fff;
}

.game-description h2 {
    color: #00d4ff;
    margin-bottom: 1rem;
}

.game-stats {
    margin: 1.5rem 0;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.game-content {
    margin-top: 2rem;
}



.game-tags {
    margin: 1rem 0;
}

.tag {
    display: inline-block;
    background: #00d4ff;
    color: #000;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin: 0.2rem;
    text-decoration: none;
}

.popular-games {
    background: rgba(0, 0, 0, 0.8);
    padding: 2rem;
    border-radius: 10px;
}

.popular-games h3 {
    color: #00d4ff;
    margin-bottom: 1rem;
}

.popular-game-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
}

.popular-game-item:hover {
    background: rgba(0, 212, 255, 0.2);
}

.popular-game-thumb {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    margin-right: 1rem;
    object-fit: cover;
}

/* Latest Games Section */
.latest-games-section {
    margin-top: 4rem;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.latest-games-section h2 {
    color: #00d4ff;
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    padding-bottom: 1rem;
}

.view-all-games {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    color: #000;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.4);
    color: #000;
}

.btn-primary {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    color: #000;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0099cc, #00d4ff);
    color: #000;
}

/* Games Grid - Square Cards */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
    justify-items: center;
}

.game-card {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #fff;
    width: 178px;
    height: 231px;
    display: flex;
    flex-direction: column;
}

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

.game-card img,
.game-thumbnail img {
    width: 100%;
    height: 178px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.game-thumbnail {
    width: 100%;
    height: 178px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.game-card-content {
    padding: 0.75rem 0.5rem;
    height: 53px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-shrink: 0;
}

.game-card h3 {
    color: #fff;
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Hide meta information in square cards */
.game-card .game-meta,
.game-card .game-tags,
.game-card .rating,
.game-card .plays {
    display: none;
}



.comments-section h3 {
    color: #00d4ff;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Comment Form Styling */
.comment-form-container {
    margin-bottom: 2rem;
}

.comment-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.comment-form-field {
    margin-bottom: 1rem;
}

.comment-form-field label {
    display: block;
    margin-bottom: 0.5rem;
    color: #00d4ff;
    font-weight: 600;
}

.comment-form-field input,
.comment-form-field textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-family: inherit;
}

.comment-form-field input:focus,
.comment-form-field textarea:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.submit-btn {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.4);
}

/* Comments List */
.comments-list-container {
    margin-top: 2rem;
}

.comments-list {
    list-style: none;
    padding: 0;
}

.comment {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comment-author-avatar {
    border-radius: 50%;
    border: 2px solid #00d4ff;
}

.comment-author-name {
    font-weight: 600;
    color: #00d4ff;
}

.comment-meta {
    color: #ccc;
    font-size: 0.9rem;
}

.comment-content {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.comment-reply-link {
    color: #00d4ff;
    text-decoration: none;
    font-size: 0.9rem;
}

.comment-reply-link:hover {
    color: #fff;
}

/* Footer */
.site-footer {
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-links {
    margin: 1rem 0;
}

.footer-links a {
    color: #00d4ff;
    text-decoration: none;
    margin: 0 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    .dropdown-link {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        min-width: auto;
    }

    .dropdown-menu:hover .dropdown-link {
        transform: none;
    }

    .dropdown-toggle {
        display: none;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    #game-box,
    .game-frame {
        max-width: 100%;
        height: 480px;
        padding: 1rem;
    }

    .game-controls-box {
        max-width: 100%;
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }

    .game-title h1 {
        font-size: 1.4rem;
        text-align: center;
        margin-bottom: 1rem;
    }

    .game-action-buttons {
        justify-content: center;
    }

    .play-button {
        width: 180px;
        height: 70px;
        font-size: 1.3rem;
    }

    .play-button::before {
        width: 50px;
        height: 50px;
        left: 15px;
    }

    .play-button .play-text {
        margin-left: 30px;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 2rem;
}

/* Games Page Styles */
.games-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
}

.games-header .page-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.games-filter-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-link {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-link:hover,
.filter-link.active {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.no-games-found {
    text-align: center;
    padding: 60px 20px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    margin: 40px 0;
    color: white;
}

.no-games-found h2 {
    color: #00d4ff;
    margin-bottom: 15px;
}

.no-games-found p {
    color: #ccc;
    font-size: 16px;
}

.pagination-wrapper {
    margin-top: 40px;
    text-align: center;
}

.pagination-wrapper .page-numbers {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 10px;
}

.pagination-wrapper .page-numbers li {
    margin: 0;
}

.pagination-wrapper .page-numbers a,
.pagination-wrapper .page-numbers span {
    display: block;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.pagination-wrapper .page-numbers a:hover,
.pagination-wrapper .page-numbers .current {
    background: #00d4ff;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

/* Responsive adjustments for games page */
@media (max-width: 768px) {
    .games-header .page-title {
        font-size: 2rem;
    }

    .games-filter-nav {
        gap: 10px;
    }

    .filter-link {
        padding: 8px 16px;
        font-size: 14px;
    }
}
