Spaces:
Running
Running
| <html lang="fa" dir="rtl"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> | |
| <title>چت روم ساده | iOS Glassmorphism</title> | |
| <!-- Font Awesome 6 --> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <!-- Google Fonts: Vazirmatn for Persian --> | |
| <link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;700&display=swap" rel="stylesheet"> | |
| <style> | |
| :root { | |
| /* iOS Glassmorphism Color Palette */ | |
| --bg-gradient-start: #1a1a2e; | |
| --bg-gradient-mid: #16213e; | |
| --bg-gradient-end: #0f3460; | |
| --primary-accent: #E94584; | |
| --secondary-accent: #4FD3C4; | |
| --glass-bg: rgba(255, 255, 255, 0.1); | |
| --glass-border: rgba(255, 255, 255, 0.2); | |
| --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37); | |
| --text-color: #ffffff; | |
| --text-muted: rgba(255, 255, 255, 0.7); | |
| --font-main: 'Vazirmatn', sans-serif; | |
| --status-bar-height: 44px; | |
| --dock-height: 90px; | |
| } | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| -webkit-tap-highlight-color: transparent; | |
| } | |
| body { | |
| font-family: var(--font-main); | |
| background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-end) 100%); | |
| min-height: 100vh; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| overflow: hidden; /* Prevent body scroll, handle inside app */ | |
| color: var(--text-color); | |
| position: relative; | |
| } | |
| /* Abstract Background Shapes for Glass Effect */ | |
| .shape { | |
| position: absolute; | |
| border-radius: 50%; | |
| filter: blur(80px); | |
| z-index: 0; | |
| animation: float 10s infinite ease-in-out; | |
| } | |
| .shape-1 { | |
| width: 300px; | |
| height: 300px; | |
| background: var(--primary-accent); | |
| top: -50px; | |
| left: -50px; | |
| opacity: 0.4; | |
| } | |
| .shape-2 { | |
| width: 400px; | |
| height: 400px; | |
| background: #533483; | |
| bottom: -100px; | |
| right: -100px; | |
| opacity: 0.3; | |
| animation-delay: -5s; | |
| } | |
| @keyframes float { | |
| 0%, 100% { transform: translate(0, 0); } | |
| 50% { transform: translate(20px, -20px); } | |
| } | |
| /* Main App Container (Phone Frame on Desktop) */ | |
| .app-wrapper { | |
| position: relative; | |
| z-index: 1; | |
| width: 100%; | |
| height: 100vh; | |
| max-width: 480px; /* Mobile width constraint */ | |
| background: rgba(0, 0, 0, 0.2); | |
| display: flex; | |
| flex-direction: column; | |
| overflow: hidden; | |
| box-shadow: 0 0 50px rgba(0,0,0,0.5); | |
| } | |
| /* Glass Utility Class */ | |
| .glass { | |
| background: var(--glass-bg); | |
| backdrop-filter: blur(20px); | |
| -webkit-backdrop-filter: blur(20px); | |
| border: 1px solid var(--glass-border); | |
| box-shadow: var(--glass-shadow); | |
| } | |
| /* Status Bar */ | |
| .status-bar { | |
| height: var(--status-bar-height); | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| padding: 0 20px; | |
| font-size: 0.85rem; | |
| font-weight: 600; | |
| z-index: 100; | |
| border-bottom: 1px solid rgba(255,255,255,0.05); | |
| } | |
| .status-right { | |
| display: flex; | |
| gap: 8px; | |
| align-items: center; | |
| } | |
| .status-left { | |
| display: flex; | |
| gap: 6px; | |
| align-items: center; | |
| } | |
| .brand-link { | |
| color: var(--secondary-accent); | |
| text-decoration: none; | |
| font-size: 0.75rem; | |
| margin-right: 10px; | |
| opacity: 0.9; | |
| transition: opacity 0.3s; | |
| } | |
| .brand-link:hover { opacity: 1; text-decoration: underline; } | |
| /* Main Content Scroll Area */ | |
| .content-scroll { | |
| flex: 1; | |
| overflow-y: auto; | |
| padding: 20px; | |
| padding-bottom: calc(var(--dock-height) + 20px); | |
| scrollbar-width: none; /* Firefox */ | |
| } | |
| .content-scroll::-webkit-scrollbar { | |
| display: none; /* Chrome/Safari */ | |
| } | |
| /* Hero Section */ | |
| .hero { | |
| text-align: center; | |
| margin-top: 20px; | |
| margin-bottom: 30px; | |
| padding: 30px 20px; | |
| border-radius: 24px; | |
| position: relative; | |
| overflow: hidden; | |
| transition: transform 0.3s ease; | |
| } | |
| .hero:hover { | |
| transform: translateY(-2px); | |
| } | |
| .hero h1 { | |
| font-size: 2rem; | |
| margin-bottom: 10px; | |
| text-shadow: 0 2px 10px rgba(0,0,0,0.2); | |
| } | |
| .subtitle { | |
| font-size: 1rem; | |
| color: var(--text-muted); | |
| font-weight: 300; | |
| } | |
| /* Features Grid (Widgets) */ | |
| .features { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); | |
| gap: 15px; | |
| margin-bottom: 30px; | |
| } | |
| .feature { | |
| padding: 20px; | |
| border-radius: 20px; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| text-align: center; | |
| transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); | |
| cursor: pointer; | |
| } | |
| .feature:hover { | |
| background: rgba(255, 255, 255, 0.15); | |
| transform: scale(1.03); | |
| } | |
| .feature .icon-box { | |
| width: 50px; | |
| height: 50px; | |
| border-radius: 12px; | |
| background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05)); | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 1.5rem; | |
| margin-bottom: 15px; | |
| color: var(--secondary-accent); | |
| box-shadow: 0 4px 15px rgba(0,0,0,0.1); | |
| } | |
| .feature h3 { | |
| font-size: 1rem; | |
| margin-bottom: 5px; | |
| } | |
| .feature p { | |
| font-size: 0.8rem; | |
| color: var(--text-muted); | |
| line-height: 1.4; | |
| } | |
| /* Bottom Dock (CTA) */ | |
| .dock-container { | |
| position: absolute; | |
| bottom: 20px; | |
| left: 20px; | |
| right: 20px; | |
| height: var(--dock-height); | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| z-index: 50; | |
| } | |
| .dock { | |
| display: flex; | |
| gap: 15px; | |
| padding: 15px 25px; | |
| border-radius: 30px; | |
| backdrop-filter: blur(25px) saturate(180%); | |
| -webkit-backdrop-filter: blur(25px) saturate(180%); | |
| background: rgba(255, 255, 255, 0.1); | |
| border: 1px solid rgba(255, 255, 255, 0.2); | |
| box-shadow: 0 10px 40px rgba(0,0,0,0.3); | |
| align-items: center; | |
| } | |
| /* Buttons */ | |
| .btn { | |
| text-decoration: none; | |
| padding: 12px 24px; | |
| border-radius: 20px; | |
| font-size: 0.9rem; | |
| font-weight: 700; | |
| transition: all 0.3s ease; | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 8px; | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .btn::after { | |
| content: ''; | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| background: rgba(255,255,255,0.2); | |
| opacity: 0; | |
| transition: opacity 0.3s; | |
| } | |
| .btn:hover::after { | |
| opacity: 1; | |
| } | |
| .btn:active { | |
| transform: scale(0.95); | |
| } | |
| .btn-primary { | |
| background: linear-gradient(135deg, var(--primary-accent), #c0356e); | |
| color: white; | |
| box-shadow: 0 4px 15px rgba(233, 69, 132, 0.4); | |
| } | |
| .btn-secondary { | |
| background: rgba(255, 255, 255, 0.1); | |
| color: white; | |
| border: 1px solid rgba(255, 255, 255, 0.2); | |
| } | |
| .btn-secondary:hover { | |
| background: rgba(255, 255, 255, 0.2); | |
| } | |
| /* Navigation Indicator (Home Bar) */ | |
| .home-indicator { | |
| position: absolute; | |
| bottom: 8px; | |
| left: 50%; | |
| transform: translateX(-50%); | |
| width: 120px; | |
| height: 5px; | |
| background: rgba(255, 255, 255, 0.3); | |
| border-radius: 10px; | |
| z-index: 60; | |
| } | |
| /* Toast Notification */ | |
| .toast { | |
| position: absolute; | |
| top: 60px; | |
| left: 50%; | |
| transform: translateX(-50%) translateY(-20px); | |
| background: rgba(0, 0, 0, 0.8); | |
| backdrop-filter: blur(10px); | |
| color: white; | |
| padding: 10px 20px; | |
| border-radius: 20px; | |
| font-size: 0.85rem; | |
| opacity: 0; | |
| pointer-events: none; | |
| transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); | |
| z-index: 200; | |
| white-space: nowrap; | |
| display: flex; | |
| align-items: center; | |
| gap: 8px; | |
| } | |
| .toast.show { | |
| opacity: 1; | |
| transform: translateX(-50%) translateY(0); | |
| } | |
| /* Responsive */ | |
| @media (max-width: 480px) { | |
| .app-wrapper { | |
| max-width: 100%; | |
| border-radius: 0; | |
| height: 100vh; | |
| } | |
| .hero h1 { | |
| font-size: 1.8rem; | |
| } | |
| .dock { | |
| width: 100%; | |
| justify-content: space-around; | |
| padding: 15px; | |
| } | |
| .btn { | |
| padding: 10px 18px; | |
| font-size: 0.85rem; | |
| } | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <!-- Background Shapes --> | |
| <div class="shape shape-1"></div> | |
| <div class="shape shape-2"></div> | |
| <!-- Main Wrapper --> | |
| <div class="app-wrapper"> | |
| <!-- Status Bar --> | |
| <div class="status-bar glass"> | |
| <div class="status-right"> | |
| <span id="clock">12:00</span> | |
| <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="brand-link"> | |
| <i class="fa-solid fa-code"></i> anycoder | |
| </a> | |
| </div> | |
| <div class="status-left"> | |
| <i class="fa-solid fa-signal"></i> | |
| <i class="fa-solid fa-wifi"></i> | |
| <i class="fa-solid fa-battery-full"></i> | |
| </div> | |
| </div> | |
| <!-- Notification Toast --> | |
| <div id="toast" class="toast"> | |
| <i class="fa-solid fa-circle-info" style="color: var(--secondary-accent)"></i> | |
| <span id="toast-message">پیام سیستم</span> | |
| </div> | |
| <!-- Scrollable Content --> | |
| <div class="content-scroll"> | |
| <!-- Hero Widget --> | |
| <div class="container"> | |
| <div class="hero glass"> | |
| <h1>💬 چت روم ساده</h1> | |
| <p class="subtitle">محلی امن برای گفتگو با دوستان</p> | |
| </div> | |
| </div> | |
| <!-- Features Grid --> | |
| <div class="features"> | |
| <!-- Feature 1 --> | |
| <div class="feature glass" onclick="showToast('در حال انتقال به ثبتنام...')"> | |
| <div class="icon-box"> | |
| <i class="fa-solid fa-lock"></i> | |
| </div> | |
| <h3>ثبتنام آسان</h3> | |
| <p>با شماره موبایل ثبتنام کنید</p> | |
| </div> | |
| <!-- Feature 2 --> | |
| <div class="feature glass" onclick="showToast('ایجاد اتاق جدید...')"> | |
| <div class="icon-box"> | |
| <i class="fa-solid fa-users"></i> | |
| </div> | |
| <h3>ساخت اتاق</h3> | |
| <p>تا ۳ اتاق مختلف بسازید</p> | |
| </div> | |
| <!-- Feature 3 --> | |
| <div class="feature glass" onclick="showToast('اتصال به سرور چت...')"> | |
| <div class="icon-box"> | |
| <i class="fa-solid fa-comments"></i> | |
| </div> | |
| <h3>چت زنده</h3> | |
| <p>گفتگوی آنلاین و سریع</p> | |
| </div> | |
| </div> | |
| <!-- Extra Widget for Visual Interest --> | |
| <div class="glass" style="padding: 20px; border-radius: 20px; margin-bottom: 20px; display: flex; align-items: center; gap: 15px;"> | |
| <div style="background: var(--primary-accent); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;"> | |
| <i class="fa-solid fa-bell"></i> | |
| </div> | |
| <div> | |
| <h4 style="font-size: 0.9rem; margin-bottom: 2px;">اعلان جدید</h4> | |
| <p style="font-size: 0.75rem; color: var(--text-muted);">سیستم بهروزرسانی شد</p> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Bottom Dock (CTA) --> | |
| <div class="dock-container"> | |
| <div class="dock"> | |
| <a href="#" class="btn btn-secondary" onclick="simulateNav(event, 'ورود')"> | |
| <i class="fa-solid fa-arrow-right-to-bracket"></i> | |
| ورود | |
| </a> | |
| <a href="#" class="btn btn-primary" onclick="simulateNav(event, 'شروع کنید')"> | |
| شروع کنید | |
| <i class="fa-solid fa-arrow-left"></i> | |
| </a> | |
| </div> | |
| </div> | |
| <!-- Home Indicator --> | |
| <div class="home-indicator"></div> | |
| </div> | |
| <script> | |
| // Update clock in status bar | |
| function updateClock() { | |
| const now = new Date(); | |
| const hours = String(now.getHours()).padStart(2, '0'); | |
| const minutes = String(now.getMinutes()).padStart(2, '0'); | |
| document.getElementById('clock').textContent = `${hours}:${minutes}`; | |
| } | |
| setInterval(updateClock, 1000); | |
| updateClock(); | |
| // Toast Notification System | |
| function showToast(message) { | |
| const toast = document.getElementById('toast'); | |
| const msgSpan = document.getElementById('toast-message'); | |
| msgSpan.textContent = message; | |
| toast.classList.add('show'); | |
| setTimeout(() => { | |
| toast.classList.remove('show'); | |
| }, 2500); | |
| } | |
| // Simulate Navigation (Since we don't have PHP backend) | |
| function simulateNav(e, action) { | |
| e.preventDefault(); | |
| showToast(`${action} - در حال بارگذاری...`); | |
| // Add a small visual ripple effect logic here if desired | |
| const btn = e.currentTarget; | |
| btn.style.transform = "scale(0.90)"; | |
| setTimeout(() => { | |
| btn.style.transform = "scale(1)"; | |
| }, 150); | |
| } | |
| // Add subtle parallax effect to background shapes on mouse move (Desktop) | |
| document.addEventListener('mousemove', (e) => { | |
| const shapes = document.querySelectorAll('.shape'); | |
| const x = window.innerWidth / 2; | |
| const y = window.innerHeight / 2; | |
| shapes.forEach((shape, index) => { | |
| const speed = (index + 1) * 0.02; | |
| const xOffset = (e.clientX - x) * speed; | |
| const yOffset = (e.clientY - y) * speed; | |
| shape.style.transform = `translate(${xOffset}px, ${yOffset}px)`; | |
| }); | |
| }); | |
| </script> | |
| </body> | |
| </html> |