anycoder-f42edded / index.html
UltraMarkoBR's picture
Upload folder using huggingface_hub
b327235 verified
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Reflexões Cósmicas | Luz e Tempo</title>
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Space+Grotesk:wght@300;500;700&display=swap" rel="stylesheet">
<!-- Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
:root {
--bg-color: #030508;
--card-bg: rgba(255, 255, 255, 0.03);
--card-border: rgba(255, 255, 255, 0.1);
--primary-glow: #00f3ff;
--secondary-glow: #bc13fe;
--text-main: #e0e0e0;
--text-muted: #94a3b8;
--accent: #ffffff;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', sans-serif;
background-color: var(--bg-color);
color: var(--text-main);
overflow-x: hidden;
line-height: 1.6;
}
/* --- Background Animation Canvas --- */
#cosmos-canvas {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
background: radial-gradient(circle at center, #0b1021 0%, #000000 100%);
}
/* --- Header --- */
header {
position: fixed;
top: 0;
width: 100%;
padding: 1.5rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
z-index: 100;
backdrop-filter: blur(10px);
border-bottom: 1px solid rgba(255,255,255,0.05);
}
.brand {
font-family: 'Space Grotesk', sans-serif;
font-size: 1.2rem;
font-weight: 700;
letter-spacing: 1px;
background: linear-gradient(90deg, var(--primary-glow), var(--secondary-glow));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.anycoder-link {
font-size: 0.85rem;
color: var(--text-muted);
text-decoration: none;
border: 1px solid var(--card-border);
padding: 0.5rem 1rem;
border-radius: 50px;
transition: all 0.3s ease;
display: flex;
align-items: center;
gap: 8px;
}
.anycoder-link:hover {
border-color: var(--primary-glow);
color: var(--primary-glow);
box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}
/* --- Hero Section --- */
.hero {
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
padding: 2rem;
position: relative;
}
.hero h1 {
font-family: 'Space Grotesk', sans-serif;
font-size: clamp(2.5rem, 5vw, 5rem);
font-weight: 700;
margin-bottom: 1rem;
line-height: 1.1;
opacity: 0;
transform: translateY(30px);
animation: fadeUp 1s ease forwards 0.5s;
}
.hero p {
font-size: clamp(1rem, 2vw, 1.25rem);
color: var(--text-muted);
max-width: 600px;
margin-bottom: 2rem;
opacity: 0;
transform: translateY(30px);
animation: fadeUp 1s ease forwards 0.8s;
}
.scroll-indicator {
position: absolute;
bottom: 40px;
animation: bounce 2s infinite;
opacity: 0.5;
}
/* --- Content Grid --- */
.container {
max-width: 1200px;
margin: 0 auto;
padding: 4rem 2rem;
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
}
/* --- Cards --- */
.card {
background: var(--card-bg);
border: 1px solid var(--card-border);
border-radius: 16px;
padding: 2rem;
position: relative;
overflow: hidden;
transition: transform 0.4s ease, box-shadow 0.4s ease;
backdrop-filter: blur(5px);
cursor: pointer;
opacity: 0; /* For scroll animation */
transform: translateY(50px);
}
.card.visible {
opacity: 1;
transform: translateY(0);
}
.card:hover {
transform: translateY(-10px);
box-shadow: 0 20px 40px rgba(0,0,0,0.4);
border-color: rgba(255,255,255,0.2);
}
.card::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 4px;
background: linear-gradient(90deg, var(--primary-glow), var(--secondary-glow));
transform: scaleX(0);
transform-origin: left;
transition: transform 0.4s ease;
}
.card:hover::before {
transform: scaleX(1);
}
.icon-box {
width: 60px;
height: 60px;
border-radius: 12px;
background: rgba(255,255,255,0.05);
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 1.5rem;
font-size: 1.5rem;
color: var(--primary-glow);
transition: all 0.3s ease;
}
.card:hover .icon-box {
background: var(--primary-glow);
color: #000;
box-shadow: 0 0 20px var(--primary-glow);
}
.card h3 {
font-family: 'Space Grotesk', sans-serif;
font-size: 1.5rem;
margin-bottom: 1rem;
color: var(--accent);
}
.card p {
color: var(--text-muted);
font-size: 0.95rem;
margin-bottom: 1.5rem;
}
.expand-content {
max-height: 0;
overflow: hidden;
transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
}
.card.active .expand-content {
max-height: 500px;
transition: max-height 0.5s ease-in-out;
}
.read-more {
font-size: 0.85rem;
color: var(--primary-glow);
text-transform: uppercase;
letter-spacing: 1px;
font-weight: 600;
display: flex;
align-items: center;
gap: 5px;
}
/* --- Footer --- */
footer {
text-align: center;
padding: 4rem 2rem;
border-top: 1px solid var(--card-border);
margin-top: 4rem;
color: var(--text-muted);
font-size: 0.9rem;
}
/* --- Animations --- */
@keyframes fadeUp {
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes bounce {
0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
40% {transform: translateY(-10px);}
60% {transform: translateY(-5px);}
}
/* --- Responsive Tweaks --- */
@media (max-width: 768px) {
header {
padding: 1rem;
}
.hero h1 {
font-size: 2.5rem;
}
}
</style>
</head>
<body>
<!-- Background Canvas -->
<canvas id="cosmos-canvas"></canvas>
<!-- Navigation -->
<header>
<div class="brand">COSMOS.IO</div>
<a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="anycoder-link">
<i class="fa-solid fa-code"></i>
Built with anycoder
</a>
</header>
<!-- Hero Section -->
<section class="hero">
<h1>Além da Velocidade<br>da Luz</h1>
<p>As perguntas que ecoam na mente humana: Como a luz viaja? O tempo é uma linha ou um círculo? O que acontece se quebrarmos a barreira cósmica?</p>
<div class="scroll-indicator">
<i class="fa-solid fa-chevron-down" style="color: white;"></i>
</div>
</section>
<!-- Main Content -->
<main class="container">
<div class="grid">
<!-- Card 1: Light Propagation -->
<article class="card" onclick="toggleCard(this)">
<div class="icon-box">
<i class="fa-solid fa-bolt"></i>
</div>
<h3>A Propagação da Luz</h3>
<p>A luz não é apenas o que vemos, é o tecido da realidade. Ela se comporta como onda e partícula simultaneamente.</p>
<div class="expand-content">
<p style="margin-top: 1rem; font-size: 0.9rem;">
A luz viaja no vácuo a aproximadamente <strong>299.792.458 metros por segundo</strong>. Diferente do som, que precisa de um meio (como ar ou água) para se propagar, a luz é radiação eletromagnética que se autossustenta. Quando você olha para as estrelas, está olhando para o passado, pois a luz leva anos para chegar aos seus olhos.
</p>
</div>
<div class="read-more">
Explorar <i class="fa-solid fa-arrow-right"></i>
</div>
</article>
<!-- Card 2: Time Travel -->
<article class="card" onclick="toggleCard(this)">
<div class="icon-box">
<i class="fa-solid fa-hourglass-half"></i>
</div>
<h3>O Paradoxo do Tempo</h3>
<p>Se voltássemos no tempo, o que aconteceria? A física sugere que o tempo é relativo, não absoluto.</p>
<div class="expand-content">
<p style="margin-top: 1rem; font-size: 0.9rem;">
Segundo a Teoria da Relatividade de Einstein, o tempo dilata conforme a velocidade aumenta. Se você viajasse perto da velocidade da luz, o tempo passaria mais devagar para você do que para quem ficou na Terra. Viajar para o futuro é cientificamente possível (dilatação temporal), mas voltar ao passado envolve paradoxos complexos e buracos de minhoca teóricos.
</p>
</div>
<div class="read-more">
Explorar <i class="fa-solid fa-arrow-right"></i>
</div>
</article>
<!-- Card 3: Speed Limit -->
<article class="card" onclick="toggleCard(this)">
<div class="icon-box">
<i class="fa-solid fa-rocket"></i>
</div>
<h3>Ultrapassando a Luz</h3>
<p>O que seria necessário para quebrar a barreira da velocidade da luz e quais seriam as consequências?</p>
<div class="expand-content">
<p style="margin-top: 1rem; font-size: 0.9rem;">
Para um objeto com massa atingir a velocidade da luz, seria necessária uma quantidade <strong>infinita de energia</strong>. No entanto, teorias como o "Warp Drive" (Dobra Espacial) sugerem que, em vez de mover a nave através do espaço, poderíamos contrair o espaço à frente e expandi-lo atrás, permitindo viajar mais rápido que a luz sem violar as leis locais da física.
</p>
</div>
<div class="read-more">
Explorar <i class="fa-solid fa-arrow-right"></i>
</div>
</article>
</div>
</main>
<footer>
<p>&copy; 2023 Reflexões Cósmicas. Uma exploração visual da física teórica.</p>
<p style="margin-top: 10px; font-size: 0.8rem; opacity: 0.6;">Desenvolvido com curiosidade infinita.</p>
</footer>
<script>
// --- 1. Canvas Starfield Animation (Warp Effect) ---
const canvas = document.getElementById('cosmos-canvas');
const ctx = canvas.getContext('2d');
let width, height;
let stars = [];
const numStars = 800;
const speed = 2; // Base speed
function resize() {
width = window.innerWidth;
height = window.innerHeight;
canvas.width = width;
canvas.height = height;
}
class Star {
constructor() {
this.init();
}
init() {
this.x = (Math.random() - 0.5) * width * 2;
this.y = (Math.random() - 0.5) * height * 2;
this.z = Math.random() * width; // Depth
this.pz = this.z; // Previous Z for trail effect
}
update() {
this.z -= speed * 5; // Move star towards viewer
if (this.z < 1) {
this.init();
this.z = width;
this.pz = this.z;
}
}
draw() {
// Perspective projection
const sx = (this.x / this.z) * (width / 2) + (width / 2);
const sy = (this.y / this.z) * (height / 2) + (height / 2);
// Calculate size based on proximity
const r = (width / this.z) * 0.8;
// Draw trail (warp effect)
const px = (this.x / this.pz) * (width / 2) + (width / 2);
const py = (this.y / this.pz) * (height / 2) + (height / 2);
this.pz = this.z;
ctx.beginPath();
ctx.moveTo(px, py);
ctx.lineTo(sx, sy);
// Color variation
const opacity = 1 - (this.z / width);
ctx.strokeStyle = `rgba(200, 230, 255, ${opacity})`;
ctx.lineWidth = r;
ctx.stroke();
}
}
function initStars() {
stars = [];
for (let i = 0; i < numStars; i++) {
stars.push(new Star());
}
}
function animate() {
// Clear with slight fade for motion blur effect
ctx.fillStyle = 'rgba(3, 5, 8, 0.4)';
ctx.fillRect(0, 0, width, height);
stars.forEach(star => {
star.update();
star.draw();
});
requestAnimationFrame(animate);
}
window.addEventListener('resize', () => {
resize();
initStars();
});
// Initialize Canvas
resize();
initStars();
animate();
// --- 2. Scroll Reveal Animation ---
const observerOptions = {
threshold: 0.1,
rootMargin: "0px 0px -50px 0px"
};
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('visible');
// Optional: Unobserve after revealing
// observer.unobserve(entry.target);
}
});
}, observerOptions);
document.querySelectorAll('.card').forEach(card => {
observer.observe(card);
});
// --- 3. Card Interaction ---
function toggleCard(card) {
// Close other cards (accordion style) - Optional, remove if you want multiple open
document.querySelectorAll('.card').forEach(c => {
if (c !== card) c.classList.remove('active');
});
card.classList.toggle('active');
}
</script>
</body>
</html>