<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>HTMLRunner</title>
  <style>
    body {
      font-family: 'Segoe UI', sans-serif;
      background: #f0f4f8;
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 100vh;
      margin: 0;
      color: #333;
    }
    .card {
      background: white;
      border-radius: 12px;
      box-shadow: 0 10px 25px rgba(0,0,0,0.1);
      max-width: 500px;
      width: 100%;
      overflow: hidden;
    }
    .header {
      background: linear-gradient(135deg, #1e3a5f, #2563eb);
      color: white;
      padding: 24px;
    }
    h1 { margin: 0; font-size: 24px; }
    .badge {
      background: rgba(255,255,255,0.2);
      padding: 4px 10px;
      border-radius: 20px;
      font-size: 12px;
      float: right;
    }
    .content { padding: 24px; }
    ul { line-height: 1.8; color: #555; }
    .btn {
      background: #2563eb; color: white; border: none;
      padding: 10px 20px; border-radius: 6px; cursor: pointer;
      font-size: 16px; width: 100%; margin-top: 20px;
    }
    .btn:hover { background: #1d4ed8; }
    #output { margin-top: 16px; text-align: center; color: #2563eb; font-weight: 500; }
  </style>
</head>
<body>
  <div class="card">
    <div class="header">
      <h1>Welcome to HTMLRunner</h1>
      <div class="badge">Live Preview</div>
    </div>
    <div class="content">
      <p>Write HTML in the first tab, style it with CSS in the second, add JS in the third.</p>
      <ul>
        <li>Edit any tab and click Run</li>
        <li>Open in New Tab for full view</li>
        <li>Export to download as .html</li>
      </ul>
      <button class="btn" id="actionBtn">Click Me!</button>
      <p id="output"></p>
    </div>
  </div>
  <script>
    document.getElementById('actionBtn').addEventListener('click', function() {
      var output = document.getElementById('output');
      var count = (output._count || 0) + 1;
      output._count = count;
      output.textContent = 'You clicked ' + count + ' times!';
    });
  </script>
</body>
</