/* Main background */
body {
    background-color: #1e3d4a;
    font-family: 'Mitr', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Game hub wrapper and title container */
.game-hub-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px;
    padding: 0 20px;
    animation: fadeIn 0.8s ease-out;
    margin: 40px 0;
}

.title-container {
    background: linear-gradient(135deg, #f47b20 0%, #ff9f4d 100%);
    border-radius: 25px;
    padding: 15px 50px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.title {
    color: white;
    font-size: 2.8rem;
    font-weight: bold;
    margin: 0;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* The bubble at the top with "GameHub" text */
.gamehub-bubble {
    background-color: #E57010;
    border-radius: 20px;
    padding: 0.75rem 2rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    position: absolute;
    min-width: fit-content;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    transition: all 0.3s ease;
}

.gamehub-bubble span {
    font-weight: 700;
    font-size: 2.0rem;
    color: #fff;
    transition: font-size 0.3s ease;
    text-align: center;
    text-wrap: nowrap;
}

/* Game hub main container */
.game-hub {
    background-color: #f47b20;
    border-radius: 25px;
    color: white;
    padding: 90px 40px 40px;
    text-align: center;
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Subtitle styling */
.main-subtitle {
    font-size: 2.2rem;
    margin-bottom: 5px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    margin-top: -20px;
}

.sub-subtitle {
    font-size: 1.6rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Games container */
.games-container {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 20px;
}

/* Game option styling */
.game-option {
    text-align: center;
    transition: transform 0.3s ease;
}

.game-option:hover {
    transform: translateY(-5px);
}

.game-label {
    font-size: 1.3rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.game-label i {
    color: #a7d1e7;
}

.game-name {
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

/* Game preview box */
.game-box {
    width: 220px;
    height: 220px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    margin: 0 auto 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.game-box:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
}

.game-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Game image styling */
.game-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.3s ease;
    display: block !important;
}

/* Placeholder icon styling */
.placeholder-icon {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease;
    display: none;
}

.game-image:not([src]) + .placeholder-icon,
.game-image[src=""] + .placeholder-icon {
    display: block;
}

.game-box:hover .game-image {
    transform: scale(1.1);
}

/* Select button styling */
.select-btn {
    background-color: #a7d1e7;
    border: none;
    border-radius: 25px;
    color: #1e3d4a;
    font-size: 1.2rem;
    padding: 12px 35px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.select-btn:hover {
    background-color: #86b8d4;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    color: #1e3d4a;
}

.select-btn i {
    transition: transform 0.3s ease;
}

.select-btn:hover i {
    transform: translateX(5px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .game-hub-wrapper {
        max-width: 800px;
    }

    .games-container {
        gap: 40px;
    }

    .game-box {
        width: 200px;
        height: 200px;
    }

    .gamehub-bubble {
        padding: 0.7rem 1.8rem;
    }

    .gamehub-bubble span {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .game-hub-wrapper {
        max-width: 600px;
        padding: 0 15px;
        margin: 35px 0;
    }

    .game-hub {
        padding: 80px 20px 30px;
        margin-top: 20px;
    }

    .title-container {
        padding: 12px 40px;
    }

    .title {
        font-size: 2.2rem;
    }

    .main-subtitle {
        font-size: 1.8rem;
    }

    .sub-subtitle {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    .games-container {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .game-option {
        width: 100%;
        max-width: 300px;
    }

    .game-box {
        width: 200px;
        height: 200px;
    }

    .game-name {
        font-size: 1.8rem;
    }

    .select-btn {
        padding: 10px 25px;
        font-size: 1.1rem;
    }

    .gamehub-bubble {
        padding: 0.6rem 1.6rem;
        border-radius: 16px;
        top: -20px;
    }

    .gamehub-bubble span {
        font-size: 1.6rem;
    }

    .placeholder-icon {
        font-size: 3.5rem;
    }

    .back-btn-container {
        margin-top: 25px;
    }

    .back-btn {
        font-size: 1.1rem;
        padding: 8px 20px;
    }
}

@media (max-width: 576px) {
    .game-hub-wrapper {
        max-width: 100%;
        padding: 0 10px;
        margin: 30px 0;
    }

    .game-hub {
        padding: 70px 15px 25px;
        border-radius: 20px;
    }

    .title-container {
        padding: 10px 30px;
        border-radius: 20px;
    }

    .title {
        font-size: 1.8rem;
    }

    .main-subtitle {
        font-size: 1.6rem;
    }

    .sub-subtitle {
        font-size: 1.2rem;
    }

    .game-option {
        max-width: 100%;
    }

    .game-box {
        width: 180px;
        height: 180px;
    }

    .game-preview i {
        font-size: 3rem;
    }

    .game-name {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }

    .game-label {
        font-size: 1.1rem;
    }

    .select-btn {
        padding: 8px 20px;
        font-size: 1rem;
    }

    .gamehub-bubble {
        padding: 0.5rem 1.4rem;
        border-radius: 14px;
        top: -18px;
    }

    .gamehub-bubble span {
        font-size: 1.4rem;
    }

    .placeholder-icon {
        font-size: 3rem;
    }

    .back-btn-container {
        margin-top: 20px;
    }

    .back-btn {
        font-size: 1rem;
        padding: 7px 18px;
    }
    
    .back-btn i {
        font-size: 1rem;
    }
}

@media (max-width: 375px) {
    .game-hub-wrapper {
        margin: 25px 0;
    }

    .title-container {
        padding: 8px 25px;
    }

    .title {
        font-size: 1.6rem;
    }

    .main-subtitle {
        font-size: 1.4rem;
    }

    .sub-subtitle {
        font-size: 1.1rem;
    }

    .game-box {
        width: 160px;
        height: 160px;
    }

    .game-preview i {
        font-size: 2.5rem;
    }

    .game-name {
        font-size: 1.4rem;
    }

    .game-label {
        font-size: 1rem;
    }

    .select-btn {
        padding: 7px 18px;
        font-size: 0.9rem;
    }

    .gamehub-bubble {
        padding: 0.4rem 1.2rem;
        border-radius: 12px;
        top: -15px;
    }

    .gamehub-bubble span {
        font-size: 1.2rem;
    }

    .game-hub {
        padding: 60px 10px 20px;
    }

    .placeholder-icon {
        font-size: 2.5rem;
    }

    .back-btn-container {
        margin-top: 15px;
    }

    .back-btn {
        font-size: 0.9rem;
        padding: 6px 15px;
    }
    
    .back-btn i {
        font-size: 0.9rem;
    }
}

/* Touch device specific styles */
@media (hover: none) and (pointer: coarse) {
    .game-option:hover {
        transform: none;
    }

    .game-box:hover {
        transform: none;
        border-color: rgba(255, 255, 255, 0.2);
    }

    .select-btn:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    .select-btn:active {
        transform: scale(0.98);
    }
}

/* Back button styling */
.back-btn-container {
    margin-top: 30px;
    text-align: center;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 10px 25px;
    background-color: #E57010;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background-color: #d66000;
    transform: translateX(-5px);
    color: #fff;
}

.back-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.back-btn:hover i {
    transform: translateX(-3px);
}