/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-left .back-btn {
    background: #d7def8;
    border: none;
    color: #667eea;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}
.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.header-left .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.header-left .logo i {
    font-size: 1.8rem;
    color: #ffd700;
}

.header-center .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.header-center .logo i {
    font-size: 1.8rem;
    color: #ffd700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.coins-balance {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.coins-balance i {
    color: #ff6b35;
}

.notification-bell {
    position: relative;
    font-size: 1.2rem;
    color: #667eea;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.notification-bell:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

/* Login Button */
.login-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.login-btn i {
    font-size: 1rem;
}

.notification-dot {
    position: absolute;
    top: 0.2rem;
    right: 0.2rem;
    width: 8px;
    height: 8px;
    background: #ff4757;
    border-radius: 50%;
    border: 2px solid white;
}

/* Sponsored Banner */
.sponsored-banner {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    margin: 1rem;
    border-radius: 15px;
    padding: 1rem;
    text-align: center;
    color: white;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
}

.banner-content i {
    font-size: 1.2rem;
}

/* Tabs Section */
.tabs-container {
    margin: 1rem;
    overflow-x: auto;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    min-width: max-content;
}

.tab {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
}

.tab.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Contest Container */
.contest-container {
    margin: 1rem;
    margin-bottom: 100px; /* Space for bottom nav */
}

.contest-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contest-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.contest-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.contest-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contest-info {
    flex: 1;
    min-width: 0;
}

.contest-title {
    font-weight: bold;
    font-size: 1rem;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.contest-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: #666;
    flex-wrap: wrap;
}

.contest-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #ff4757;
    font-weight: 500;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #ff4757;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.contest-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.entry-fee {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #333;
}

.play-button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 10px;
}

.nav-item i {
    font-size: 1.2rem;
    color: #999;
}

.nav-item span {
    font-size: 0.75rem;
    color: #999;
}

.nav-item.active i,
.nav-item.active span {
    color: #667eea;
}

.nav-item:hover {
    background: rgba(102, 126, 234, 0.1);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 1rem;
    max-height: 60vh;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item i {
    font-size: 1.5rem;
    color: #667eea;
    margin-top: 0.2rem;
}

.notification-content h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.notification-content p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* Search Modal Specific Styles */
.search-modal {
    max-width: 600px;
}

.search-input-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 3rem;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.1rem;
}

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

.clear-search-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.search-filters {
    margin-bottom: 1.5rem;
}

.search-filters h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1rem;
}

.category-search-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.category-search-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #f8f9fa;
}

.category-search-input:focus {
    outline: none;
    border-color: #8b5cf6;
    background: white;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.category-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
}

.category-suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-suggestion-item:hover {
    background: #f8f9fa;
}

.category-suggestion-item:last-child {
    border-bottom: none;
}

.category-suggestion-icon {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.category-stats {
    display: flex;
    justify-content: space-around;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 15px;
    border: 1px solid #e0e0e0;
}

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

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #8b5cf6;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-tag {
    padding: 0.5rem 1rem;
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: #666;
}

.filter-tag:hover {
    background: #e0e0e0;
    color: #333;
}

.filter-tag.active {
    background: #8b5cf6;
    color: white;
    border-color: #8b5cf6;
}

.search-results {
    min-height: 200px;
}

.search-placeholder {
    text-align: center;
    color: #999;
    padding: 2rem;
}

.search-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.search-placeholder p {
    margin: 0;
    font-size: 1rem;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    background: #f8f9fa;
    border-color: #8b5cf6;
}

.search-result-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: #8b5cf6;
}

.search-result-content h4 {
    margin: 0 0 0.25rem 0;
    color: #333;
    font-size: 1rem;
}

.search-result-content p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 0.75rem;
    }
    
    .search-modal {
        max-width: 95%;
        margin: 1rem;
    }
    
    .search-input {
        padding: 0.875rem 2.5rem 0.875rem 2.5rem;
        font-size: 0.9rem;
    }
    
    .filter-tags {
        gap: 0.375rem;
    }
    
    .filter-tag {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .category-search-input {
        padding: 0.75rem 0.875rem;
        font-size: 0.85rem;
    }
    
    .category-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 0.5rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .category-suggestions {
        max-height: 150px;
    }
    
    .category-suggestion-item {
        padding: 1rem;
        min-height: 44px; /* Better touch target */
    }
    
    .header-left .logo {
        font-size: 1.3rem;
    }
    
    .header-left .logo i {
        font-size: 1.5rem;
    }
    
    .coins-balance {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .login-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .login-btn span {
        display: none;
    }
    
    .sponsored-banner {
        margin: 0.75rem;
        padding: 0.75rem;
    }
    
    .tabs-container {
        margin: 0.75rem;
    }
    
    .tab {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .contest-container {
        margin: 0.75rem;
        margin-bottom: 100px;
    }
    
    .contest-card {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .contest-thumbnail {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .contest-title {
        font-size: 0.9rem;
    }
    
    .contest-meta {
        font-size: 0.8rem;
        gap: 0.75rem;
    }
    
    .play-button {
        padding: 0.4rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .contest-card {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .contest-actions {
        align-items: center;
        width: 100%;
    }
    
    .contest-meta {
        justify-content: center;
    }
    
    .tabs {
        gap: 0.3rem;
    }
    
    .tab {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: white;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

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

/* Coin notification animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}
/* Hide scrollbar but keep functionality */
.tabs-container::-webkit-scrollbar {
    display: none;
}

.tabs-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}



/* Hide scrollbar but keep functionality */
.tabs-container::-webkit-scrollbar {
    display: none;
}

.tabs-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Enhanced tab animations */
.tab {
    position: relative;
    overflow: hidden;
}

.tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.tab:hover::before {
    left: 100%;
}

/* Search results highlighting */
.tab.search-highlight {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

/* No results message */
.no-results-message {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    margin: 1rem 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
    .tabs {
        gap: 0.3rem;
    }
    
    .tab {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .search-input {
        padding: 0.6rem 0.6rem 0.6rem 2rem;
        font-size: 0.8rem;
    }
    
    .search-icon {
        left: 0.6rem;
        font-size: 0.8rem;
    }
    
    .tabs {
        gap: 0.3rem;
    }
    
    .tab {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
        gap: 0.2rem;
    }
    
    .tab-icon {
        font-size: 0.9rem;
    }
    
    .tab-text {
        font-size: 0.7rem;
    }

    .search-section {
    padding: 0 1.5rem 1rem;
}

.search-container {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: white;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.clear-search {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.clear-search:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}