/* Mobile-first responsive design for Game Library - Play Store Style */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    color: #1a1a1a;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    min-height: 100vh;
    background: #f8f9fa;
    padding-bottom: 100px;
}

.hidden {
    display: none !important;
}

/* Carousel Section - Mobile Optimized */
.carousel-section {
    padding: 16px 12px 24px;
    margin-bottom: 8px;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide {
    min-width: 100%;
    position: relative;
    height: 180px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    color: white;
    overflow: hidden;
}

.carousel-slide:nth-child(1) {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    background-image: url('/images/carousel1.jpeg');
}

.carousel-slide:nth-child(2) {
    /* background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); */
    background-image: url('/images/carousel2.jpeg');
}

.carousel-slide:nth-child(3) {
    /* background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); */
    background-image: url('/images/carousel3.png');
}

.carousel-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.6;
}

.carousel-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

.carousel-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 6px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
}

.carousel-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 14px;
    font-weight: 400;
}

.carousel-info {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 25px;
    padding: 8px 18px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px 0 8px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.indicator.active {
    background: #00a8ff;
    transform: scale(1.4);
    box-shadow: 0 0 8px rgba(0, 168, 255, 0.6);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 3;
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.9);
}

.carousel-nav.prev {
    left: 12px;
}

.carousel-nav.next {
    right: 12px;
}

/* Category Tabs Section */
.category-tabs-section {
    padding: 16px 16px 8px;
    margin-bottom: 8px;
}

.category-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.category-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    color: rgba(26, 26, 26, 0.7);
    position: relative;
    overflow: hidden;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.category-tab:active {
    transform: scale(0.95);
}

.category-tab.active {
    background: linear-gradient(135deg, #00a8ff 0%, #0088cc 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 168, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.category-tab.active::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.category-tab.active:active::before {
    transform: translateX(100%);
}

.tab-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-tab.active .tab-label {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

/* Hover effects for larger screens */
@media (hover: hover) {
    .category-tab:hover {
        color: rgba(26, 26, 26, 0.9);
        background: rgba(0, 0, 0, 0.08);
        transform: translateY(-1px);
    }
    
    .category-tab.active:hover {
        background: linear-gradient(135deg, #00a8ff 0%, #0088cc 100%);
        transform: translateY(-1px) scale(1.02);
    }
}

/* Games Section - Play Store Style */
.games-section {
    padding: 0 16px;
}

.section-header {
    margin-bottom: 16px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.section-subtitle {
    font-size: 0.9rem;
    color: #666;
}

.games-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 8px 0 16px 0;
}

.game-card-playstore {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    width: 100%;
    height: 150px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.game-card-playstore:active {
    transform: scale(0.97);
}

.game-card-playstore.available:active {
    box-shadow: 0 8px 32px rgba(0, 168, 255, 0.4);
    border-color: #00a8ff;
}

.game-featured-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.game-card-playstore.available .game-featured-image {
    background: linear-gradient(135deg, #00a8ff 0%, #0088cc 100%);
}

.game-featured-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.game-card-playstore:active .game-featured-image::after {
    transform: translateX(100%);
}

/* Game info section styles removed - now using full featured image only */

.game-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
}

.rating-stars {
    color: #ffa726;
}

.rating-text {
    color: #666;
}

.game-status-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

.game-status-badge.available {
    background: rgba(0, 255, 136, 0.9);
    color: #000;
}

.game-status-badge.coming-soon {
    background: rgba(255, 107, 53, 0.9);
    color: #fff;
}

.game-status-badge.trial {
    background: rgba(255, 193, 7, 0.9);
    color: #000;
    border: 1px solid rgba(255, 193, 7, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.game-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #fff;
    font-weight: 600;
    backdrop-filter: blur(2px);
}

.game-card-playstore.coming-soon .game-overlay {
    display: flex;
}

.game-card-playstore.available .game-overlay {
    display: none;
}

.game-card-playstore.coming-soon {
    opacity: 0.7;
    cursor: not-allowed;
}

.game-card-playstore.coming-soon:active {
    transform: none;
}

/* Bottom Navigation Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 12px;
    min-width: 60px;
    position: relative;
}

.nav-item:active {
    transform: scale(0.9);
}

.nav-icon {
    width: 24px;
    height: 24px;
    color: rgba(26, 26, 26, 0.6);
    transition: all 0.3s ease;
    margin-bottom: 4px;
    position: relative;
}

.nav-item.active .nav-icon {
    color: #00a8ff;
    transform: scale(1.1);
}

.nav-item.active .nav-icon::before {
    content: '';
    position: absolute;
    inset: -8px;
    background: radial-gradient(circle, rgba(0, 168, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

.nav-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(26, 26, 26, 0.6);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item.active .nav-label {
    color: #00a8ff;
    text-shadow: 0 0 8px rgba(0, 168, 255, 0.5);
}

/* Hover effects for larger screens */
@media (hover: hover) {
    .nav-item:hover .nav-icon {
        color: rgba(26, 26, 26, 0.8);
        transform: scale(1.05);
    }

    .nav-item:hover .nav-label {
        color: rgba(26, 26, 26, 0.8);
    }

    .nav-item.active:hover .nav-icon {
        color: #667eea;
        transform: scale(1.15);
    }

    .nav-item.active:hover .nav-label {
        color: #667eea;
    }
}

/* Navigation animation on load */
@keyframes navSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

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

.bottom-nav {
    animation: navSlideUp 0.5s ease-out;
}

/* Safe area support for devices with notches */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
}

/* Responsive adjustments */
@media (min-width: 375px) {
    .carousel-slide {
        height: 200px;
    }

    .carousel-title {
        font-size: 1.5rem;
    }

    .game-featured-image {
        height: 100%;
        background-size: contain;
        background-repeat: no-repeat;
    }
    
    .game-card-playstore {
        height: 200px;
    }
    
    .category-tabs-section {
        padding: 20px 16px 12px;
    }
    
    .category-tab {
        padding: 16px 20px;
    }
    
    .tab-label {
        font-size: 0.9rem;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 500px;
        margin: 0 auto;
    }

    .carousel-section {
        padding: 20px 16px;
    }
    
    .category-tabs-section {
        padding: 24px 20px 16px;
    }
    
    .category-tabs {
        max-width: 450px;
        margin: 0 auto;
    }
    
    .category-tab {
        padding: 18px 24px;
    }
    
    .tab-label {
        font-size: 0.95rem;
        letter-spacing: 0.8px;
    }

    .games-section {
        padding: 0 20px;
    }
    
    .games-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .game-card-playstore {
        height: 220px;
    }
}

/* Payment Gateway Selection Styles */
.payment-gateway-selection {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gateway-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
    text-align: center;
}

.gateway-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gateway-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gateway-option:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(102, 126, 234, 0.3);
}

.gateway-option input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.gateway-option input[type="radio"]:checked + .gateway-name {
    color: #667eea;
    font-weight: 600;
}

.gateway-name {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease;
}

/* Responsive adjustments for payment gateway */
@media (min-width: 768px) {
    .payment-gateway-selection {
        margin: 24px 0;
        padding: 24px;
    }
    
    .gateway-options {
        flex-direction: row;
        justify-content: center;
        gap: 20px;
    }
    
    .gateway-option {
        min-width: 200px;
        justify-content: center;
    }
}

/* Footer Styles */
.footer {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 16px 16px;
    margin-top: 32px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 500px;
    margin: 0 auto;
}

.footer-section h4 {
    color: #00a8ff;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    padding: 4px 0;
}

.footer-link:hover {
    color: #00a8ff;
    transform: translateX(4px);
}

.footer-bottom {
    text-align: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

/* Responsive footer */
@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }
    
    .footer {
        padding: 32px 24px 20px;
    }
}