body {
    background-color: #83FFE7;
    background-image: url("../assets/thumbnails/bg-diamante.svg");
}

.gamez-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0 15px;
    /* max-width: 1200px; Adjust as needed */
    gap: 20px;
}

.page-header {
    display: flex;
    /* Enables flexbox for horizontal alignment */
    justify-content: space-between;
    /* Pushes left and right content to opposite ends */
    align-items: center;
    /* Vertically centers items */
    width: 100%;
    /* Make header take full width of its parent */
    padding: 10px 0;
    /* Add some vertical padding */
    /* You can add a background color, border-bottom, etc. here if desired */
    /* background-color: #f0f0f0; */
    /* border-bottom: 1px solid #ccc; */
}

.header-left {
    display: flex;
    /* Use flex for potential multiple items on the left */
    align-items: center;
    margin-left: 20px;
}

.header-logo {
    height: 50px;
    /* Adjust logo size as needed */
    width: auto;
    /* Maintain aspect ratio */
    margin-right: 15px;
    /* Space between logo and any other potential left elements */
}

.header-right {
    display: flex;
    /* Use flex for search bar and button */
    align-items: center;
    margin-right: 20px;
    gap: 10px;
    /* Space between input and button */
}

.search-bar {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 20px;
    /* Rounded search bar */
    font-size: 1em;
    width: 200px;
    /* Adjust width as needed */
    outline: none;
    /* Remove default focus outline */
}

.search-bar:focus {
    border-color: #007bff;
    /* Highlight on focus */
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.search-button {
    padding: 8px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s ease;
}

.search-button:hover {
    background-color: #0056b3;
}

s .controls {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.controls h2 {
    margin-top: 0;
    color: #333;
}

.controls p {
    color: #666;
}

.grid {
    display: grid;
    margin-top: 120px;
    grid-template-columns: repeat(15, 1fr);
    /* 12 columns */
    /* grid-auto-rows: minmax(50px, auto); REMOVE or modify this for square items */
    gap: 16px;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.grid-item {
    background-color: #ddd;
    /* display: flex; REMOVE, or set to block and manage content positioning */
    /* flex-direction: column; */
    /* justify-content: center; */
    /* align-items: center; */
    border-radius: 16px;
    /* border: 3px solid #FFF; */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    /* Keep this */
    color: #fff;
    font-weight: bold;
    text-align: center;
    cursor: default;
    transition: transform 0.2s ease-in-out;

    /* --- Key changes for square items --- */
    width: 100%;
    /* Make item take full width of its grid cell */
    padding-bottom: 100%;
    /* This makes the height equal to the width */
    height: 0;
    /* Override default height to allow padding-bottom to control height */
}

.grid-item:hover {
    transform: scale(1.03);
}

.grid-item img, .grid-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    /* Crucial: Position content absolutely within the padded container */
    top: 0;
    left: 0;
}

.grid-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    /* Keep flex for centering text within overlay */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    /* Above image */
}

.grid-item:hover .overlay {
    opacity: 1;
}

.grid-item:hover .thumbnail-video {
    opacity: 1;
    /* Video shows on hover */
}

.grid-item .thumbnail-poster {
    opacity: 1;
    /* Poster visible by default */
    transition: opacity 0.3s ease;
}

.grid-item:hover .thumbnail-poster {
    opacity: 0;
    /* Poster hides on hover */
}


.grid-item .size-label {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    z-index: 2;
    /* Above overlay */
}

/* Specific styles for different sizes (optional, for visual distinction) */


.filler {
    background-color: #e0e0e0;
    color: #888;
    display: flex;
    /* Keep flex for centering filler text */
    justify-content: center;
    align-items: center;
    font-size: 0.9em;
    font-style: italic;
}

.filler img {
    opacity: 0.5;
    /* Make filler image slightly faded */
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    padding: 20px 0;
}

.category-card {
    background: white;
    border-radius: 15px;
    padding: 20px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 80px;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.category-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    background: transparent;
}

.category-content {
    flex: 1;
}

.category-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 12px;
    }

    .category-card {
        padding: 15px 12px;
        min-height: 70px;
    }

    .category-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .category-title {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.about-section {
    background: rgba(255, 255, 255, 0.98);
    padding: 40px;
    margin-bottom: 70px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-tag {
    display: inline-block;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #2c3e50, #3498db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-section {
    margin-bottom: 35px;
}

.content-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 2px;
}

.section-text {
    color: #555;
    line-height: 1.7;
    font-size: 1rem;
    text-align: justify;
    margin-bottom: 0;
}

.highlight {
    background: linear-gradient(120deg, #a8edea 0%, #fed6e3 100%);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(45deg, #f8f9ff, #f0f4ff);
    border-radius: 15px;
    border-left: 5px solid #667eea;
}

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

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #667eea;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.feature-text {
    font-size: 0.95rem;
    color: #555;
    font-weight: 500;
}

@media (max-width: 768px) {
    .about-section {
        padding: 25px;
    }

    .main-title {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 20px;
    }

    .feature-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body {
        padding: 20px 15px;
    }

    .about-section {
        padding: 20px;
    }

    .main-title {
        font-size: 1.7rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}