🚀 Interactive Counter Application

Live deployment generated by AI SWE Agent

📋 Request ID: swe-1759099300562-cbdb48d4
⏰ Generated: 28/09/2025, 18:44:13
📁 Files: 1 files created
Live Counter
Message Updates
Interactive Buttons
Modern Styling
Responsive Design
app.html (HTML)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Interactive App</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; padding: 20px; } .app-container { max-width: 600px; margin: 0 auto; background: rgba(255, 255, 255, 0.95); border-radius: 20px; padding: 40px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); text-align: center; } h1 { font-size: 2.5rem; margin-bottom: 30px; color: #333; } .counter-section { background: #f8f9fa; padding: 30px; border-radius: 15px; margin-bottom: 30px; } .counter-display { font-size: 3rem; font-weight: bold; color: #667eea; margin-bottom: 20px; } button { background: #667eea; color: white; border: none; padding: 15px 30px; margin: 0 10px; border-radius: 25px; cursor: pointer; font-weight: 600; font-size: 16px; transition: all 0.3s ease; } button:hover { background: #5a67d8; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); } .input-section { background: #f8f9fa; padding: 20px; border-radius: 15px; } input[type="text"] { width: 100%; padding: 15px; border: 2px solid #e0e0e0; border-radius: 10px; font-size: 16px; text-align: center; outline: none; } input[type="text"]:focus { border-color: #667eea; } </style> </head> <body> <div class="app-container"> <h1 id="message">Hello from Interactive App!</h1> <div class="counter-section"> <div class="counter-display" id="counter">0</div> <button onclick="increment()">Increment</button> <button onclick="decrement()">Decrement</button> <button onclick="reset()">Reset</button> </div> <div class="input-section"> <input type="text" id="messageInput" placeholder="Enter your message..." onchange="updateMessage(this.value)"> </div> </div> <script> let count = 0; let message = 'Hello from Interactive App!'; function updateDisplay() { document.getElementById('counter').textContent = count; document.getElementById('message').textContent = message; } function increment() { count++; updateDisplay(); } function decrement() { count--; updateDisplay(); } function reset() { count = 0; updateDisplay(); } function updateMessage(newMessage) { message = newMessage || 'Hello from Interactive App!'; updateDisplay(); } // Initialize updateDisplay(); </script> </body> </html>
\n\n"}]; function showFile(index) { // Hide all file sections document.querySelectorAll('.file-section').forEach(section => { section.style.display = 'none'; }); // Remove active class from all tabs document.querySelectorAll('.file-tab').forEach(tab => { tab.classList.remove('active'); }); // Show selected file and activate tab document.getElementById('file-' + index).style.display = 'block'; document.querySelectorAll('.file-tab')[index].classList.add('active'); } function copyCode(index) { const content = files[index].content; navigator.clipboard.writeText(content).then(() => { const btn = document.querySelectorAll('.copy-btn')[index]; const originalText = btn.textContent; btn.textContent = '✅ Copied!'; btn.style.background = '#059669'; setTimeout(() => { btn.textContent = originalText; btn.style.background = '#10b981'; }, 2000); }); }