* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    font-size: 12px;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width:100vw;
}

.tabs-container {
    display: flex;
    align-items: flex-end;
    padding: 5px 3px 0 3px;
    background-color: #bdbdbd; /* やや濃いグレー */
    overflow-x: auto;
    white-space: nowrap;
}

.tabs {
    display: flex;
    flex-grow: 1;
    overflow-x: auto;
    align-items: flex-end;
}

.tab {
    padding: 5px 12px;
    background-color: #e0e0e0; /* やや濃いグレー */
    border-radius: 3px 3px 0 0;
    margin-right: 2px;
    cursor: move;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    color: #333; /* テキストを黒に */
}

.tab.active {
    background-color: #fff;
    color: #333;
}

.tab input {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-size: inherit;
    font-family: inherit;
    color: inherit;
    width: auto;
    min-width: 80px;
    cursor: pointer;
}

.tab .edit-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
    opacity: 0.5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab .edit-icon .material-icons {
    font-size: 16px;
}

.tab .edit-icon:hover {
    opacity: 1;
}

.tab .camera-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
    opacity: 0.5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab .camera-icon .material-icons {
    font-size: 16px;
}

.tab .camera-icon:hover {
    opacity: 1;
}

.tab.editing input {
    background-color: #fff;
    border: 1px solid #999;
    padding: 2px 4px;
    cursor: text;
    color: #333;
}

.tab input:focus {
    outline: none;
}

.text-box:focus-within {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
    border-width: 2px;
}

.text-box.color-1:focus-within { border-color: #bdbdbd; }
.text-box.color-2:focus-within { border-color: #90caf9; }
.text-box.color-3:focus-within { border-color: #ce93d8; }
.text-box.color-4:focus-within { border-color: #a5d6a7; }
.text-box.color-5:focus-within { border-color: #ffcc80; }
.text-box.color-6:focus-within { border-color: #f48fb1; }

/* モーダル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 300px;
}

.modal-content h2 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.modal-content p {
    margin: 0 0 20px 0;
    font-size: 12px;
    color: #666;
}

.help-content {
    margin: 0 0 20px 0;
}

.help-content h3 {
    margin: 15px 0 8px 0;
    font-size: 14px;
    color: #333;
}

.help-content ul {
    margin: 0 0 15px 0;
    padding-left: 20px;
}

.help-content li {
    margin: 5px 0;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.delete-button {
    background-color: #ff4444;
    color: white;
}

.delete-button:hover {
    background-color: #ff6666;
}

.cancel-button {
    background-color: #f0f0f0;
    color: #666;
}

.cancel-button:hover {
    background-color: #e0e0e0;
}

/* タブの削除アイコン */
.delete-icon {
    width: 16px;
    height: 16px;
    margin-left: 4px;
    cursor: pointer;
    opacity: 0.5;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-icon .material-icons {
    font-size: 16px;
}

.delete-icon:hover {
    opacity: 1;
}

.tab.dragging {
    opacity: 0.5;
    background-color: #e0e0e0;
    border: 1px dashed #999;
}

.tab.drag-over {
    border-left: 2px solid #666;
}

.add-tab {
    padding: 5px 8px;
    background-color: #e0e0e0; /* やや濃いグレー */
    border-radius: 3px 3px 0 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    color: #333; /* テキストを黒に */
}

.add-tab:hover {
    background-color: #bdbdbd;
}

.add-tab .material-icons {
    font-size: 18px;
}

.pad-container {
    flex-grow: 1;
    position: relative;
    background-color: #fff;
    overflow: hidden;
}

.text-box {
    position: absolute;
    width: 180px;
    min-height: 20px;
    height: 20px;
    padding: 3px 6px;
    background-color: #f8f8f8;
    border-radius: 3px;
    cursor: move;
    resize: vertical;
    overflow: hidden;
}

.text-box.color-1 { 
    background-color: #f8f8f8; /* デフォルト */
    border: 1px solid #e0e0e0;
}
.text-box.color-2 { 
    background-color: #e3f2fd; /* 薄い青 */
    border: 1px solid #bbdefb;
}
.text-box.color-3 { 
    background-color: #f3e5f5; /* 薄い紫 */
    border: 1px solid #e1bee7;
}
.text-box.color-4 { 
    background-color: #e8f5e9; /* 薄い緑 */
    border: 1px solid #c8e6c9;
}
.text-box.color-5 { 
    background-color: #fff3e0; /* 薄いオレンジ */
    border: 1px solid #ffe0b2;
}
.text-box.color-6 { 
    background-color: #fce4ec; /* 薄いピンク */
    border: 1px solid #f8bbd0;
}

.text-box textarea {
    width: 100%;
    height: 100%;
    border: none;
    resize: none;
    font-size: inherit;
    font-family: inherit;
    padding: 0;
    background: none;
    line-height: 1.4;
    overflow: hidden;
    min-height: 20px;
    display: block;
    box-sizing: border-box;
}

.text-box textarea:focus {
    outline: none;
} 