<!DOCTYPE html>
<html>
<head>
  <title>Screen Share</title>
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    }

    body {
      width: 320px;
      padding: 16px;
      background: #f8f9fa;
    }

    .container {
      background: white;
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
      overflow: hidden;
    }

    .header {
      padding: 16px;
      background: #fff;
      border-bottom: 1px solid #eee;
    }

    .header h1 {
      font-size: 16px;
      font-weight: 600;
      color: #1a1a1a;
      margin-bottom: 4px;
    }

    .header p {
      font-size: 13px;
      color: #666;
      line-height: 1.4;
    }

    .broadcast-controls {
      padding: 16px;
      display: flex;
      gap: 8px;
    }

    button {
      padding: 10px 16px;
      border-radius: 8px;
      border: none;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s ease;
      flex: 1;
    }

    #startBroadcast {
      background: #2563eb;
      color: white;
    }

    #startBroadcast:hover {
      background: #1d4ed8;
    }

    #stopBroadcast {
      background: #dc2626;
      color: white;
    }

    #stopBroadcast:hover {
      background: #b91c1c;
    }

    .viewer-list {
      padding: 16px;
      border-top: 1px solid #eee;
    }

    .viewer-list h2 {
      font-size: 14px;
      font-weight: 600;
      color: #1a1a1a;
      margin-bottom: 12px;
    }

    .viewer-item {
      padding: 12px;
      margin: 8px 0;
      background: #f8f9fa;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .viewer-item:hover {
      background: #f1f3f5;
    }

    .stream-icon {
      width: 32px;
      height: 32px;
      background: #e2e8f0;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .stream-icon svg {
      width: 18px;
      height: 18px;
      color: #64748b;
    }

    .stream-info {
      flex: 1;
    }

    .stream-title {
      font-size: 13px;
      font-weight: 500;
      color: #1a1a1a;
      margin-bottom: 2px;
    }

    .stream-meta {
      font-size: 12px;
      color: #666;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .viewer-count {
      display: flex;
      align-items: center;
      gap: 4px;
      color: #4b5563;
      background: #e5e7eb;
      padding: 2px 6px;
      border-radius: 4px;
      font-weight: 500;
    }

    .viewer-icon {
      width: 14px;
      height: 14px;
      color: #6b7280;
    }

    .no-streams {
      text-align: center;
      padding: 24px 16px;
      color: #666;
      font-size: 13px;
    }

    .error {
      background: #fee2e2;
      color: #991b1b;
      padding: 12px;
      border-radius: 8px;
      font-size: 13px;
      margin-top: 8px;
    }
  </style>
</head>
<body>
  <div class="container">
    <div class="header">
      <h1>ScreenLink</h1>
      <p>Share your screen with other extension users</p>
    </div>

    <div class="broadcast-controls">
      <button id="startBroadcast">
        Start Broadcasting
      </button>
      <button id="stopBroadcast" style="display: none;">
        Stop Broadcasting
      </button>
    </div>

    <div class="viewer-list">
      <h2>Available Streams</h2>
      <div id="streamList"></div>
    </div>
  </div>

  <script type="module" src="popup.js"></script>
</body>
</html> 