/* 全体のスタイル */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #2c3e50;
}

h2 {
    color: #3498db;
    margin-bottom: 15px;
}

section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

/* カメラセクション */
#video-container {
    position: relative;
    margin: 0 auto;
    width: 320px;
    height: 240px;
    transform: scaleX(-1); /* カメラの左右反転 */
}

#video {
    border-radius: 4px;
    background-color: #000;
}

#overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

#controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

/* カメラセクション内のフォーム */
#camera-section form {
    margin-top: 20px;
    text-align: center;
}

#captured-face-container {
    margin-bottom: 20px;
}

#captured-face {
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

label {
    font-weight: bold;
}

input[type="text"] {
    width: 150px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.status-message {
    margin-top: 10px;
    text-align: center;
    color: #e74c3c;
    font-size: 14px;
    min-height: 20px;
}

/* 登録済み顔情報セクション */
#faces-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.face-card {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    text-align: center;
    background-color: #f9f9f9;
}

.face-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 10px;
}

.face-id {
    font-weight: bold;
    color: #2c3e50;
}

.delete-btn {
    background-color: #e74c3c;
    margin-top: 10px;
}

.delete-btn:hover {
    background-color: #c0392b;
}

footer {
    text-align: center;
    margin-top: 30px;
    color: #7f8c8d;
    font-size: 14px;
}
