Mercurial
diff react_games/public/base.css @ 37:fb9bcd3145cb
[ReactGames] Few games I made using react just to practice few things.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 01 Dec 2025 20:22:47 -0800 |
| parents | |
| children | 9f4429c49733 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/react_games/public/base.css Mon Dec 01 20:22:47 2025 -0800 @@ -0,0 +1,266 @@ +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; + background: linear-gradient(135deg, #667eea 10%, #764ba2 100%); + background-attachment: fixed; + background-repeat: no-repeat; + background-size: cover; + min-height: 100vh; + overflow-x: hidden; +} + +.container { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + padding: 2rem; + position: relative; +} + +/* Animated background particles */ +.particle { + position: absolute; + background: rgba(255, 255, 255, 0.1); + border-radius: 50%; + pointer-events: none; + animation: float 6s ease-in-out infinite; +} + +.particle:nth-child(1) { width: 80px; height: 80px; top: 10%; left: 10%; animation-delay: 0s; } +.particle:nth-child(2) { width: 60px; height: 60px; top: 20%; right: 10%; animation-delay: 2s; } +.particle:nth-child(3) { width: 40px; height: 40px; bottom: 30%; left: 20%; animation-delay: 4s; } +.particle:nth-child(4) { width: 100px; height: 100px; bottom: 10%; right: 20%; animation-delay: 1s; } + +@keyframes float { + 0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.7; } + 50% { transform: translateY(-20px) rotate(180deg); opacity: 0.3; } +} + +.main-content { + text-align: center; + z-index: 10.logo:hover::before { + transform: rotate(45deg) translate(50%, 50%); + }; + max-width: 800px; +} + +.logo-container { + margin-bottom: 2rem; + position: relative; +} + +.logo { + width: 120px; + height: 120px; + background: url('epi_favicon.svg'); + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + margin: 0 auto; + box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15); + transition: transform 0.3s ease; + position: relative; + overflow: hidden; +} + +.logo::before { + content: ''; + position: absolute; + top: -50%; + left: -50%; + width: 200%; + height: 200%; + background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent); + transform: rotate(45deg); + transition: transform 0.6s ease; +} + +.logo:hover { + transform: scale(1.05) rotate(5deg); +} + +.logo-placeholder { + font-size: 3rem; + color: #333; +} + +h1 { + font-size: 3.5rem; + font-weight: 800; + color: white; + margin-bottom: 1rem; + background: linear-gradient(45deg, #fff, #f0f0f0); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; + text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); + animation: fadeInUp 1s ease-out; +} + +.subtitle { + font-size: 1.3rem; + color: rgba(255, 255, 255, 0.9); + margin-bottom: 3rem; + font-weight: 300; + animation: fadeInUp 1s ease-out 0.2s both; +} + +.nav-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: 2rem; + width: 100%; + max-width: 800px; + animation: fadeInUp 1s ease-out 0.4s both; +} + +.nav-card { + background: rgba(255, 255, 255, 0.1); + backdrop-filter: blur(20px); + border-radius: 20px; + padding: 2.5rem 2rem; + text-decoration: none; + color: white; + transition: all 0.3s ease; + border: 1px solid rgba(255, 255, 255, 0.2); + position: relative; + overflow: hidden; + group: hover; +} + +.nav-card::before { + content: ''; + position: absolute; + top: 0; + left: -100%; + width: 100%; + height: 100%; + background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent); + transition: left 0.5s ease; +} + +.nav-card:hover::before { + left: 100%; +} + +.nav-card:hover { + transform: translateY(-10px) scale(1.02); + background: rgba(255, 255, 255, 0.15); + box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2); +} + +.nav-icon { + font-size: 3rem; + margin-bottom: 1rem; + display: block; + transition: transform 0.3s ease; +} + +.nav-card:hover .nav-icon { + transform: scale(1.1) rotate(5deg); +} + +.nav-title { + font-size: 1.5rem; + font-weight: 600; + margin-bottom: 0.5rem; +} + +.nav-description { + font-size: 1rem; + opacity: 0.8; + line-height: 1.5; +} + +.games { --accent: #ff6b6b; } +.todo { --accent: #4ecdc4; } +.others { --accent: #45b7d1; } + +.nav-card.games:hover { border-color: var(--accent); box-shadow: 0 25px 50px rgba(255, 107, 107, 0.3); } +.nav-card.todo:hover { border-color: var(--accent); box-shadow: 0 25px 50px rgba(78, 205, 196, 0.3); } +.nav-card.others:hover { border-color: var(--accent); box-shadow: 0 25px 50px rgba(69, 183, 209, 0.3); } + +@keyframes fadeInUp { + from { + opacity: 0; + transform: translateY(30px); + } + to { + opacity: 1; + transform: translateY(0); + } +} + +@media (max-width: 768px) { + h1 { + font-size: 2.5rem; + } + + .subtitle { + font-size: 1.1rem; + } + + .nav-grid { + grid-template-columns: 1fr; + gap: 1.5rem; + } + + .nav-card { + padding: 2rem 1.5rem; + } +} + +/* Floating elements */ +.floating-shape { + position: absolute; + pointer-events: none; + opacity: 0.1; +} + +.shape-1 { + top: 10%; + left: 5%; + width: 50px; + height: 50px; + background: white; + border-radius: 10px; + animation: rotate 10s linear infinite; +} + +.shape-2 { + top: 70%; + right: 10%; + width: 30px; + height: 30px; + background: white; + border-radius: 50%; + animation: rotate 15s linear infinite reverse; +} + +@keyframes rotate { + from { transform: rotate(0deg); } + to { transform: rotate(360deg); } +} + +/* This gets used within the script */ +@keyframes sparkleAnim { + 0% { + transform: scale(0) rotate(0deg); + opacity: 1; + } + 50% { + transform: scale(1) rotate(180deg); + opacity: 1; + } + 100% { + transform: scale(0) rotate(360deg); + opacity: 0; + } +}