<!DOCTYPE html>
<html lang="ja">
<head>
  <meta charset="UTF-8">
  <title>短縮URL作成</title>
  <style>
    body {
      font-family: 'Helvetica Neue', Arial, sans-serif;
      background: #f4f6f8;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
      margin: 0;
      overflow: hidden;
    }
    .container {
      background: white;
      padding: 2rem;
      border-radius: 12px;
      box-shadow: 0 8px 20px rgba(0,0,0,0.1);
      width: 100%;
      max-width: 400px;
      text-align: center;
      opacity: 0;
      transform: translateY(30px);
      animation: fadeInUp 0.8s ease-out forwards;
    }
    @keyframes fadeInUp {
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    input[type="text"] {
      width: 100%;
      padding: 10px;
      margin-top: 10px;
      margin-bottom: 20px;
      border: 1px solid #ccc;
      border-radius: 8px;
      font-size: 16px;
      transition: border-color 0.3s;
    }
    input[type="text"]:focus {
      border-color: #4CAF50;
      outline: none;
    }
    button {
      background: #4CAF50;
      color: white;
      padding: 10px 20px;
      border: none;
      border-radius: 8px;
      font-size: 16px;
      cursor: pointer;
      transition: transform 0.2s, background 0.3s;
    }
    button:hover {
      background: #45a049;
      transform: translateY(-2px);
    }
    .result {
      margin-top: 20px;
      font-size: 16px;
      opacity: 0;
      transform: translateY(20px);
      transition: opacity 0.5s, transform 0.5s;
    }
    .result.show {
      opacity: 1;
      transform: translateY(0);
    }
    .copy-button {
      margin-top: 10px;
      background: #2196F3;
    }
    .copy-button:hover {
      background: #1e88e5;
    }
  </style>
</head>
<body>
  <div class="container">
    <h1>短縮URL作成</h1>
    <input type="text" id="urlInput" placeholder="短縮したいURLを入力">
    <input type="text" id="customIdInput" placeholder="カスタムID (任意)">
    <button onclick="createShortUrl()">作成</button>
    <div id="result" class="result"></div>
  </div>

  <script src="script.js"></script>
</body>
</html>
