/* Super Game Manager Pro - Frontend Styles */

/* Game Container */
.sgm-game-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 20px auto;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.sgm-game-container iframe {
    width: 100%;
    height: 600px;
    border: none;
}

/* Games Grid */
.sgm-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 20px 0;
    margin: 20px 0;
}

.sgm-games-grid.columns-2 {
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
}

.sgm-games-grid.columns-4 {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* Game Item */
.sgm-game-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sgm-game-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
}

.sgm-game-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.sgm-game-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.sgm-game-item h3 {
    padding: 15px;
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.sgm-game-item .game-meta {
    padding: 0 15px 15px;
}

.sgm-game-item .arabic-title {
    color: #666;
    font-size: 14px;
    font-family: 'Arial', sans-serif;
    direction: rtl;
    display: block;
    margin-top: 5px;
}

/* Play Button Overlay */
.sgm-game-item {
    position: relative;
}

.sgm-game-item::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #333;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.sgm-game-item:hover::after {
    opacity: 1;
}

/* Categories */
.sgm-game-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.sgm-game-categories a {
    padding: 8px 16px;
    background: #f0f0f0;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.sgm-game-categories a:hover,
.sgm-game-categories a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Game Info Box */
.sgm-game-info {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.sgm-game-info h2 {
    margin-top: 0;
    color: #333;
}

.sgm-game-info .arabic-content {
    background: white;
    padding: 15px;
    border-radius: 5px;
    direction: rtl;
    font-family: 'Arial', sans-serif;
    margin-top: 15px;
}

/* Loading Spinner */
.sgm-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.sgm-loading::after {
    content: '';
    width: 50px;
    height: 50px;
    border: 3px solid #f0f0f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: sgm-spin 1s linear infinite;
}

@keyframes sgm-spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .sgm-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .sgm-game-container iframe {
        height: 400px;
    }
    
    .sgm-game-item img {
        height: 150px;
    }
    
    .sgm-game-item h3 {
        font-size: 14px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .sgm-games-grid {
        grid-template-columns: 1fr;
    }
    
    .sgm-game-container iframe {
        height: 300px;
    }
}

/* RTL Support for Arabic */
.rtl .sgm-game-item h3,
.rtl .sgm-game-info {
    direction: rtl;
    text-align: right;
}

.rtl .sgm-games-grid {
    direction: rtl;
}

/* Game Features List */
.sgm-game-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.sgm-game-features li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.sgm-game-features li:before {
    content: '✓';
    color: #4CAF50;
    font-weight: bold;
    margin-right: 10px;
}

/* Call to Action Buttons */
.sgm-cta-buttons {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.sgm-cta-buttons a {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-block;
}

.sgm-cta-buttons a:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Game Rating */
.sgm-game-rating {
    display: flex;
    gap: 5px;
    margin: 10px 0;
}

.sgm-game-rating .star {
    color: #ddd;
    font-size: 20px;
}

.sgm-game-rating .star.filled {
    color: #FFD700;
}

/* Pagination */
.sgm-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.sgm-pagination a,
.sgm-pagination span {
    padding: 8px 12px;
    background: #f0f0f0;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.sgm-pagination a:hover,
.sgm-pagination span.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Search Bar */
.sgm-search-bar {
    display: flex;
    max-width: 500px;
    margin: 20px auto;
}

.sgm-search-bar input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px 0 0 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.sgm-search-bar input:focus {
    border-color: #667eea;
}

.sgm-search-bar button {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    font-size: 16px;
    transition: opacity 0.3s;
}

.sgm-search-bar button:hover {
    opacity: 0.9;
}

/* Filter Options */
.sgm-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.sgm-filters select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.sgm-filters select:focus {
    border-color: #667eea;
    outline: none;
}