/* Simple Mobile-First Homepage Styles */

/* Welcome Screen Overlay */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

.welcome-overlay.hide {
    opacity: 0;
    pointer-events: none;
}

.welcome-content {
    text-align: center;
    padding: 20px;
    max-width: 400px;
}

.welcome-logo {
    font-size: 4em;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.welcome-title {
    font-size: 2.5em;
    margin: 0 0 10px 0;
    background: linear-gradient(45deg, #007AFF, #00D4FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    color: #888;
    font-size: 1.1em;
    margin-bottom: 30px;
}

.start-button {
    background: linear-gradient(45deg, #007AFF, #00D4FF);
    border: none;
    color: white;
    padding: 15px 40px;
    font-size: 1.2em;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,122,255,0.3);
}

.start-button:active {
    transform: scale(0.95);
}

/* Quick Stats Bar */
.quick-stats-bar {
    background: rgba(0,0,0,0.6);
    padding: 10px;
    display: flex;
    justify-content: space-around;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 98;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-icon {
    font-size: 1.5em;
    margin-bottom: 5px;
}

.stat-number {
    font-size: 1.2em;
    font-weight: bold;
    color: #007AFF;
}

.stat-label {
    font-size: 0.8em;
    color: #888;
}

/* Featured Games Strip */
.featured-strip {
    background: rgba(0,0,0,0.4);
    padding: 15px 10px;
    margin-bottom: 10px;
}

.featured-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 0 5px;
}

.featured-title {
    font-size: 1.2em;
    font-weight: bold;
    flex: 1;
}

.featured-scroll {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.featured-scroll::-webkit-scrollbar {
    display: none;
}

.featured-game-card {
    flex: 0 0 120px;
    background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
    border: 2px solid #333;
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.featured-game-card:active {
    transform: scale(0.95);
    border-color: #007AFF;
}

.featured-game-icon {
    font-size: 2em;
    margin-bottom: 8px;
}

.featured-game-name {
    font-size: 0.85em;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Updated Header - More Compact */
.header {
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    padding: 12px 15px;
    text-align: center;
    border-bottom: 2px solid #333;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    margin: 0;
    font-size: 1.8em;
    background: linear-gradient(45deg, #007AFF, #00D4FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header h2 {
    margin: 0;
    font-size: 1.2em;
    background: linear-gradient(45deg, #007AFF, #00D4FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header .subtitle {
    margin: 3px 0 0 0;
    color: #888;
    font-size: 0.9em;
}

/* Improved Filter Section for Mobile */
.filter-section {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    padding: 10px;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 65px;
    z-index: 99;
}

/* Make search more prominent */
.search-box {
    padding: 14px 45px 14px 20px;
    font-size: 16px;
    background: #2a2a2a;
    border: 2px solid #444;
}

.search-box:focus {
    border-color: #007AFF;
    background: #333;
}

/* System filter with better mobile styling */
.system-filter select {
    padding: 12px 20px;
    font-size: 15px;
    background: #2a2a2a;
    border: 2px solid #444;
}

/* Larger, more touch-friendly alphabet tabs */
.alphabet-tab {
    min-width: 45px;
    padding: 12px 8px;
    font-size: 13px;
}

/* Game Cards - Optimized for Touch */
.game-card {
    background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
    border: 2px solid #333;
    border-radius: 12px;
    padding: 20px 15px;
    min-height: 70px;
    position: relative;
    overflow: hidden;
}

.game-card::after {
    content: '▶';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #007AFF;
    font-size: 1.2em;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:active {
    transform: scale(0.98);
    border-color: #007AFF;
    background: linear-gradient(145deg, #333, #222);
}

.game-card:active::after {
    opacity: 1;
}

/* Mobile Portrait Optimizations */
@media (max-width: 768px) and (orientation: portrait) {
    .games-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px;
    }

    .game-card {
        padding: 15px 10px;
        min-height: 80px;
    }

    .game-name {
        font-size: 0.9em;
        line-height: 1.3;
    }
}

/* Small Mobile Devices */
@media (max-width: 375px) {
    .header h1 {
        font-size: 1.5em;
    }

    .alphabet-tab {
        min-width: 40px;
        padding: 10px 6px;
        font-size: 12px;
    }

    .featured-game-card {
        flex: 0 0 100px;
    }
}

/* Loading States */
.skeleton-loader {
    background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
    height: 80px;
    margin-bottom: 10px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Haptic Feedback Simulation */
.touch-feedback {
    position: relative;
}

.touch-feedback::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0,122,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.touch-feedback:active::before {
    width: 100%;
    height: 100%;
}

/* Browser Notice Styles */
.browser-notice {
    background: rgba(255, 152, 0, 0.1);
    border: 2px solid #FF9800;
    border-radius: 12px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.notice-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.notice-text {
    color: #fff;
    margin: 10px 0;
    font-size: 0.95em;
    line-height: 1.4;
}

.notice-text strong {
    color: #FF9800;
}

.chrome-link {
    display: inline-block;
    background: #FF9800;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    margin-top: 10px;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.chrome-link:active {
    transform: scale(0.95);
    background: #F57C00;
}

/* Browser Notice Bar (for returning users) */
.browser-notice-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, #FF9800, #F57C00);
    color: white;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9em;
    z-index: 1001;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-100%);
    }
}

.browser-notice-bar .notice-icon {
    font-size: 1.2em;
}

.browser-notice-bar .notice-text {
    flex: 1;
    text-align: center;
}

.notice-dismiss {
    background: none;
    border: 1px solid rgba(255,255,255,0.5);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.notice-dismiss:active {
    background: rgba(255,255,255,0.2);
}

/* Adjust page content when notice bar is shown */
body.has-browser-notice {
    padding-top: 40px;
}

body.has-browser-notice .header {
    top: 40px;
}