@tailwind base;
@tailwind components;
@tailwind utilities;

      /* カスタムスタイル */
      .court-container {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 10px 0;
      }
      .court {
        background-color: #a7e3a0; /* より鮮やかな緑 */
        border: 2px solid white;
        position: relative;
        width: 90%; /* スマホ表示のため少し広げる */
        max-width: 400px; /* 最大幅も少し調整 */
        aspect-ratio: 2 / 3;
        margin: 0 auto;
        overflow: hidden; /* SVG描画のため */
        touch-action: none; /* コート内での意図しないスクロールを防ぐ */
      }
      /* SVGベースのコートライン */
      .court-svg {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        stroke: white;
        stroke-width: 2;
        fill: none;
        pointer-events: none; /* SVGがドラッグ操作を妨げないように */
      }
      /* ゴール */
      .goal {
        position: absolute;
        background-color: transparent;
        border: 2px solid white;
        width: 40%;
        height: 5%;
        left: 50%;
        transform: translateX(-50%);
        z-index: 5;
        pointer-events: none; /* ゴールがドラッグ操作を妨げないように */
      }
      .goal.top { top: 0; }
      .goal.bottom { bottom: 0; }

      /* プレースホルダー共通 */
      .player-placeholder {
        width: 50px; /* スマホ向けに少し小さく */
        height: 50px;
        border: 2px dashed white;
        border-radius: 50%;
        position: absolute;
        display: flex;
        justify-content: center;
        align-items: center;
        color: white;
        font-size: 11px; /* 少し小さく */
        font-weight: bold;
        background-color: rgba(0, 0, 0, 0.5); /* 少し濃く */
        cursor: grab; /* ドラッグ可能を示すカーソル */
        transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.2s ease;
        z-index: 10;
        touch-action: none; /* プレースホルダードラッグ中のスクロールを防ぐ */
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
      }
      .player-placeholder.over {
        background-color: rgba(255, 255, 255, 0.3);
        border-style: solid;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.8); /* ドロップターゲットを分かりやすく */
      }
      .player-placeholder img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
        pointer-events: none; /* 画像自体がイベントを拾わないように */
      }
      .player-placeholder.dragging-placeholder {
        opacity: 0.7; /* 透明度を少し上げる */
        border-style: solid;
        transform: scale(1.1); /* 少し大きくしてドラッグ中を分かりやすく */
        cursor: grabbing; /* ドラッグ中のカーソル */
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        z-index: 1000; /* 最前面に表示 */
      }
      /* ベンチのプレースホルダー */
      .reserve-bench .player-placeholder {
        position: static; /* ベンチ内では通常配置 */
        transform: none;
        margin: 4px; /* 間隔調整 */
        cursor: grab;
        box-shadow: none;
      }
       .reserve-bench .player-placeholder.dragging-placeholder {
         position: absolute; /* ドラッグ開始時に絶対配置に戻す */
         transform: scale(1.1); /* スケールは維持 */
       }


      /* リザーブエリア */
      .reserve-bench {
        margin-top: 15px;
        padding: 10px;
        border: 2px dashed #ccc; /* 枠線を少し太く */
        border-radius: 8px;
        background-color: #f0f0f0; /* 背景色変更 */
        min-height: 70px; /* 高さを少し調整 */
        position: relative;
        display: flex;
        flex-wrap: wrap;
        gap: 8px; /* 要素間のギャップ調整 */
        justify-content: center;
        align-items: center;
      }
      .reserve-bench.over {
          background-color: #e0e0e0; /* ドラッグオーバー時の背景色 */
          border-style: solid;
          border-color: #aaa;
      }


      /* アップロード画像 */
      .uploaded-image {
        width: 55px; /* サイズ調整 */
        height: 55px;
        object-fit: cover;
        border: 1px solid #ccc;
        border-radius: 8px;
        margin: 5px;
        cursor: grab;
        touch-action: none; /* ドラッグ中のスクロールを防ぐ */
      }
      .uploaded-image.dragging {
        opacity: 0.5;
        cursor: grabbing;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
      }
      #uploaded-images-container.over {
          background-color: #e8f0fe; /* ドラッグオーバー時の背景色 */
          border: 2px dashed #a0c4ff; /* 枠線を追加 */
      }


      /* メッセージボックス */
      #message-box {
        position: fixed;
        top: 10px; /* 少し上に */
        left: 50%;
        transform: translateX(-50%);
        background-color: rgba(76, 175, 80, 0.9); /* 少し透過 */
        color: white;
        padding: 12px 25px; /* パディング調整 */
        border-radius: 20px; /* 角丸を強く */
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        z-index: 2000; /* 最前面 */
        display: none;
        opacity: 0;
        transition: opacity 0.5s ease-in-out, top 0.3s ease-out;
        font-size: 0.9rem;
      }
      #message-box.show {
        display: block;
        opacity: 1;
        top: 20px; /* 表示時に少し下げるアニメーション */
      }

