/* バックパックのスタイル */
#backpack {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 800px;
    background-color: rgba(0, 0, 0, 0.9);
    border: 2px solid #444;
    border-radius: 10px;
    padding: 20px;
    color: white;
    z-index: 1000;
    display: none;
    max-height: 80vh;
    overflow-y: auto;
}

#backpack h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #ffcc00;
    font-size: 24px;
}

#backpackContent {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.backpack-item {
    background-color: rgba(30, 30, 30, 0.8);
    border: 1px solid #555;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.backpack-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-color: #ffcc00;
}

.backpack-item h3 {
    color: #ffcc00;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.item-description {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.item-effects {
    color: #4CAF50;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.backpack-item button {
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 8px 15px;
    margin-right: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.backpack-item button:hover {
    background-color: #444;
    border-color: #ffcc00;
}

.backpack-item button:last-child {
    margin-right: 0;
}

/* バックパックが空の場合のメッセージ */
#backpackContent p {
    text-align: center;
    color: #aaa;
    font-style: italic;
    grid-column: 1 / -1;
    padding: 20px;
}

.status-container {
    position: fixed;
    top: 0px;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 100;
}

.status-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
    padding: 2 5px;
    max-width: 1000px;
    width: 70%;
}

.status-item {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 5px 5px;
    border-radius: 5px;
    min-width: 30px;
}

.status-item i {
    margin-right: 2px;
    font-size: 11px;
}

.status-bar {
    width: 50px;
    height: 5px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-left: 2px;
}

.status-bar .status-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.health .status-fill { background-color: #ff4444; }
.hunger .status-fill { background-color: #ffbb33; }
.thirst .status-fill { background-color: #33b5e5; }
.hygiene .status-fill { background-color: #00C851; }
.temperature .status-fill { background-color: #ff4444; }
.bleeding .status-fill { background-color: #aa66cc; }
.sleep .status-fill { background-color: #2BBBAD; }
.sanity .status-fill { background-color: #ff8800; }

.share-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.share-buttons button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s;
}

#restartButton {
    background-color: #4CAF50;
    color: white;
}

#restartButton:hover {
    background-color: #45a049;
}

#twitterShareButton {
    background-color: #1DA1F2;
    color: white;
}

#twitterShareButton:hover {
    background-color: #1a8cd8;
}

#copyShareButton {
    background-color: #607D8B;
    color: white;
}

#copyShareButton:hover {
    background-color: #546E7A;
}

#copyMessage {
    text-align: center;
    font-size: 14px;
    margin-top: 10px;
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* How to Play Modal */
#howToPlayModal {
    padding: 20px;
    border-radius: 10px;
    color: white;
    z-index: 1000;
    max-width: 80%;
    max-height: 80vh;
    overflow-y: auto;
}

#howToPlayModal h2 {
    color: #ffcc00;
    font-size: 18px;
    margin-bottom: 15px;
}

#howToPlayModal p {
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 10px;
}

#howToPlayModal ul {
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 15px;
    padding-left: 20px;
}

#howToPlayModal li {
    margin-bottom: 5px;
}

#howToPlayModal button {
    background-color: #333;
    color: white;
    border: 1px solid #555;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

#howToPlayModal button:hover {
    background-color: #444;
    border-color: #ffcc00;
}

#mobileControls {
    display: block;
    /* 既存のスタイルはそのまま */
}

@media (max-width: 768px) {
    /* #mobileControls { display: block; } を削除 */
    /* 既存のコード ... */
}

#joystickKnob {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    top: 30px;
    left: 30px;
    transition: transform 0.1s ease, background-color 0.2s ease;
} 