/* ==========================================
   My Cassette Tape CSS
   第1部（基本設定・レイアウト・カセットエリア）
   ========================================== */

:root {
  --main-color: #000;
  --sub-color: #555;
  --border-color: #999;
  --panel-bg: #ffffff;
  --page-bg: #ffffff;
  --cassette-bg: #d8d8d8;
  --slot-bg: #f4f4f4;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    font-family:'Helvetica Neue',Arial,'ヒラギノ角ゴ Pro W3',sans-serif;
    background:var(--page-bg);
    color:#000;
    padding:20px 10px;
    display:flex;
    flex-direction:column;
    align-items:center;
    min-height:100vh;
}

.container{
    width:100%;
    max-width:680px;
    margin:0 auto;
    display:flex;
    flex-direction:column;
    gap:18px;
}

h1{
    text-align:center;
    font-size:1.9rem;
    color:#000;
    letter-spacing:2px;
    font-weight:bold;
}

.panel{
    background:var(--panel-bg);
    border:1px solid #000;
    border-radius:12px;
    padding:15px;
}

.panel-title{
    font-size:.9rem;
    font-weight:bold;
    margin-bottom:12px;
    color:#000;
}

.tape-title-input{
    width:min(100%,280px);
    border:none;
    border-bottom:1px solid #000;
    background:transparent;
    padding:4px;
    font-size:1rem;
    outline:none;
}

.tape-title-input:focus{
    border-bottom:2px solid #000;
}


/* トラックタグの位置基準を設定  ここからslot-menuまでは、AIに訊いて付け足した*/
.track-tag {
  position: relative;
  cursor: pointer;
}

/* カスタムドロップダウンメニューのスタイル */
.slot-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  background-color: #ffffff;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  max-height: 200px;
  overflow-y: auto;
  min-width: 120px;
  margin-top: 4px;
}

/* メニュー項目 */
.slot-menu-item {
  padding: 8px 12px;
  font-size: 14px;
  color: #333333;
  cursor: pointer;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.slot-menu-item:last-child {
  border-bottom: none;
}

.slot-menu-item:hover {
  background-color: #f0f0f0;
  color: #000000;
}

/* ==========================================
   カセット本体（レトロデザイン）
   ========================================== */

.cassette-deck{
    background:#c8c8c0;
    border:3px solid #666;
    border-radius:8px;
    padding:20px;
    position:relative;
    box-shadow:
        inset 0 0 0 2px #f3f3ef,
        inset 0 0 18px rgba(0,0,0,.18),
        0 5px 18px rgba(0,0,0,.18);
}

/* ラベル部分 */

.cassette-deck::before{
    content:"";
    display:block;
    width:100%;
    height:75px;
    background:#f8f6ea;
    border:1px solid #777;
    border-radius:4px;
    margin-bottom:18px;
}

/* A面・B面 */

.tape-sides-wrapper{
    display:flex;
    gap:20px;
}

.tape-side{
    flex:1;
}

.side-label{
    font-weight:bold;
    font-size:1rem;
    letter-spacing:2px;
    color:#333;
    border-bottom:2px solid #888;
    margin-bottom:10px;
    padding-bottom:5px;
}

/* 曲リスト */

.slot-list{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.slot{
    background:#f5f3ec;
    border:1px solid #aaa;
    border-radius:4px;
    min-height:42px;
    padding:4px 8px;
    display:flex;
    align-items:center;
    gap:8px;
}

.slot-num{
    min-width:22px;
    color:#444;
    font-weight:bold;
}

.slot-drop-area{
    flex:1;
    display:flex;
    align-items:center;
    min-height:32px;
}

.slot-drop-area:empty::before{
    content:"ここへドラッグ";
    color:#999;
    font-size:.8rem;
    font-style:italic;
}

.slot-drop-area .track-tag{
    width:100%;
    justify-content:space-between;
}

/* ==========================================
   ボタン共通
   ========================================== */

button{

    cursor:pointer;

    transition:.2s;

}

button:hover{

    opacity:.85;

}

.album-btn{

    display:inline-block;

    padding:10px 24px;

    background:#000;

    color:#fff;

    text-decoration:none;

    border-radius:30px;

    font-weight:bold;

}

.album-btn:hover{

    background:#333;

}

/* ==========================================
   My Cassette Tape CSS
   第2部（選曲リスト・アルバム一覧・ボタン・フッター）
   ========================================== */

/* ---------- 選曲リスト ---------- */

.stock-list{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    min-height:60px;
    padding:8px;
    background:#fff;
    border:1px dashed #999;
    border-radius:8px;
}

/* ---------- 曲タグ ---------- */

.track-tag{
    display:inline-flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;

    padding:6px 10px 6px 12px;

    background:#f2f2f2;
    color:#000;

    border:1px solid #666;
    border-radius:20px;

    font-size:.82rem;
    font-weight:bold;

    cursor:grab;
    user-select:none;
}

.track-title{
    display:inline-block;
}

.track-tag:active{
    cursor:grabbing;
}

/* ---------- 削除ボタン ---------- */

.delete-btn{

    width:27px;
    height:27px;

    border:1px solid #666;
    border-radius:50%;

    background:#ddd;
    color:#000;

    display:inline-flex;
    align-items:center;
    justify-content:center;

    font-size:18px;

    cursor:pointer;

    flex:0 0 27px;

}

.delete-btn:hover{

    background:#bbb;

}

/* ---------- アルバム一覧 ---------- */

.album-item{

    margin-bottom:10px;

}

.album-header{

    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:10px 12px;

    background:#eeeeee;

    border:1px solid #999;
    border-radius:6px;

    font-weight:bold;
    color:#000;

    cursor:pointer;

}

.album-header:hover{

    background:#dddddd;

}

.album-songs{

    display:none;

    flex-direction:column;

    gap:6px;

    padding:8px 0;

}

.album-songs.open{

    display:flex;

}

.song-btn{

    width:100%;

    text-align:left;

    padding:8px 12px;

    background:#fff;

    border:1px solid #aaa;

    border-radius:6px;

    color:#000;

    font-size:.82rem;

    cursor:pointer;

}

.song-btn:hover{

    background:#efefef;

}

/* ---------- X投稿ボタン ---------- */

.tweet-btn{

    width:100%;

    padding:14px;

    background:#000;

    color:#fff;

    border:none;

    border-radius:30px;

    font-size:.95rem;

    font-weight:bold;

}

.tweet-btn:hover:not(:disabled){

    background:#333;

}

.tweet-btn:disabled{

    background:#ccc;

    color:#777;

    cursor:not-allowed;

}

/* ---------- 画像保存ボタン ---------- */

.image-btn{

    width:max(60%,310px);
    max-width:100%;

    align-self:center;

    padding:12px;

    border:none;
    border-radius:30px;

    background:#444;
    color:#fff;

    font-weight:bold;

    cursor:pointer;

}

.image-btn:hover:not(:disabled){

    background:#222;

}

.image-btn:disabled{

    background:#ccc;

    color:#777;

    cursor:not-allowed;
}

.introduction{
    width: 100%;
    max-width:680px;
}



/* ---------- フッター ---------- */

.site-footer{

    max-width:680px;

    margin:24px auto 0;

    padding:0 16px 20px;

    text-align:center;

    font-size:.72rem;

    line-height:1.7;

    color:#555;

}

.site-footer p+p{

    margin-top:8px;

}

/* ------パソコン------ */

.affiliate-box {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 5px auto;
    max-width: 650px;
    width: 100%;
}
    

/* ------スマホ------ */

@media (max-width:600px){

    /*
    .tape-sides-wrapper{

        flex-direction:column;

        gap:15px;

    }

    .track-tag{

        width:100%;

        justify-content:space-between;

    }

    .album-header{

        font-size:.9rem;

    }

    .tweet-btn,
    .image-btn{

        font-size:.9rem;

    }
    */

    .introduction{
    width: 100%;
    }

    .affiliate-box {
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    margin: 5px 0;
    }
}