body {
    font-family: 'Segoe UI', sans-serif;
    background: #121821;
    color: #e0f7ff;
    padding: 20px;
}

a {
    color: rgb(0, 255, 255);
}

a:visited {
    color: rgb(0, 255, 255);
}

textarea,
input {
    background: #121821;
    color: #e0f7ff;
    border: 1px solid #2f3e4e;
    padding: 3px;
    border-radius: 4px;
}

.battle-only {
    display: none;
}

.container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    height: 90vh;
}

.side,
.enemyGroup {
    background: #1e2732;
    border: 1px solid #2f3e4e;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 0 8px rgba(51, 153, 255, 0.2);
    flex: 1;
    display: flex;
    flex-direction: column;
    max-height: 100%;
}

.scroll-wrapper {
    flex: 1;
    overflow-y: auto;
    max-height: 100%;
    padding: 5px;
}

.scroll-wrapper::-webkit-scrollbar {
    width: 8px;
}

.scroll-wrapper::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: #00ddff4b;
}

.enemy {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.unit {
    background: #1a222c;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #2f3e4e;
    margin-bottom: 10px;
}

.unit.dead {
    filter: grayscale(100%);
    opacity: 0.6;
}

.unit-name {
    font-weight: bold;
    color: #3399ff;
}

.unit.action-highlight {
    border: 2px solid rgb(0, 255, 255);
}

.bar-container {
    background: #2a3a4f;
    border-radius: 5px;
}

.hp-bar {
    height: 10px;
    background: #66cc99;
    border-radius: 5px;
}

.np-bar {
    height: 10px;
    background: #3399ff;
    border-radius: 5px;
}

.controls {
    margin-top: 20px;
    text-align: center;
}

table.damage-log {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border: 1px solid #ccc;
}

.damage-log th,
.damage-log td {
    border: 1px solid #ccc;
    padding: 5px;
    text-align: left;
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}

.title-left {
    display: flex 1;
    align-items: center;
}

.title-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
}

.title-right {
    display: flex;
    align-items: center;
}

.battle-log {
    background: #1a222c;
    border: 1px solid #2f3e4e;
    padding: 10px;
    border-radius: 10px;
    height: 200px;
    overflow-y: auto;
    color: #e0f7ff;
}

button {
    background: #1a222c;
    border: 1px solid #3399ff;
    color: #e0f7ff;
    border-radius: 6px;
    padding: 6px 12px;
    transition: 0.2s;
}

button:hover {
    background: #253344;
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.7);
}

dialog {
    background: #1e2732;
    color: #e0f7ff;
    border-radius: 10px;
    padding: 20px;
    border: none;
    box-shadow: 0 0 12px rgba(51, 153, 255, 0.4);
}


.tab-buttons {
    border-bottom: 1px solid #2f3e4e;
}

.tab-button {
    background: #1e2732;
    border: none;
    color: #e0f7ff;
}

.tab-button.active {
    background: #253344;
    font-weight: bold;
    border-bottom: 2px solid #3399ff;
}

.tabContent {
    background: #1a222c;
    border: 1px solid #2f3e4e;
    padding: 10px;
}

.action-type-group button {
    background: #1a222c;
    border: 1px solid #3399ff;
    color: #e0f7ff;
}

.action-type-group button.selected {
    background-color: #3399ff;
    border-color: #66ccff;
    color: #000;
    font-weight: bold;
}

.action-button {
    background: linear-gradient(135deg, #1d796b, #54eed7);
    color: #fff;
    border: none;
    padding: 10px 18px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.action-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.35);
}

.action-button:active {
    transform: scale(0.98);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.action-button:disabled {
    background: #bdbdbd5b;
    color: #bababa;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.plus-button,
.minus-button {
    font-size: 0.8rem;
    /* 通常より小さめの文字サイズ */
    padding: 4px 8px;
    /* 上下左右の余白を少なめに */
    border-radius: 4px;
    /* 少し丸みのある角 */
    min-width: 32px;
    /* 最小幅 */
    text-align: center;
}

.plus-button {
    /* 明るい緑 */
    background: #087f6f;
    border: 1px solid #087f6f;
}

.minus-button {
    /* 明るい赤 */
    background: #b71c1c;
    border: 1px solid #b71c1c;
}

.sts-danger {
    color: #ff4d4d;
    font-weight: bold;
}

.sts-validationError {
    color: #ffaa00;
    font-weight: bold;
}

.attack-button {
    padding: 6px 16px;
    background-color: #1e88e5;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s, transform 0.1s;
}

.attack-button:hover {
    background-color: #1565c0;
}

.attack-button:active {
    transform: scale(0.97);
}

.attack-button:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 0.7;
}

.defend-button {
    padding: 6px 16px;
    background-color: #1ecee5;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s, transform 0.1s;
}

.defend-button:hover {
    background-color: #15b5c0;
}

.defend-button:active {
    transform: scale(0.97);
}

.defend-button:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 0.7;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 0.3s;
}

@keyframes flash {
    0% {
        background-color: #ffffff;
    }

    100% {
        background-color: transparent;
    }
}

.flash {
    animation: flash 0.3s;
}

.turn-end-container {
    text-align: center;
    margin: 20px 0;
}

.end-turn-button {
    text-align: center;
    font-size: 18px;
    padding: 10px 20px;
    background-color: #008cff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.end-turn-button:hover:not(:disabled) {
    background-color: #0072cc;
}

.end-turn-button:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
    opacity: 0.6;
}

body.victory {
    animation: bodyVictoryBG 2s ease-out forwards;
}

@keyframes bodyVictoryBG {
    0% {
        background-color: #121821;
    }

    100% {
        background-color: #00aaff;
    }
}