/* Game Page Container */
.game-page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    min-height: 100vh;
}

/* Game Controls Section */
.game-controls {
    margin-bottom: 2rem;
}

.search-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 600px;
    min-width: 280px;
}

.game-search-input {
    width: -webkit-fill-available !important;
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(30, 30, 30, 0.7);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.game-search-input:focus {
    outline: none;
    border-color: #ff6600;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.2);
}

.search-button {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #868686;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.search-button:hover {
    color: #ff6600;
}

.random-game-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #ff6600, #ff8533);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 75px rgba(255, 102, 0, 0.7);
}

.random-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(255, 102, 0, 0.6);
}

.random-game-btn:active {
    transform: translateY(0);
}

/* Category Navigation */
.category-nav {
    margin-bottom: 2rem;
}

.category-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 1rem;
    border-radius: 16px;
}

.category-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(60, 60, 60, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.category-button:hover {
    background: rgba(80, 80, 80, 0.8);
    transform: translateY(-2px);
}

.category-button.active {
    background: #ff6600 !important;
    border-color: #ff8533;
    color: white;
    box-shadow: 0 0 75px rgba(255, 102, 0, 0.7);
    transform: translateY(-2px);
}

.category-icon {
    font-size: 1.2rem;
}

.lock-icon {
    color: white;
    margin-left: 0.5rem;
}

/* Games Grid */
.games-grid-container {
    margin-bottom: 2rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.game-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(30, 30, 30, 0.7);
    transition: all 0.3s ease;
    aspect-ratio: 16/9;
    cursor: pointer;
}

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

.game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-image {
    transform: scale(1.05);
}

.game-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.game-card:hover .game-overlay {
    transform: translateY(0);
}

.game-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.game-category {
    font-size: 0.9rem;
    color: #ff6600;
    margin-top: 0.5rem;
}

/* Lock Overlay for Cloud Games */
.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.game-card:hover .lock-overlay {
    opacity: 1;
}

/* Search Results Info */
.search-results-info {
    text-align: center;
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(30, 30, 30, 0.7);
    border-radius: 12px;
    color: white;
    backdrop-filter: blur(10px);
}

.clear-search-button {
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    background: #ff6600;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
}

.clear-search-button:hover {
    background: #ff8533;
}

/* Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(30, 30, 30, 0.95);
    border-radius: 12px;
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 102, 0, 0.2);
    backdrop-filter: blur(10px);
    display: none;
}

.search-results-dropdown.visible {
    display: block;
}

.search-result-item {
    padding: 0.75rem 1rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-result-item:hover {
    background: rgba(255, 102, 0, 0.1);
}

.search-result-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
}

.search-result-item .game-info {
    flex: 1;
}

.search-result-item .game-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.search-result-item .game-category {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Pagination Section */
.pagination-section {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
}

.pagination-info {
    color: white;
}

.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: rgba(30, 30, 30, 0.4);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.pagination-button {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.pagination-button:hover {
    background: rgba(255, 102, 0, 0.1);
    border-color: rgba(255, 102, 0, 0.3);
    transform: translateY(-2px);
}

.pagination-button.active {
    background: #ff6600;
    border-color: #ff8533;
    color: white;
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.3);
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pagination-ellipsis {
    color: rgba(255, 255, 255, 0.5);
    padding: 0 0.5rem;
    user-select: none;
}

.pagination-dropdown {
    position: relative;
    margin-left: 1rem;
}

.pagination-dropdown select {
    appearance: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-dropdown select:hover {
    background: rgba(255, 102, 0, 0.1);
    border-color: rgba(255, 102, 0, 0.3);
}

.pagination-dropdown::after {
    content: '▼';
    font-size: 0.8rem;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    transition: transform 0.3s ease;
}

.pagination-dropdown:hover::after {
    color: #ff6600;
    transform: translateY(-50%) rotate(180deg);
}

.pagination-dropdown select option {
    background: rgba(30, 30, 30, 0.95);
    color: #fff;
    padding: 0.5rem;
}

#pagination-top {
    margin-bottom: 1.5rem;
}

#pagination-bottom {
    margin-top: 1.5rem;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: #ff6600;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.3);
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.4);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 102, 0, 0.3);
    border-radius: 50%;
    border-top-color: #ff6600;
    animation: spin 1s linear infinite;
}

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

/* Modal Styles */
.game-preview-modal,
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.game-preview-modal.visible,
.login-modal.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(30, 30, 30, 0.95);
    border-radius: 20px;
    padding: 2rem;
    max-width: 90%;
    width: 600px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 102, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #868686;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #ff6600;
}

.modal-body {
    color: white;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #ff6600;
    color: white;
}

.btn-primary:hover {
    background: #ff8533;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #ff6600;
    border: 2px solid #ff6600;
}

.btn-secondary:hover {
    background: rgba(255, 102, 0, 0.1);
    transform: translateY(-2px);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .game-page-container {
        padding: 1rem;
        margin: 100px 20px 50px 62px;
    }

    .search-wrapper {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .random-game-btn {
        width: 100%;
        justify-content: center;
    }

    .category-container {
        flex-direction: column;
    }

    .category-button {
        width: 100%;
        justify-content: center;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    .modal-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
    }

    .pagination-section {
        margin: 0;
        padding: 0;
    }

    .pagination-container {
        margin: 1rem 0;
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .pagination-button {
        min-width: 35px;
        height: 35px;
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .pagination-dropdown {
        margin-left: 0.5rem;
    }

    .pagination-dropdown select {
        padding: 0.4rem 2rem 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}

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

.game-card {
    animation: fadeIn 0.5s ease forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(30, 30, 30, 0.5);
}

::-webkit-scrollbar-thumb {
    background: #ff6600;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff8533;
}

.page-jump-wrapper {
    position: relative;
    display: inline-block;
}

.page-jump {
    appearance: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.page-jump:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.page-jump-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    pointer-events: none;
    font-size: 0.9rem;
}

.page-jump option {
    background: rgba(30, 30, 30, 0.95);
    color: #fff;
    padding: 0.5rem;
} 