/* Game Page Specific Styles */

/* Game Header Styles */
.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    padding: 10px 20px;
    background-color: #333;
    border-radius: 5px;
    font-size: 0.5em;
    transition: background-color 0.3s ease;
    color: white;
    text-decoration: none;
}

.back-link:hover {
    background-color: #555;
}

/* Game Container Styles */
.game-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #333;
}

/* Unity Canvas and Controls */
#unity-container {
    width: 960px;
    height: 540px;
}

#unity-canvas {
    background: #231F20;
    width: 100%;
    height: 100%;
}

/* Game Info Section */
.game-info {
    background-color: #1a1a1a;
    padding: 30px;
    border-radius: 15px;
    border: 2px solid #333;
    margin-top: 30px;
}

.game-info h2, .game-info h3 {
    color: white;
    margin-bottom: 15px;
}

.game-info p {
    color: #e0e0e0;
    line-height: 1.6;
    font-size: 0.6em;
    margin-bottom: 20px;
}

.game-info ul {
    color: #e0e0e0;
    line-height: 1.6;
    font-size: 0.6em;
}

.game-info li {
    margin-bottom: 8px;
}

/* Unity WebGL Loading Styles */
#unity-loading-bar {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

#unity-logo {
    width: 154px;
    height: 130px;
    background: url('games/flowerDefenseWeb/TemplateData/unity-logo-dark.png') no-repeat center;
    background-size: contain;
}

#unity-progress-bar-empty {
    width: 141px;
    height: 18px;
    margin-top: 10px;
    background: url('games/flowerDefenseWeb/TemplateData/progress-bar-empty-dark.png') no-repeat center;
    background-size: contain;
}

#unity-progress-bar-full {
    width: 0%;
    height: 18px;
    background: url('games/flowerDefenseWeb/TemplateData/progress-bar-full-dark.png') no-repeat center;
    background-size: contain;
}

#unity-footer {
    position: relative;
    margin-top: 10px;
}

#unity-webgl-logo, #unity-build-title {
    float: left;
    width: 180px;
    height: 28px;
    background: url('games/flowerDefenseWeb/TemplateData/webgl-logo.png') no-repeat center;
    background-size: contain;
}

#unity-build-title {
    float: right;
    margin-right: 10px;
    text-align: right;
    color: white;
    font-size: 18px;
    line-height: 28px;
    background: none;
}

#unity-fullscreen-button {
    float: right;
    width: 38px;
    height: 38px;
    background: url('games/flowerDefenseWeb/TemplateData/fullscreen-button.png') no-repeat center;
    background-size: contain;
    cursor: pointer;
}

/* Mobile Responsive Styles for Games */
@media screen and (max-width: 768px) {
    .game-container {
        padding: 10px;
        margin: 20px 0;
    }
    
    #unity-container {
        width: 100%;
        height: auto;
        max-width: 480px;
    }
    
    #unity-canvas {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9; /* Maintain aspect ratio */
    }
    
    .game-info {
        padding: 20px;
        margin-top: 20px;
    }
    
    .game-info h2 {
        font-size: 1.5em;
    }
    
    .game-info h3 {
        font-size: 1.2em;
    }
    
    .back-link {
        font-size: 0.8em;
        padding: 8px 16px;
    }
}

@media screen and (max-width: 480px) {
    .game-container {
        padding: 5px;
    }
    
    #unity-container {
        max-width: 100%;
    }
    
    .game-info {
        padding: 15px;
    }
    
    .game-info h2 {
        font-size: 1.3em;
    }
    
    .game-info p, .game-info ul {
        font-size: 0.8em;
    }
}
