/* =============================================
   1rob tech - Advanced Features Styles
   ============================================= */

/* ==========================================
   1. WELCOME MODAL
   ========================================== */

.welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.welcome-modal.show {
    opacity: 1;
}

.welcome-content {
    background: linear-gradient(135deg, #1a1f3a 0%, #0a0e27 100%);
    border: 2px solid #00d4ff;
    border-radius: 20px;
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    position: relative;
    animation: welcomeSlideIn 0.5s ease;
}

@keyframes welcomeSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.welcome-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.welcome-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.welcome-icon {
    font-size: 3rem;
    color: #00d4ff;
    margin-bottom: 0.75rem;
    animation: welcomeIconBounce 1s infinite;
}

@keyframes welcomeIconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.welcome-content h2 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #00d4ff 0%, #6c5ce7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-content > p {
    color: #a0aec0;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.welcome-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 0.85rem;
}

.feature-item i {
    color: #00d4ff;
    font-size: 1rem;
}

.welcome-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #00d4ff 0%, #6c5ce7 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.welcome-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.5);
}

.welcome-footer {
    margin-top: 1.5rem;
    color: #718096;
    font-size: 0.9rem;
}

/* ==========================================
   2. FAVORITES SYSTEM
   ========================================== */

.favorite-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.favorite-btn i {
    color: #fff;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.favorite-btn:hover {
    transform: scale(1.1);
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

.favorite-btn.active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border-color: #ff6b6b;
}

.favorite-btn.active i {
    color: #fff;
    animation: heartBeat 0.5s ease;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
}

.badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #fff;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.5rem;
    animation: pulse 2s infinite;
}

/* ==========================================
   3. ADVANCED SEARCH SUGGESTIONS
   ========================================== */

.search-suggestions {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: #1a1f3a;
    border: 2px solid #00d4ff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.3);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: rgba(0, 212, 255, 0.1);
    padding-left: 1.5rem;
}

.suggestion-image {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid #00d4ff;
}

.suggestion-info {
    flex: 1;
}

.suggestion-name {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.25rem;
}

.suggestion-name mark {
    background: linear-gradient(135deg, #00d4ff 0%, #6c5ce7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.suggestion-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #a0aec0;
}

.suggestion-category {
    background: rgba(0, 212, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    color: #00d4ff;
    text-transform: capitalize;
}

.suggestion-codes {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.suggestion-arrow {
    color: #00d4ff;
    font-size: 1.2rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.suggestion-item:hover .suggestion-arrow {
    opacity: 1;
    transform: translateX(0);
}

.suggestion-empty {
    text-align: center;
    padding: 2rem;
    color: #a0aec0;
}

.suggestion-empty i {
    font-size: 3rem;
    color: #00d4ff;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ==========================================
   4. TOAST NOTIFICATIONS
   ========================================== */

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #1a1f3a;
    border: 2px solid #00d4ff;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 9999;
}

.toast.show {
    transform: translateX(0);
}

.toast i {
    font-size: 1.5rem;
}

.toast-success {
    border-color: #4ade80;
}

.toast-success i {
    color: #4ade80;
}

.toast-info {
    border-color: #00d4ff;
}

.toast-info i {
    color: #00d4ff;
}

/* ==========================================
   5. SHARE MODAL
   ========================================== */

.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.share-modal.show {
    opacity: 1;
}

.share-content {
    background: #1a1f3a;
    border: 2px solid #00d4ff;
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
}

.share-content h3 {
    color: #fff;
    margin-bottom: 1.5rem;
    text-align: center;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.share-btn {
    padding: 1rem;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.share-btn.twitter {
    background: #1DA1F2;
    color: #fff;
}

.share-btn.facebook {
    background: #4267B2;
    color: #fff;
}

.share-btn.copy {
    background: linear-gradient(135deg, #00d4ff 0%, #6c5ce7 100%);
    color: #fff;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.close-share {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-share:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================
   6. READING MODE
   ========================================== */

.reading-mode {
    background: #f7fafc !important;
}

.reading-mode .navbar,
.reading-mode .footer {
    opacity: 0.3;
    pointer-events: none;
}

.reading-mode .hero,
.reading-mode .games-section {
    filter: none !important;
}

/* ==========================================
   7. LOADING SKELETON
   ========================================== */

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 12px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    height: 350px;
}

.skeleton-text {
    height: 20px;
    margin-bottom: 10px;
}

/* ==========================================
   8. RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .welcome-content {
        padding: 1.5rem;
        max-width: 95%;
        max-height: 85vh;
        border-radius: 16px;
    }
    
    .welcome-icon {
        font-size: 2.5rem;
    }
    
    .welcome-content h2 {
        font-size: 1.25rem;
    }
    
    .welcome-content > p {
        font-size: 0.875rem;
        margin-bottom: 1.25rem;
    }
    
    .welcome-features {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        margin-bottom: 1.25rem;
    }
    
    .feature-item {
        padding: 0.625rem;
        font-size: 0.8rem;
    }
    
    .feature-item i {
        font-size: 0.9rem;
    }
    
    .welcome-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .welcome-footer {
        font-size: 0.75rem;
    }
    
    .search-suggestions {
        max-height: 300px;
        border-radius: 12px;
    }
    
    .suggestion-item {
        padding: 0.875rem;
    }
    
    .suggestion-image {
        width: 50px;
        height: 50px;
    }
    
    .suggestion-name {
        font-size: 0.95rem;
    }
    
    .suggestion-meta {
        font-size: 0.8rem;
    }
    
    .share-content {
        max-width: 95%;
        padding: 1.5rem;
    }
    
    .share-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .share-btn {
        width: 100%;
    }
    
    .toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
}

@media (max-width: 480px) {
    .welcome-content {
        padding: 1.25rem;
        border-radius: 16px;
        max-width: 92%;
    }
    
    .welcome-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }
    
    .welcome-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .welcome-content h2 {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }
    
    .welcome-content > p {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .welcome-features {
        margin-bottom: 1rem;
        gap: 0.5rem;
    }
    
    .feature-item {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    .feature-item i {
        font-size: 0.85rem;
    }
    
    .welcome-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .welcome-footer {
        font-size: 0.7rem;
        margin-top: 0.75rem;
    }
    
    .favorite-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
    
    .search-suggestions {
        max-height: 250px;
        border-radius: 10px;
    }
    
    .suggestion-item {
        padding: 0.75rem;
    }
    
    .suggestion-image {
        width: 45px;
        height: 45px;
    }
    
    .suggestion-name {
        font-size: 0.875rem;
    }
    
    .suggestion-meta {
        font-size: 0.75rem;
    }
    
    .suggestion-category {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .toast {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        bottom: 0.75rem;
        left: 0.75rem;
        right: 0.75rem;
    }
    
    .toast i {
        font-size: 1rem;
    }
    
    .share-content {
        padding: 1.25rem;
        max-width: 90%;
    }
    
    .share-content h3 {
        font-size: 1.125rem;
    }
    
    .share-buttons {
        gap: 0.625rem;
    }
    
    .share-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}
