Spaces:
Running
Running
Download index.html from GoldenShadowMan/Reservoir: direct link, hf CLI and curl.
- Browser
- Download file 55.8 kB
-
https://huggingface.co/spaces/GoldenShadowMan/Reservoir/resolve/main/index.html
- Command line
-
hf download hf://spaces/GoldenShadowMan/Reservoir/index.html
-
curl -L -o index.html https://huggingface.co/spaces/GoldenShadowMan/Reservoir/resolve/main/index.html
55.8 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CyberVoice - Reviews & Q&A</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/lucide@latest"></script>
<link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap" rel="stylesheet">
<script>
tailwind.config = {
theme: {
extend: {
fontFamily: {
orbitron: ['Orbitron', 'sans-serif'],
rajdhani: ['Rajdhani', 'sans-serif'],
mono: ['Share Tech Mono', 'monospace'],
},
colors: {
cyber: {
dark: '#0a0e1a',
darker: '#060810',
mid: '#0d1526',
blue: '#00d4ff',
lightblue: '#4de8ff',
purple: '#7b2fff',
pink: '#ff2d95',
navy: '#1a1f3a',
card: '#0f1629',
border: '#1a2744',
}
}
}
}
}
</script>
<style>
* { scrollbar-width: thin; scrollbar-color: #00d4ff #0a0e1a; }
*::-webkit-scrollbar { width: 6px; }
*::-webkit-scrollbar-track { background: #0a0e1a; }
*::-webkit-scrollbar-thumb { background: #00d4ff; border-radius: 3px; }
body {
background: #0a0e1a;
font-family: 'Rajdhani', sans-serif;
overflow-x: hidden;
}
/* Cyber Grid Background */
.cyber-grid {
background-image:
linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
background-size: 50px 50px;
}
/* Glowing text */
.glow-text {
text-shadow: 0 0 10px rgba(0, 212, 255, 0.5), 0 0 40px rgba(0, 212, 255, 0.2);
}
.glow-text-strong {
text-shadow: 0 0 10px rgba(0, 212, 255, 0.8), 0 0 30px rgba(0, 212, 255, 0.4), 0 0 60px rgba(0, 212, 255, 0.2);
}
/* Neon border */
.neon-border {
border: 1px solid rgba(0, 212, 255, 0.3);
box-shadow: 0 0 10px rgba(0, 212, 255, 0.1), inset 0 0 10px rgba(0, 212, 255, 0.05);
}
.neon-border:hover {
border-color: rgba(0, 212, 255, 0.6);
box-shadow: 0 0 20px rgba(0, 212, 255, 0.2), inset 0 0 15px rgba(0, 212, 255, 0.08);
}
/* Neon button */
.neon-btn {
background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(123, 47, 255, 0.15));
border: 1px solid rgba(0, 212, 255, 0.4);
box-shadow: 0 0 15px rgba(0, 212, 255, 0.2), inset 0 0 15px rgba(0, 212, 255, 0.05);
transition: all 0.3s ease;
}
.neon-btn:hover {
background: linear-gradient(135deg, rgba(0, 212, 255, 0.25), rgba(123, 47, 255, 0.25));
border-color: rgba(0, 212, 255, 0.8);
box-shadow: 0 0 25px rgba(0, 212, 255, 0.4), inset 0 0 20px rgba(0, 212, 255, 0.1);
transform: translateY(-1px);
}
.neon-btn:active {
transform: translateY(0px);
}
/* Card hover */
.cyber-card {
background: linear-gradient(135deg, #0f1629, #0d1526);
border: 1px solid rgba(0, 212, 255, 0.15);
transition: all 0.4s ease;
}
.cyber-card:hover {
border-color: rgba(0, 212, 255, 0.4);
box-shadow: 0 0 30px rgba(0, 212, 255, 0.1), 0 4px 20px rgba(0, 0, 0, 0.3);
transform: translateY(-2px);
}
/* Animated scan line */
.scan-line::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 2px;
background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.4), transparent);
animation: scan 4s linear infinite;
}
@keyframes scan {
0% { top: 0; opacity: 0; }
10% { opacity: 1; }
90% { opacity: 1; }
100% { top: 100%; opacity: 0; }
}
/* Floating particles */
.particle {
position: absolute;
width: 2px;
height: 2px;
background: rgba(0, 212, 255, 0.6);
border-radius: 50%;
animation: float-particle linear infinite;
}
@keyframes float-particle {
0% { transform: translateY(100vh) scale(0); opacity: 0; }
10% { opacity: 1; }
90% { opacity: 1; }
100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}
/* Glitch effect */
.glitch {
position: relative;
}
.glitch::before,
.glitch::after {
content: attr(data-text);
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.glitch::before {
animation: glitch-1 2s infinite linear alternate-reverse;
clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
color: #ff2d95;
}
.glitch::after {
animation: glitch-2 3s infinite linear alternate-reverse;
clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
color: #00d4ff;
}
@keyframes glitch-1 {
0%, 95% { transform: translateX(0); }
96% { transform: translateX(-3px); }
97% { transform: translateX(3px); }
98% { transform: translateX(-1px); }
99% { transform: translateX(1px); }
100% { transform: translateX(0); }
}
@keyframes glitch-2 {
0%, 95% { transform: translateX(0); }
96% { transform: translateX(2px); }
97% { transform: translateX(-2px); }
98% { transform: translateX(1px); }
99% { transform: translateX(-1px); }
100% { transform: translateX(0); }
}
/* Star rating */
.star-rating .star {
cursor: pointer;
transition: all 0.2s;
color: #1a2744;
}
.star-rating .star.active,
.star-rating .star:hover {
color: #00d4ff;
filter: drop-shadow(0 0 4px rgba(0, 212, 255, 0.6));
}
.star-rating .star:hover ~ .star {
color: #1a2744;
}
/* Pulse dot */
.pulse-dot {
animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow {
0%, 100% { opacity: 1; box-shadow: 0 0 5px rgba(0, 212, 255, 0.5); }
50% { opacity: 0.5; box-shadow: 0 0 15px rgba(0, 212, 255, 0.8); }
}
/* Tab active indicator */
.tab-active {
color: #00d4ff !important;
border-bottom-color: #00d4ff !important;
text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}
/* Input focus */
.cyber-input:focus {
border-color: rgba(0, 212, 255, 0.6);
box-shadow: 0 0 15px rgba(0, 212, 255, 0.15), inset 0 0 10px rgba(0, 212, 255, 0.05);
outline: none;
}
/* Typing cursor */
.typing-cursor::after {
content: '|';
animation: blink 1s step-end infinite;
color: #00d4ff;
}
@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0; }
}
/* Fade in animation */
.fade-in {
animation: fadeIn 0.5s ease-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
/* Hero hex decoration */
.hex-bg {
background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
}
/* Toast notification */
.toast {
animation: slideInRight 0.4s ease-out, fadeOut 0.4s ease-in 2.6s forwards;
}
@keyframes slideInRight {
from { transform: translateX(100%); opacity: 0; }
to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
from { opacity: 1; }
to { opacity: 0; }
}
/* Upvote animation */
.upvote-pop {
animation: popUp 0.3s ease-out;
}
@keyframes popUp {
0% { transform: scale(1); }
50% { transform: scale(1.3); }
100% { transform: scale(1); }
}
/* Holographic line */
.holo-line {
background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), rgba(123, 47, 255, 0.3), transparent);
height: 1px;
}
/* Mobile menu */
.mobile-menu {
transform: translateX(100%);
transition: transform 0.3s ease;
}
.mobile-menu.open {
transform: translateX(0);
}
</style>
</head>
<body class="cyber-grid min-h-screen text-white">
<!-- Floating Particles -->
<div id="particles" class="fixed inset-0 pointer-events-none z-0"></div>
<!-- Toast Container -->
<div id="toast-container" class="fixed top-4 right-4 z-50 flex flex-col gap-2"></div>
<!-- Navigation -->
<nav class="fixed top-0 left-0 right-0 z-40 bg-cyber-darker/80 backdrop-blur-xl border-b border-cyber-border">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex items-center justify-between h-16">
<!-- Logo -->
<div class="flex items-center gap-3">
<div class="w-8 h-8 rounded-lg bg-gradient-to-br from-cyber-blue to-cyber-purple flex items-center justify-center">
<i data-lucide="zap" class="w-5 h-5 text-white"></i>
</div>
<span class="font-orbitron text-lg font-bold glow-text tracking-wider">CYBERVOICE</span>
</div>
<!-- Desktop Nav -->
<div class="hidden md:flex items-center gap-6">
<a href="#reviews" class="text-gray-400 hover:text-cyber-blue transition-colors font-rajdhani font-medium text-sm tracking-wide uppercase">Reviews</a>
<a href="#questions" class="text-gray-400 hover:text-cyber-blue transition-colors font-rajdhani font-medium text-sm tracking-wide uppercase">Questions</a>
<button onclick="openModal('review')" class="neon-btn px-4 py-2 rounded-lg font-rajdhani font-semibold text-cyber-blue text-sm tracking-wide uppercase">
<span class="flex items-center gap-2"><i data-lucide="plus" class="w-4 h-4"></i> New Review</span>
</button>
<button onclick="openModal('question')" class="neon-btn px-4 py-2 rounded-lg font-rajdhani font-semibold text-cyber-purple text-sm tracking-wide uppercase">
<span class="flex items-center gap-2"><i data-lucide="help-circle" class="w-4 h-4"></i> Ask Question</span>
</button>
</div>
<!-- Mobile Menu Button -->
<button id="mobile-menu-btn" class="md:hidden text-gray-400 hover:text-cyber-blue transition-colors" onclick="toggleMobileMenu()">
<i data-lucide="menu" class="w-6 h-6"></i>
</button>
</div>
</div>
</nav>
<!-- Mobile Menu -->
<div id="mobile-menu" class="mobile-menu fixed top-0 right-0 bottom-0 w-72 z-50 bg-cyber-darker/95 backdrop-blur-xl border-l border-cyber-border">
<div class="p-6">
<div class="flex justify-between items-center mb-8">
<span class="font-orbitron text-sm glow-text tracking-wider">MENU</span>
<button onclick="toggleMobileMenu()" class="text-gray-400 hover:text-cyber-blue transition-colors">
<i data-lucide="x" class="w-6 h-6"></i>
</button>
</div>
<div class="flex flex-col gap-4">
<a href="#reviews" onclick="toggleMobileMenu()" class="text-gray-300 hover:text-cyber-blue transition-colors font-rajdhani font-semibold text-lg tracking-wide uppercase flex items-center gap-3">
<i data-lucide="star" class="w-5 h-5"></i> Reviews
</a>
<a href="#questions" onclick="toggleMobileMenu()" class="text-gray-300 hover:text-cyber-blue transition-colors font-rajdhani font-semibold text-lg tracking-wide uppercase flex items-center gap-3">
<i data-lucide="message-circle" class="w-5 h-5"></i> Questions
</a>
<div class="holo-line my-4"></div>
<button onclick="openModal('review'); toggleMobileMenu();" class="neon-btn px-4 py-3 rounded-lg font-rajdhani font-semibold text-cyber-blue text-sm tracking-wide uppercase text-left flex items-center gap-3">
<i data-lucide="plus" class="w-5 h-5"></i> New Review
</button>
<button onclick="openModal('question'); toggleMobileMenu();" class="neon-btn px-4 py-3 rounded-lg font-rajdhani font-semibold text-cyber-purple text-sm tracking-wide uppercase text-left flex items-center gap-3">
<i data-lucide="help-circle" class="w-5 h-5"></i> Ask Question
</button>
</div>
</div>
</div>
<div id="mobile-overlay" class="fixed inset-0 bg-black/50 z-40 hidden" onclick="toggleMobileMenu()"></div>
<!-- Hero Section -->
<section class="relative pt-24 pb-16 md:pt-32 md:pb-24 hex-bg overflow-hidden">
<!-- Decorative elements -->
<div class="absolute top-20 left-10 w-64 h-64 bg-cyber-blue/5 rounded-full blur-3xl"></div>
<div class="absolute bottom-10 right-10 w-96 h-96 bg-cyber-purple/5 rounded-full blur-3xl"></div>
<div class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] border border-cyber-blue/5 rounded-full"></div>
<div class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[400px] h-[400px] border border-cyber-purple/5 rounded-full"></div>
<div class="relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center">
<!-- Status bar -->
<div class="inline-flex items-center gap-2 px-4 py-1.5 rounded-full border border-cyber-border bg-cyber-card/50 mb-8">
<span class="w-2 h-2 rounded-full bg-cyber-blue pulse-dot"></span>
<span class="font-mono text-xs text-cyber-blue tracking-wider">SYSTEM ONLINE</span>
<span class="text-gray-600 font-mono text-xs">|</span>
<span class="font-mono text-xs text-gray-500" id="user-count">2,847 users connected</span>
</div>
<h1 class="font-orbitron text-4xl sm:text-5xl md:text-7xl font-bold mb-6">
<span class="glitch" data-text="CYBER">CYBER</span><span class="glow-text-strong text-cyber-blue">VOICE</span>
</h1>
<p class="text-gray-400 text-lg md:text-xl max-w-2xl mx-auto mb-10 font-rajdhani leading-relaxed">
Share your experiences. Ask the community. <br class="hidden sm:block">
<span class="text-cyber-blue">Your voice echoes in the digital realm.</span>
</p>
<!-- Stats -->
<div class="flex flex-wrap justify-center gap-6 md:gap-12 mb-12">
<div class="text-center">
<div class="font-orbitron text-2xl md:text-3xl font-bold text-cyber-blue glow-text" id="stat-reviews">0</div>
<div class="text-gray-500 text-sm font-rajdhani uppercase tracking-wider mt-1">Reviews</div>
</div>
<div class="w-px h-12 bg-cyber-border hidden md:block"></div>
<div class="text-center">
<div class="font-orbitron text-2xl md:text-3xl font-bold text-cyber-purple glow-text" id="stat-questions">0</div>
<div class="text-gray-500 text-sm font-rajdhani uppercase tracking-wider mt-1">Questions</div>
</div>
<div class="w-px h-12 bg-cyber-border hidden md:block"></div>
<div class="text-center">
<div class="font-orbitron text-2xl md:text-3xl font-bold text-cyber-pink glow-text" id="stat-answers">0</div>
<div class="text-gray-500 text-sm font-rajdhani uppercase tracking-wider mt-1">Answers</div>
</div>
</div>
<!-- Quick Actions -->
<div class="flex flex-col sm:flex-row gap-4 justify-center">
<button onclick="openModal('review')" class="neon-btn px-8 py-3 rounded-xl font-rajdhani font-bold text-cyber-blue text-lg tracking-wide uppercase flex items-center justify-center gap-3">
<i data-lucide="pen-tool" class="w-5 h-5"></i> Write a Review
</button>
<button onclick="openModal('question')" class="neon-btn px-8 py-3 rounded-xl font-rajdhani font-bold text-cyber-purple text-lg tracking-wide uppercase flex items-center justify-center gap-3">
<i data-lucide="message-square-plus" class="w-5 h-5"></i> Ask a Question
</button>
</div>
</div>
</section>
<!-- Main Content -->
<main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
<!-- Tabs -->
<div class="flex border-b border-cyber-border mb-8">
<button id="tab-reviews" onclick="switchTab('reviews')" class="tab-active px-6 py-3 font-rajdhani font-bold text-sm uppercase tracking-widest border-b-2 border-transparent transition-all text-cyber-blue">
<span class="flex items-center gap-2"><i data-lucide="star" class="w-4 h-4"></i> Reviews</span>
</button>
<button id="tab-questions" onclick="switchTab('questions')" class="px-6 py-3 font-rajdhani font-bold text-sm uppercase tracking-widest border-b-2 border-transparent transition-all text-gray-500 hover:text-gray-300">
<span class="flex items-center gap-2"><i data-lucide="message-circle" class="w-4 h-4"></i> Questions</span>
</button>
</div>
<!-- Search & Filter Bar -->
<div class="flex flex-col sm:flex-row gap-4 mb-8">
<div class="relative flex-1">
<i data-lucide="search" class="absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-500"></i>
<input type="text" id="search-input" onkeyup="filterContent()" placeholder="Search the network..." class="cyber-input w-full bg-cyber-card border border-cyber-border rounded-xl pl-10 pr-4 py-3 text-white font-rajdhani placeholder-gray-600 transition-all">
</div>
<div class="flex gap-3">
<select id="sort-select" onchange="filterContent()" class="cyber-input bg-cyber-card border border-cyber-border rounded-xl px-4 py-3 text-gray-300 font-rajdhani cursor-pointer transition-all">
<option value="newest">Newest First</option>
<option value="oldest">Oldest First</option>
<option value="top">Top Rated</option>
</select>
</div>
</div>
<!-- Reviews Section -->
<section id="reviews-section">
<div id="reviews-list" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<!-- Reviews rendered by JS -->
</div>
<div id="no-reviews" class="hidden text-center py-20">
<i data-lucide="inbox" class="w-16 h-16 text-gray-700 mx-auto mb-4"></i>
<p class="text-gray-500 font-rajdhani text-xl">No reviews found in the network</p>
<button onclick="openModal('review')" class="neon-btn mt-6 px-6 py-2 rounded-lg font-rajdhani font-semibold text-cyber-blue text-sm">Be the first to review</button>
</div>
</section>
<!-- Questions Section -->
<section id="questions-section" class="hidden">
<div id="questions-list" class="flex flex-col gap-4">
<!-- Questions rendered by JS -->
</div>
<div id="no-questions" class="hidden text-center py-20">
<i data-lucide="help-circle" class="w-16 h-16 text-gray-700 mx-auto mb-4"></i>
<p class="text-gray-500 font-rajdhani text-xl">No questions found in the network</p>
<button onclick="openModal('question')" class="neon-btn mt-6 px-6 py-2 rounded-lg font-rajdhani font-semibold text-cyber-purple text-sm">Ask the first question</button>
</div>
</section>
</main>
<!-- Red Version CTA -->
<section class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mt-16 mb-8">
<div class="relative rounded-2xl overflow-hidden border border-red-500/30 bg-gradient-to-br from-red-950/40 via-cyber-dark to-red-950/20 p-8 md:p-12 text-center">
<!-- Decorative glows -->
<div class="absolute top-0 left-1/4 w-64 h-64 bg-red-500/10 rounded-full blur-3xl"></div>
<div class="absolute bottom-0 right-1/4 w-48 h-48 bg-red-700/10 rounded-full blur-3xl"></div>
<!-- Scan accent -->
<div class="absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-transparent via-red-500 to-transparent"></div>
<div class="relative">
<div class="inline-flex items-center gap-2 px-4 py-1.5 rounded-full border border-red-500/30 bg-red-950/30 mb-6">
<span class="w-2 h-2 rounded-full bg-red-500 pulse-dot" style="animation: pulse-glow 2s ease-in-out infinite; --tw-shadow-color: rgba(239,68,68,0.5);"></span>
<span class="font-mono text-xs text-red-400 tracking-wider">ADVANCED MODE</span>
</div>
<h2 class="font-orbitron text-2xl sm:text-3xl md:text-4xl font-bold mb-4">
<span style="text-shadow: 0 0 10px rgba(239,68,68,0.5), 0 0 40px rgba(239,68,68,0.2); color: #ef4444;">RED</span><span class="text-gray-300">FORGE</span>
</h2>
<p class="text-gray-400 text-lg max-w-xl mx-auto mb-8 font-rajdhani leading-relaxed">
Dive deeper. <span class="text-red-400">Advanced questions</span>, public forums, and community-driven solutions for the most complex challenges.
</p>
<a href="red.html" class="inline-flex items-center gap-3 px-8 py-4 rounded-xl font-rajdhani font-bold text-lg tracking-wide uppercase transition-all duration-300" style="background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(153,27,27,0.2)); border: 1px solid rgba(239,68,68,0.4); box-shadow: 0 0 15px rgba(239,68,68,0.15), inset 0 0 15px rgba(239,68,68,0.05); color: #ef4444;" onmouseover="this.style.borderColor='rgba(239,68,68,0.8)'; this.style.boxShadow='0 0 25px rgba(239,68,68,0.3), inset 0 0 20px rgba(239,68,68,0.1)'; this.style.transform='translateY(-2px)';" onmouseout="this.style.borderColor='rgba(239,68,68,0.4)'; this.style.boxShadow='0 0 15px rgba(239,68,68,0.15), inset 0 0 15px rgba(239,68,68,0.05)'; this.style.transform='translateY(0)';">
<i data-lucide="flame" class="w-5 h-5"></i>
Enter RedForge Forums
<i data-lucide="arrow-right" class="w-5 h-5"></i>
</a>
</div>
</div>
</section>
<!-- Footer -->
<footer class="border-t border-cyber-border">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-10">
<div class="flex flex-col md:flex-row justify-between items-center gap-6">
<div class="flex items-center gap-3">
<div class="w-6 h-6 rounded bg-gradient-to-br from-cyber-blue to-cyber-purple flex items-center justify-center">
<i data-lucide="zap" class="w-3 h-3 text-white"></i>
</div>
<span class="font-orbitron text-xs glow-text tracking-wider">CYBERVOICE</span>
<span class="text-gray-600 font-mono text-xs">v2.0.77</span>
</div>
<div class="flex items-center gap-6">
<span class="flex items-center gap-2 text-gray-500 text-xs font-mono">
<span class="w-1.5 h-1.5 rounded-full bg-green-500 pulse-dot"></span> All systems operational
</span>
<span class="text-gray-600 text-xs font-mono">© 2025 CyberVoice</span>
</div>
</div>
</div>
</footer>
<!-- Review Modal -->
<div id="modal-review" class="fixed inset-0 z-50 hidden">
<div class="absolute inset-0 bg-black/60 backdrop-blur-sm" onclick="closeModal('review')"></div>
<div class="relative flex items-center justify-center min-h-screen p-4">
<div class="relative bg-cyber-dark border border-cyber-border rounded-2xl w-full max-w-lg p-6 md:p-8 scan-line overflow-hidden">
<div class="absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-cyber-blue via-cyber-purple to-cyber-blue"></div>
<div class="flex justify-between items-center mb-6">
<h2 class="font-orbitron text-xl font-bold glow-text tracking-wider">NEW REVIEW</h2>
<button onclick="closeModal('review')" class="text-gray-500 hover:text-cyber-blue transition-colors">
<i data-lucide="x" class="w-5 h-5"></i>
</button>
</div>
<form onsubmit="submitReview(event)" class="space-y-5">
<div>
<label class="text-gray-400 text-sm font-rajdhani uppercase tracking-wider mb-2 block">Your Handle</label>
<input type="text" id="review-author" required placeholder="Enter your handle..." class="cyber-input w-full bg-cyber-card border border-cyber-border rounded-lg px-4 py-3 text-white font-rajdhani placeholder-gray-600 transition-all">
</div>
<div>
<label class="text-gray-400 text-sm font-rajdhani uppercase tracking-wider mb-2 block">Subject</label>
<input type="text" id="review-title" required placeholder="What are you reviewing?" class="cyber-input w-full bg-cyber-card border border-cyber-border rounded-lg px-4 py-3 text-white font-rajdhani placeholder-gray-600 transition-all">
</div>
<div>
<label class="text-gray-400 text-sm font-rajdhani uppercase tracking-wider mb-2 block">Rating</label>
<div class="star-rating flex gap-2" id="star-rating">
<span class="star text-3xl" data-value="1" onclick="setRating(1)">★</span>
<span class="star text-3xl" data-value="2" onclick="setRating(2)">★</span>
<span class="star text-3xl" data-value="3" onclick="setRating(3)">★</span>
<span class="star text-3xl" data-value="4" onclick="setRating(4)">★</span>
<span class="star text-3xl" data-value="5" onclick="setRating(5)">★</span>
</div>
</div>
<div>
<label class="text-gray-400 text-sm font-rajdhani uppercase tracking-wider mb-2 block">Your Review</label>
<textarea id="review-content" required rows="4" placeholder="Share your experience..." class="cyber-input w-full bg-cyber-card border border-cyber-border rounded-lg px-4 py-3 text-white font-rajdhani placeholder-gray-600 transition-all resize-none"></textarea>
</div>
<div>
<label class="text-gray-400 text-sm font-rajdhani uppercase tracking-wider mb-2 block">Category</label>
<select id="review-category" class="cyber-input w-full bg-cyber-card border border-cyber-border rounded-lg px-4 py-3 text-gray-300 font-rajdhani cursor-pointer transition-all">
<option value="technology">Technology</option>
<option value="gaming">Gaming</option>
<option value="software">Software</option>
<option value="hardware">Hardware</option>
<option value="service">Service</option>
<option value="other">Other</option>
</select>
</div>
<button type="submit" class="neon-btn w-full py-3 rounded-xl font-rajdhani font-bold text-cyber-blue text-lg tracking-wide uppercase">
Submit Review
</button>
</form>
</div>
</div>
</div>
<!-- Question Modal -->
<div id="modal-question" class="fixed inset-0 z-50 hidden">
<div class="absolute inset-0 bg-black/60 backdrop-blur-sm" onclick="closeModal('question')"></div>
<div class="relative flex items-center justify-center min-h-screen p-4">
<div class="relative bg-cyber-dark border border-cyber-border rounded-2xl w-full max-w-lg p-6 md:p-8 scan-line overflow-hidden">
<div class="absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-cyber-purple via-cyber-blue to-cyber-purple"></div>
<div class="flex justify-between items-center mb-6">
<h2 class="font-orbitron text-xl font-bold glow-text tracking-wider" style="text-shadow: 0 0 10px rgba(123,47,255,0.5);">ASK QUESTION</h2>
<button onclick="closeModal('question')" class="text-gray-500 hover:text-cyber-blue transition-colors">
<i data-lucide="x" class="w-5 h-5"></i>
</button>
</div>
<form onsubmit="submitQuestion(event)" class="space-y-5">
<div>
<label class="text-gray-400 text-sm font-rajdhani uppercase tracking-wider mb-2 block">Your Handle</label>
<input type="text" id="question-author" required placeholder="Enter your handle..." class="cyber-input w-full bg-cyber-card border border-cyber-border rounded-lg px-4 py-3 text-white font-rajdhani placeholder-gray-600 transition-all">
</div>
<div>
<label class="text-gray-400 text-sm font-rajdhani uppercase tracking-wider mb-2 block">Your Question</label>
<input type="text" id="question-title" required placeholder="What do you want to know?" class="cyber-input w-full bg-cyber-card border border-cyber-border rounded-lg px-4 py-3 text-white font-rajdhani placeholder-gray-600 transition-all">
</div>
<div>
<label class="text-gray-400 text-sm font-rajdhani uppercase tracking-wider mb-2 block">Details (optional)</label>
<textarea id="question-details" rows="3" placeholder="Add more context..." class="cyber-input w-full bg-cyber-card border border-cyber-border rounded-lg px-4 py-3 text-white font-rajdhani placeholder-gray-600 transition-all resize-none"></textarea>
</div>
<div>
<label class="text-gray-400 text-sm font-rajdhani uppercase tracking-wider mb-2 block">Category</label>
<select id="question-category" class="cyber-input w-full bg-cyber-card border border-cyber-border rounded-lg px-4 py-3 text-gray-300 font-rajdhani cursor-pointer transition-all">
<option value="technology">Technology</option>
<option value="gaming">Gaming</option>
<option value="software">Software</option>
<option value="hardware">Hardware</option>
<option value="service">Service</option>
<option value="other">Other</option>
</select>
</div>
<button type="submit" class="neon-btn w-full py-3 rounded-xl font-rajdhani font-bold text-cyber-purple text-lg tracking-wide uppercase">
Submit Question
</button>
</form>
</div>
</div>
</div>
<!-- Answer Modal -->
<div id="modal-answer" class="fixed inset-0 z-50 hidden">
<div class="absolute inset-0 bg-black/60 backdrop-blur-sm" onclick="closeModal('answer')"></div>
<div class="relative flex items-center justify-center min-h-screen p-4">
<div class="relative bg-cyber-dark border border-cyber-border rounded-2xl w-full max-w-lg p-6 md:p-8 scan-line overflow-hidden">
<div class="absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-cyber-blue via-cyber-pink to-cyber-blue"></div>
<div class="flex justify-between items-center mb-6">
<h2 class="font-orbitron text-lg font-bold glow-text tracking-wider">POST ANSWER</h2>
<button onclick="closeModal('answer')" class="text-gray-500 hover:text-cyber-blue transition-colors">
<i data-lucide="x" class="w-5 h-5"></i>
</button>
</div>
<form onsubmit="submitAnswer(event)" class="space-y-5">
<input type="hidden" id="answer-question-id">
<div>
<label class="text-gray-400 text-sm font-rajdhani uppercase tracking-wider mb-2 block">Your Handle</label>
<input type="text" id="answer-author" required placeholder="Enter your handle..." class="cyber-input w-full bg-cyber-card border border-cyber-border rounded-lg px-4 py-3 text-white font-rajdhani placeholder-gray-600 transition-all">
</div>
<div>
<label class="text-gray-400 text-sm font-rajdhani uppercase tracking-wider mb-2 block">Your Answer</label>
<textarea id="answer-content" required rows="4" placeholder="Share your knowledge..." class="cyber-input w-full bg-cyber-card border border-cyber-border rounded-lg px-4 py-3 text-white font-rajdhani placeholder-gray-600 transition-all resize-none"></textarea>
</div>
<button type="submit" class="neon-btn w-full py-3 rounded-xl font-rajdhani font-bold text-cyber-blue text-lg tracking-wide uppercase">
Submit Answer
</button>
</form>
</div>
</div>
</div>
<script>
// ============ DATA ============
let currentRating = 0;
let currentTab = 'reviews';
let reviews = JSON.parse(localStorage.getItem('cybervoice-reviews')) || [
{
id: 1,
author: 'NeonRider',
title: 'QuantumNet Pro Router',
content: 'Absolutely incredible speeds. The quantum tunneling protocol delivers consistent 10Gbps even through concrete walls. Best networking hardware I\'ve ever used.',
rating: 5,
category: 'hardware',
date: new Date(Date.now() - 86400000).toISOString(),
likes: 24
},
{
id: 2,
author: 'CyberFox_42',
title: 'NexusOS 12.0',
content: 'The new holographic desktop environment is mind-blowing. However, I experienced some driver compatibility issues with legacy peripherals. Still, a massive leap forward.',
rating: 4,
category: 'software',
date: new Date(Date.now() - 172800000).toISOString(),
likes: 18
},
{
id: 3,
author: 'PixelDrift',
title: 'EvoSphere Gaming Chair',
content: 'The neural feedback system is a game-changer for long sessions. Haptic response is precise. Only downside is the price point — very premium.',
rating: 4,
category: 'gaming',
date: new Date(Date.now() - 259200000).toISOString(),
likes: 12
},
{
id: 4,
author: 'ByteWitch',
title: 'CloudVault Secure Storage',
content: 'Zero-knowledge encryption with sub-second access times. The AI-powered threat detection caught two phishing attempts before I even noticed. Highly recommended.',
rating: 5,
category: 'service',
date: new Date(Date.now() - 345600000).toISOString(),
likes: 31
},
{
id: 5,
author: 'GlitchWalker',
title: 'SynthWave Audio DAC',
content: 'Audiophile-grade conversion with 32-bit/768kHz support. The spatial audio rendering puts you right in the middle of the soundstage. Worth every credit.',
rating: 5,
category: 'hardware',
date: new Date(Date.now() - 432000000).toISOString(),
likes: 15
},
{
id: 6,
author: 'VoidHacker',
title: 'NeuralLink IDE v3',
content: 'The brain-computer interface coding mode is revolutionary but still feels experimental. Traditional keyboard input still faster for complex debugging. Promising though.',
rating: 3,
category: 'software',
date: new Date(Date.now() - 518400000).toISOString(),
likes: 9
}
];
let questions = JSON.parse(localStorage.getItem('cybervoice-questions')) || [
{
id: 1,
author: 'DataPulse',
title: 'Best quantum encryption for personal use?',
details: 'I\'m looking for a quantum encryption solution for personal data storage. What do you recommend?',
category: 'technology',
date: new Date(Date.now() - 86400000).toISOString(),
likes: 8,
answers: [
{ id: 1, author: 'CipherNova', content: 'I\'ve been using QLock Personal. It\'s free, open-source, and implements QKD-256. Works great for local storage.', date: new Date(Date.now() - 72000000).toISOString(), likes: 5 },
{ id: 2, author: 'NeonRider', content: 'Second QLock. Also check out VaultQ — it has a free tier with 50GB quantum-encrypted cloud storage.', date: new Date(Date.now() - 36000000).toISOString(), likes: 3 }
]
},
{
id: 2,
author: 'SkyNet_99',
title: 'Is the new HoloDisplay X1 worth upgrading?',
details: 'Currently using the HoloDisplay V3. Is the X1 a meaningful upgrade or just incremental?',
category: 'hardware',
date: new Date(Date.now() - 172800000).toISOString(),
likes: 14,
answers: [
{ id: 1, author: 'PixelDrift', content: 'The refresh rate jump from 120Hz to 240Hz is only noticeable in competitive VR. For general use, stick with V3.', date: new Date(Date.now() - 86400000).toISOString(), likes: 7 }
]
},
{
id: 3,
author: 'GhostTerminal',
title: 'How to set up a mesh network with AI traffic routing?',
details: 'I want to build a home mesh network that uses AI for traffic optimization. Any guides or recommendations?',
category: 'technology',
date: new Date(Date.now() - 259200000).toISOString(),
likes: 6,
answers: []
}
];
// ============ SAVE ============
function saveData() {
localStorage.setItem('cybervoice-reviews', JSON.stringify(reviews));
localStorage.setItem('cybervoice-questions', JSON.stringify(questions));
}
// ============ RENDER ============
function renderReviews(filteredReviews) {
const list = document.getElementById('reviews-list');
const noMsg = document.getElementById('no-reviews');
const data = filteredReviews || reviews;
if (data.length === 0) {
list.innerHTML = '';
noMsg.classList.remove('hidden');
return;
}
noMsg.classList.add('hidden');
list.innerHTML = data.map(review => {
const stars = Array.from({length: 5}, (_, i) =>
`<span class="${i < review.rating ? 'text-cyber-blue' : 'text-gray-700'}" style="${i < review.rating ? 'filter: drop-shadow(0 0 3px rgba(0,212,255,0.4))' : ''}">★</span>`
).join('');
const categoryColors = {
technology: 'from-cyan-500/20 to-cyan-500/5 text-cyan-400 border-cyan-500/30',
gaming: 'from-green-500/20 to-green-500/5 text-green-400 border-green-500/30',
software: 'from-purple-500/20 to-purple-500/5 text-purple-400 border-purple-500/30',
hardware: 'from-orange-500/20 to-orange-500/5 text-orange-400 border-orange-500/30',
service: 'from-blue-500/20 to-blue-500/5 text-blue-400 border-blue-500/30',
other: 'from-gray-500/20 to-gray-500/5 text-gray-400 border-gray-500/30',
};
const catClass = categoryColors[review.category] || categoryColors.other;
return `
<div class="cyber-card rounded-xl p-5 fade-in">
<div class="flex items-start justify-between mb-3">
<div class="flex items-center gap-3">
<div class="w-9 h-9 rounded-lg bg-gradient-to-br from-cyber-blue/30 to-cyber-purple/30 flex items-center justify-center border border-cyber-blue/20">
<span class="font-orbitron text-xs text-cyber-blue">${review.author.charAt(0).toUpperCase()}</span>
</div>
<div>
<div class="font-rajdhani font-semibold text-white text-sm">@${review.author}</div>
<div class="font-mono text-xs text-gray-600">${timeAgo(review.date)}</div>
</div>
</div>
<span class="bg-gradient-to-r ${catClass} border rounded-md px-2 py-0.5 text-xs font-rajdhani uppercase tracking-wider">${review.category}</span>
</div>
<h3 class="font-rajdhani font-bold text-lg text-white mb-2 leading-tight">${review.title}</h3>
<div class="text-lg mb-3 tracking-wider">${stars}</div>
<p class="text-gray-400 text-sm leading-relaxed mb-4">${review.content}</p>
<div class="holo-line mb-3"></div>
<div class="flex items-center justify-between">
<button onclick="likeReview(${review.id})" class="flex items-center gap-2 text-gray-500 hover:text-cyber-blue transition-colors group">
<i data-lucide="thumbs-up" class="w-4 h-4 group-hover:drop-shadow-[0_0_5px_rgba(0,212,255,0.5)]"></i>
<span class="font-mono text-xs">${review.likes}</span>
</button>
<button class="text-gray-600 hover:text-gray-400 transition-colors" title="Share">
<i data-lucide="share-2" class="w-4 h-4"></i>
</button>
</div>
</div>
`;
}).join('');
lucide.createIcons();
}
function renderQuestions(filteredQuestions) {
const list = document.getElementById('questions-list');
const noMsg = document.getElementById('no-questions');
const data = filteredQuestions || questions;
if (data.length === 0) {
list.innerHTML = '';
noMsg.classList.remove('hidden');
return;
}
noMsg.classList.add('hidden');
list.innerHTML = data.map(q => {
const categoryColors = {
technology: 'from-cyan-500/20 to-cyan-500/5 text-cyan-400 border-cyan-500/30',
gaming: 'from-green-500/20 to-green-500/5 text-green-400 border-green-500/30',
software: 'from-purple-500/20 to-purple-500/5 text-purple-400 border-purple-500/30',
hardware: 'from-orange-500/20 to-orange-500/5 text-orange-400 border-orange-500/30',
service: 'from-blue-500/20 to-blue-500/5 text-blue-400 border-blue-500/30',
other: 'from-gray-500/20 to-gray-500/5 text-gray-400 border-gray-500/30',
};
const catClass = categoryColors[q.category] || categoryColors.other;
const answersHTML = q.answers.map(a => `
<div class="ml-4 sm:ml-8 mt-3 pl-4 border-l-2 border-cyber-purple/30 fade-in">
<div class="flex items-center gap-2 mb-1">
<div class="w-6 h-6 rounded bg-cyber-purple/20 flex items-center justify-center">
<span class="font-orbitron text-[8px] text-cyber-purple">${a.author.charAt(0).toUpperCase()}</span>
</div>
<span class="font-rajdhani text-sm text-cyber-purple font-semibold">@${a.author}</span>
<span class="font-mono text-[10px] text-gray-600">${timeAgo(a.date)}</span>
</div>
<p class="text-gray-400 text-sm">${a.content}</p>
<button onclick="likeAnswer(${q.id}, ${a.id})" class="flex items-center gap-1 text-gray-600 hover:text-cyber-blue transition-colors mt-1 group">
<i data-lucide="thumbs-up" class="w-3 h-3 group-hover:drop-shadow-[0_0_5px_rgba(0,212,255,0.5)]"></i>
<span class="font-mono text-[10px]">${a.likes}</span>
</button>
</div>
`).join('');
return `
<div class="cyber-card rounded-xl p-5 md:p-6 fade-in">
<div class="flex items-start justify-between mb-3">
<div class="flex items-center gap-3">
<div class="w-9 h-9 rounded-lg bg-gradient-to-br from-cyber-purple/30 to-cyber-pink/30 flex items-center justify-center border border-cyber-purple/20">
<span class="font-orbitron text-xs text-cyber-purple">${q.author.charAt(0).toUpperCase()}</span>
</div>
<div>
<div class="font-rajdhani font-semibold text-white text-sm">@${q.author}</div>
<div class="font-mono text-xs text-gray-600">${timeAgo(q.date)}</div>
</div>
</div>
<span class="bg-gradient-to-r ${catClass} border rounded-md px-2 py-0.5 text-xs font-rajdhani uppercase tracking-wider">${q.category}</span>
</div>
<h3 class="font-rajdhani font-bold text-lg text-white mb-2 leading-tight">${q.title}</h3>
${q.details ? `<p class="text-gray-400 text-sm leading-relaxed mb-4">${q.details}</p>` : ''}
<div class="flex items-center gap-4 mb-3">
<button onclick="likeQuestion(${q.id})" class="flex items-center gap-2 text-gray-500 hover:text-cyber-blue transition-colors group">
<i data-lucide="arrow-big-up" class="w-5 h-5 group-hover:drop-shadow-[0_0_5px_rgba(0,212,255,0.5)]"></i>
<span class="font-mono text-xs">${q.likes}</span>
</button>
<div class="flex items-center gap-2 text-gray-500">
<i data-lucide="message-circle" class="w-4 h-4"></i>
<span class="font-mono text-xs">${q.answers.length} answer${q.answers.length !== 1 ? 's' : ''}</span>
</div>
<button onclick="openAnswerModal(${q.id})" class="ml-auto text-cyber-blue hover:text-cyber-lightblue transition-colors font-rajdhani font-semibold text-sm flex items-center gap-1">
<i data-lucide="reply" class="w-4 h-4"></i> Answer
</button>
</div>
${q.answers.length > 0 ? `<div class="holo-line mb-3"></div>` : ''}
${answersHTML}
</div>
`;
}).join('');
lucide.createIcons();
}
// ============ UTILITIES ============
function timeAgo(dateStr) {
const now = new Date();
const date = new Date(dateStr);
const seconds = Math.floor((now - date) / 1000);
if (seconds < 60) return 'just now';
if (seconds < 3600) return `${Math.floor(seconds / 60)}m ago`;
if (seconds < 86400) return `${Math.floor(seconds / 3600)}h ago`;
if (seconds < 604800) return `${Math.floor(seconds / 86400)}d ago`;
return date.toLocaleDateString('en-US', { month: 'short', day: 'numeric' });
}
function showToast(message, type = 'success') {
const container = document.getElementById('toast-container');
const colors = {
success: 'border-cyber-blue bg-cyber-dark',
error: 'border-red-500 bg-cyber-dark',
info: 'border-cyber-purple bg-cyber-dark',
};
const icons = {
success: 'check-circle',
error: 'alert-circle',
info: 'info',
};
const textColors = {
success: 'text-cyber-blue',
error: 'text-red-400',
info: 'text-cyber-purple',
};
const toast = document.createElement('div');
toast.className = `toast ${colors[type]} border rounded-lg px-4 py-3 flex items-center gap-3 shadow-lg shadow-black/30`;
toast.innerHTML = `
<i data-lucide="${icons[type]}" class="w-5 h-5 ${textColors[type]}"></i>
<span class="font-rajdhani text-sm text-gray-200">${message}</span>
`;
container.appendChild(toast);
lucide.createIcons();
setTimeout(() => {
toast.remove();
}, 3000);
}
// ============ TABS ============
function switchTab(tab) {
currentTab = tab;
const tabReviews = document.getElementById('tab-reviews');
const tabQuestions = document.getElementById('tab-questions');
const sectionReviews = document.getElementById('reviews-section');
const sectionQuestions = document.getElementById('questions-section');
if (tab === 'reviews') {
tabReviews.className = 'tab-active px-6 py-3 font-rajdhani font-bold text-sm uppercase tracking-widest border-b-2 border-transparent transition-all text-cyber-blue';
tabQuestions.className = 'px-6 py-3 font-rajdhani font-bold text-sm uppercase tracking-widest border-b-2 border-transparent transition-all text-gray-500 hover:text-gray-300';
sectionReviews.classList.remove('hidden');
sectionQuestions.classList.add('hidden');
} else {
tabQuestions.className = 'tab-active px-6 py-3 font-rajdhani font-bold text-sm uppercase tracking-widest border-b-2 border-transparent transition-all text-cyber-blue';
tabReviews.className = 'px-6 py-3 font-rajdhani font-bold text-sm uppercase tracking-widest border-b-2 border-transparent transition-all text-gray-500 hover:text-gray-300';
sectionQuestions.classList.remove('hidden');
sectionReviews.classList.add('hidden');
renderQuestions();
}
}
// ============ MODALS ============
function openModal(type) {
document.getElementById(`modal-${type}`).classList.remove('hidden');
document.body.style.overflow = 'hidden';
}
function closeModal(type) {
document.getElementById(`modal-${type}`).classList.add('hidden');
document.body.style.overflow = '';
}
function openAnswerModal(questionId) {
document.getElementById('answer-question-id').value = questionId;
openModal('answer');
}
// ============ STAR RATING ============
function setRating(value) {
currentRating = value;
const stars = document.querySelectorAll('#star-rating .star');
stars.forEach((star, i) => {
star.classList.toggle('active', i < value);
});
}
// ============ SUBMISSIONS ============
function submitReview(e) {
e.preventDefault();
if (currentRating === 0) {
showToast('Please select a rating', 'error');
return;
}
const review = {
id: Date.now(),
author: document.getElementById('review-author').value.trim(),
title: document.getElementById('review-title').value.trim(),
content: document.getElementById('review-content').value.trim(),
rating: currentRating,
category: document.getElementById('review-category').value,
date: new Date().toISOString(),
likes: 0
};
reviews.unshift(review);
saveData();
renderReviews();
updateStats();
closeModal('review');
showToast('Review transmitted successfully!', 'success');
// Reset form
e.target.reset();
currentRating = 0;
document.querySelectorAll('#star-rating .star').forEach(s => s.classList.remove('active'));
}
function submitQuestion(e) {
e.preventDefault();
const question = {
id: Date.now(),
author: document.getElementById('question-author').value.trim(),
title: document.getElementById('question-title').value.trim(),
details: document.getElementById('question-details').value.trim(),
category: document.getElementById('question-category').value,
date: new Date().toISOString(),
likes: 0,
answers: []
};
questions.unshift(question);
saveData();
renderQuestions();
updateStats();
closeModal('question');
showToast('Question transmitted to the network!', 'info');
e.target.reset();
}
function submitAnswer(e) {
e.preventDefault();
const questionId = parseInt(document.getElementById('answer-question-id').value);
const answer = {
id: Date.now(),
author: document.getElementById('answer-author').value.trim(),
content: document.getElementById('answer-content').value.trim(),
date: new Date().toISOString(),
likes: 0
};
const question = questions.find(q => q.id === questionId);
if (question) {
question.answers.push(answer);
saveData();
renderQuestions();
updateStats();
closeModal('answer');
showToast('Answer posted successfully!', 'success');
}
e.target.reset();
}
// ============ LIKES ============
function likeReview(id) {
const review = reviews.find(r => r.id === id);
if (review) {
review.likes++;
saveData();
renderReviews();
}
}
function likeQuestion(id) {
const question = questions.find(q => q.id === id);
if (question) {
question.likes++;
saveData();
renderQuestions();
}
}
function likeAnswer(questionId, answerId) {
const question = questions.find(q => q.id === questionId);
if (question) {
const answer = question.answers.find(a => a.id === answerId);
if (answer) {
answer.likes++;
saveData();
renderQuestions();
}
}
}
// ============ SEARCH & FILTER ============
function filterContent() {
const query = document.getElementById('search-input').value.toLowerCase().trim();
const sort = document.getElementById('sort-select').value;
let filteredReviews = [...reviews];
let filteredQuestions = [...questions];
if (query) {
filteredReviews = filteredReviews.filter(r =>
r.title.toLowerCase().includes(query) ||
r.content.toLowerCase().includes(query) ||
r.author.toLowerCase().includes(query) ||
r.category.toLowerCase().includes(query)
);
filteredQuestions = filteredQuestions.filter(q =>
q.title.toLowerCase().includes(query) ||
(q.details && q.details.toLowerCase().includes(query)) ||
q.author.toLowerCase().includes(query) ||
q.category.toLowerCase().includes(query)
);
}
// Sort
if (sort === 'newest') {
filteredReviews.sort((a, b) => new Date(b.date) - new Date(a.date));
filteredQuestions.sort((a, b) => new Date(b.date) - new Date(a.date));
} else if (sort === 'oldest') {
filteredReviews.sort((a, b) => new Date(a.date) - new Date(b.date));
filteredQuestions.sort((a, b) => new Date(a.date) - new Date(b.date));
} else if (sort === 'top') {
filteredReviews.sort((a, b) => b.likes - a.likes);
filteredQuestions.sort((a, b) => b.likes - a.likes);
}
renderReviews(filteredReviews);
renderQuestions(filteredQuestions);
}
// ============ MOBILE MENU ============
function toggleMobileMenu() {
const menu = document.getElementById('mobile-menu');
const overlay = document.getElementById('mobile-overlay');
menu.classList.toggle('open');
overlay.classList.toggle('hidden');
}
// ============ STATS ============
function updateStats() {
const totalReviews = reviews.length;
const totalQuestions = questions.length;
const totalAnswers = questions.reduce((sum, q) => sum + q.answers.length, 0);
animateCounter('stat-reviews', totalReviews);
animateCounter('stat-questions', totalQuestions);
animateCounter('stat-answers', totalAnswers);
}
function animateCounter(elementId, target) {
const el = document.getElementById(elementId);
const current = parseInt(el.textContent) || 0;
const increment = target > current ? 1 : -1;
const duration = 600;
const steps = Math.abs(target - current);
const stepTime = steps > 0 ? duration / steps : 0;
let count = current;
const timer = setInterval(() => {
count += increment;
el.textContent = count;
if (count === target) clearInterval(timer);
}, stepTime);
}
// ============ PARTICLES ============
function createParticles() {
const container = document.getElementById('particles');
for (let i = 0; i < 30; i++) {
const particle = document.createElement('div');
particle.className = 'particle';
particle.style.left = Math.random() * 100 + '%';
particle.style.animationDuration = (Math.random() * 15 + 10) + 's';
particle.style.animationDelay = (Math.random() * 15) + 's';
particle.style.width = (Math.random() * 2 + 1) + 'px';
particle.style.height = particle.style.width;
if (Math.random() > 0.7) {
particle.style.background = 'rgba(123, 47, 255, 0.5)';
}
container.appendChild(particle);
}
}
// ============ USER COUNT ANIMATION ============
function animateUserCount() {
const el = document.getElementById('user-count');
const base = 2847;
setInterval(() => {
const variation = Math.floor(Math.random() * 20) - 10;
const count = base + variation;
el.textContent = count.toLocaleString() + ' users connected';
}, 5000);
}
// ============ KEYBOARD SHORTCUTS ============
document.addEventListener('keydown', (e) => {
if (e.key === 'Escape') {
closeModal('review');
closeModal('question');
closeModal('answer');
const menu = document.getElementById('mobile-menu');
if (menu.classList.contains('open')) toggleMobileMenu();
}
});
// ============ INIT ============
function init() {
createParticles();
renderReviews();
renderQuestions();
updateStats();
animateUserCount();
lucide.createIcons();
}
document.addEventListener('DOMContentLoaded', init);
</script>
<script src="https://deepsite.hf.co/deepsite-badge.js"></script>
</body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CyberVoice - Reviews & Q&A</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/lucide@latest"></script>
<link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap" rel="stylesheet">
<script>
tailwind.config = {
theme: {
extend: {
fontFamily: {
orbitron: ['Orbitron', 'sans-serif'],
rajdhani: ['Rajdhani', 'sans-serif'],
mono: ['Share Tech Mono', 'monospace'],
},
colors: {
cyber: {
dark: '#0a0e1a',
darker: '#060810',
mid: '#0d1526',
blue: '#00d4ff',
lightblue: '#4de8ff',
purple: '#7b2fff',
pink: '#ff2d95',
navy: '#1a1f3a',
card: '#0f1629',
border: '#1a2744',
}
}
}
}
}
</script>
<style>
* { scrollbar-width: thin; scrollbar-color: #00d4ff #0a0e1a; }
*::-webkit-scrollbar { width: 6px; }
*::-webkit-scrollbar-track { background: #0a0e1a; }
*::-webkit-scrollbar-thumb { background: #00d4ff; border-radius: 3px; }
body {
background: #0a0e1a;
font-family: 'Rajdhani', sans-serif;
overflow-x: hidden;
}
/* Cyber Grid Background */
.cyber-grid {
background-image:
linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
background-size: 50px 50px;
}
/* Glowing text */
.glow-text {
text-shadow: 0 0 10px rgba(0, 212, 255, 0.5), 0 0 40px rgba(0, 212, 255, 0.2);
}
.glow-text-strong {
text-shadow: 0 0 10px rgba(0, 212, 255, 0.8), 0 0 30px rgba(0, 212, 255, 0.4), 0 0 60px rgba(0, 212, 255, 0.2);
}
/* Neon border */
.neon-border {
border: 1px solid rgba(0, 212, 255, 0.3);
box-shadow: 0 0 10px rgba(0, 212, 255, 0.1), inset 0 0 10px rgba(0, 212, 255, 0.05);
}
.neon-border:hover {
border-color: rgba(0, 212, 255, 0.6);
box-shadow: 0 0 20px rgba(0, 212, 255, 0.2), inset 0 0 15px rgba(0, 212, 255, 0.08);
}
/* Neon button */
.neon-btn {
background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(123, 47, 255, 0.15));
border: 1px solid rgba(0, 212, 255, 0.4);
box-shadow: 0 0 15px rgba(0, 212, 255, 0.2), inset 0 0 15px rgba(0, 212, 255, 0.05);
transition: all 0.3s ease;
}
.neon-btn:hover {
background: linear-gradient(135deg, rgba(0, 212, 255, 0.25), rgba(123, 47, 255, 0.25));
border-color: rgba(0, 212, 255, 0.8);
box-shadow: 0 0 25px rgba(0, 212, 255, 0.4), inset 0 0 20px rgba(0, 212, 255, 0.1);
transform: translateY(-1px);
}
.neon-btn:active {
transform: translateY(0px);
}
/* Card hover */
.cyber-card {
background: linear-gradient(135deg, #0f1629, #0d1526);
border: 1px solid rgba(0, 212, 255, 0.15);
transition: all 0.4s ease;