/* ============================================================
    🎓 卒業制作展 撮影ブース - 2段セレクタ対応 CSS 完全版
   ============================================================ */

/* --- 全体のリセットと基本スタイル --- */
body {
    margin: 0;
    padding: 0;
    overflow: hidden; /* スマホでのスクロールを防止 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #000; /* 全体の背景を黒に */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100vw;
    touch-action: manipulation; /* ダブルタップズームなどを無効化 */
}

#app-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* --- カメラビュー (撮影画面) --- */
#camera-view {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    background-color: #000; /* 隙間が見える場合に備えて背景を黒に */
    overflow: hidden; /* はみ出し防止 */
}

#video, #output-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* object-fit: cover; は画面いっぱいに広げるため、端が少し切れて「近く」見えます。
もし、もっと全体を映したい（遠くしたい）場合は 
    object-fit: contain; に変えてみてください。
    */
    object-fit: cover; 
    
    transform: scaleX(-1); 
    /* 左右反転 */
}
/* --- 2段セレクター (ほっぺた & 頭) --- */
.selector-container {
    position: absolute;
    width: 90%;
    max-width: 400px;
    height: 45px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5); /* 半透明の黒背景 */
    padding: 8px;
    border-radius: 30px;
    z-index: 10;
}

/* 下段：ほっぺた用セレクター */
#cheek-selector {
    bottom: 170px; /* シャッターボタンの上 */
}

/* 上段：頭のエフェクト用セレクター */
#head-selector {
    bottom: 235px; /* ほっぺたセレクターの上 */
}

/* 選択肢のアイコン画像 */
.selector-option {
    width: 38px;
    height: 38px;
    object-fit: contain;
    cursor: pointer;
    opacity: 0.5; /* 非選択時は薄く */
    transition: all 0.2s ease;
    border-radius: 50%;
}

/* 選択されている時の強調 */
.selector-option.selected {
    opacity: 1.0;
    transform: scale(1.25); /* 少し大きく */
    border: 3px solid #F72FEE; /* テーマカラーのピンク枠 */
    padding: 2px;
    background-color: rgba(255, 255, 255, 0.2);
}

/* --- シャッターボタン --- */
.capture-button {
    position: absolute;
    bottom: 73px; /* 下部に配置 */
    width: 85px;
    height: 85px;
    background-color: transparent;
    border: 6px solid white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    cursor: pointer;
    outline: none;
}

.capture-button::after {
    content: '';
    display: block;
    width: 65px;
    height: 65px;
    background-color: white;
    border-radius: 50%;
}

/* --- プレビュービュー (撮影後画面) --- */
#preview-view {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    padding: 20px 0 80px 0;
    box-sizing: border-box;
    background-color: #000;
}

#preview-message {
    color: #F72FEE;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    padding: 10px 20px;
    background-color: rgba(247, 47, 238, 0.1);
    border-radius: 30px;
}

#photo-frame {
    width: calc(100% - 40px);
    max-width: 450px;
    aspect-ratio: 3 / 4;
    background-color: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

#preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#preview-controls {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 95%;
    max-width: 500px;
}

/* --- プレビュー用ボタン共通 --- */
.action-button {
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.action-button .icon {
    font-size: 2em;
    margin-bottom: 5px;
}

.action-button .button-text {
    font-size: 0.7em;
    font-weight: bold;
    letter-spacing: 1px;
}

/* 小さいボタン (DOWNLOAD, RETAKE) */
.small-button {
    color: #ccc;
}

/* --- client.css 修正箇所 --- */

/* 真ん中の大きい送信ボタン (SEND) */
.large-send-button {
    color: #F72FEE;
    background-color: #fff;
    border-radius: 50%;
    width: 95px;
    height: 95px;
    box-shadow: 0 5px 15px rgba(247, 47, 238, 0.4);

    /* 追加：中身を上下左右中央に寄せる設定 */
    display: flex;
    flex-direction: column;
    justify-content: center; /* 縦方向の中央 */
    align-items: center;     /* 横方向の中央 */
}

.large-send-button .icon {
    font-size: 2.8em;
    margin-bottom: 0; /* 下の隙間をゼロにする（重要） */
    line-height: 1;   /* 行間の余白を詰める */
}

.large-send-button .button-text {
    margin-top: -2px; /* 必要に応じてテキストの位置を微調整 */
}
/* --- その他 --- */
video {
    display: block;
}