/* party.css */
#party-screen {
    /* 画面の幅全体を使用するように設定 */
    width: 100%;

    /* 画面いっぱいに広げ、Flexboxの子要素として適切に機能させるための設定 */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* 画面の高さいっぱいまで広げる（オプション） */
}

#party-screen.hidden {
    display: none;
}

.party-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #3f51b5;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-title {
    margin: 0;
    font-size: 1.8em;
}

.header-buttons .action-button {
    background-color: #ff9800;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s;
}

.header-buttons .action-button:hover {
    background-color: #fb8c00;
}

.main-content {
    display: flex;
    flex-grow: 1;
    padding: 20px;
    gap: 20px;
    background-color: #e8eaf6;
}

.character-pane {
    flex: 6;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 15px;
    overflow-y: auto;
    overflow-x: hidden;
}

#character-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 40px;
    margin: 30px;
}

.character-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background-color: #f9f9f9;
}

.character-card:hover {
    background-color: #e3f2fd;
    border-color: #2196f3;
}

.character-card.selected {
    border-color: #2196f3;
    box-shadow: 0 0 0 3px #2196f3;
    background-color: #e3f2fd;
}

.char-thumb {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 5px;
}

.char-info h4 {
    margin: 0;
    font-size: 1em;
    color: #333;
}

.char-info p {
    margin: 0;
    font-size: 0.8em;
    color: #666;
}

.right-pane {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#party-slots-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 15px;
}

.party-slots {
    display: flex;
    justify-content: space-around;
    gap: 10px;
    margin-top: 10px;
}

.party-slot {
    width: 100px;
    height: 100px;
    border: 2px dashed #90caf9;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e3f2fd;
    transition: all 0.2s;
}

.party-slot.filled {
    border-style: solid;
    border-color: #2196f3;
    background-color: #bbdefb;
}

.party-slot .char-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

#character-details {
    flex-grow: 1;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 15px;
    display: flex;
    flex-direction: column;
}

#details-content {
    text-align: center;
    flex-grow: 1;
}

#details-content .char-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 3px solid #ddd;
}

#details-content h4 {
    margin: 5px 0;
    font-size: 1.5em;
    color: #333;
}

#details-content small {
    color: #666;
}

.status-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-top: 15px;
    text-align: left;
}

.status-list p {
    margin: 0;
    font-size: 0.9em;
}

.status-list strong {
    color: #555;
}

#details-content h5 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #3f51b5;
    border-bottom: 1px solid #c5cae9;
    padding-bottom: 5px;
}

#details-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#details-content li {
    margin-bottom: 5px;
    font-size: 0.9em;
    text-align: left;
    position: relative;
}

#details-content .skill-name {
    font-weight: bold;
    color: #00796b;
    cursor: help;
    position: relative;
}

.skill-tooltip {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8em;
    line-height: 1.4;
}

.skill-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

#details-content .skill-name:hover .skill-tooltip {
    visibility: visible;
    opacity: 1;
}

.placeholder {
    color: #999;
    font-style: italic;
    margin-top: 50px;
}

/* パーティー編成スロットの視覚的補助 */
.party-slot.highlight {
    border: 2px solid #ffeb3b;
    box-shadow: 0 0 10px 5px rgba(255, 235, 59, 0.5);
    transform: scale(1.05);
}