﻿@keyframes dice-jitter {
    0% { transform: translate(0, 0) rotate(0deg); }
    20% { transform: translate(-2px, 1px) rotate(-5deg); }
    40% { transform: translate(2px, -1px) rotate(4deg); }
    60% { transform: translate(-1px, 2px) rotate(-3deg); }
    80% { transform: translate(1px, -2px) rotate(3deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}
.jitter {
    animation: dice-jitter 0.35s cubic-bezier(.36,.07,.19,.97) both;
}
body {
    background: #222;
    color: #fff;
}

.character-sheet {
    color: #fff;
}

input,
select,
textarea,
button {
    background: #333;
    color: #fff;
    border: 1px solid #444;
}

::selection {
    background: #444;
    color: #fff;
}

.dice-result-label {
    font-weight: 600;
    margin-bottom: 0.3em;
    text-align: center;
}

.dice-result-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
    justify-content: center;
    margin-bottom: 0.3em;
}

.dice-face {
    display: inline-block;
    min-width: 2em;
    padding: 0.3em 0.5em;
    border-radius: 0.5em;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    background: #222;
    border: 2px solid #888;
    color: #222;
}

.dice-success {
    background: #2196f3;
    color: #fff;
    border-color: #2196f3;
}

.dice-fail {
    background: #ffe066;
    color: #222;
    border-color: #ffe066;
}

.dice-result-summary {
    text-align: center;
    font-size: 1em;
    margin-bottom: 0.2em;
}

#dice-result {
    background: #333;
    border-radius: 1em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    padding: 1em 1.2em 0.7em 1.2em;
    margin-top: 1em;
    margin-bottom: 1em;
}

.round-style {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    background: #444;
    color: #fff;
    border: 1px solid #666;
    border-radius: 0.4em;
    padding: 0.5em 0.5em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border 0.15s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    user-select: none;
    text-align: left;
    white-space: nowrap;
}

.stat-label {
    min-width: 8em;
    width: 8em;
}

.stat-label:active,
.stat-label:focus {
    background: #555;
    border-color: #888;
}

.stat-row {
    margin-bottom: 0.5em;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.stat-value {
    width: 3em;
    text-align: left;
}

a,
a:visited,
a:active,
a:hover {
    color: #fff;
    text-decoration: none;
}

body {
    background: #222;
    color: #fff;
    margin: 0;
    font-family: sans-serif;
}

.character-sheet {
    display: flex;
    flex-flow: column;
    min-height: 100dvh;
    color: #fff;
    padding-left: 0.5em;
    padding-right: 0.5em;
    max-width: 600px;
    margin: 0 auto;
    border-left: 1px solid #444;
    border-right: 1px solid #444;
}

.app {
    padding: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

input,
select,
textarea,
button {
    background: #333;
    color: #fff;
    border: 1px solid #444;
}

::selection {
    background: #444;
    color: #fff;
}

/* Modern reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

button {
    cursor: pointer;
}

.app {
    padding: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

#character-list {
    list-style: none;
    padding: 0;
}

#character-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    margin: 0.5rem;
    border: 1px solid #eee;
}

#character-list li a {
    flex: 1 1 auto;
    display: block;
    padding: 0.5em 0.5em 0.5em 0;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.delete-btn {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    transition: color 0.2s;
}

.delete-btn.held {
    color: red;
}

#create-character {
    margin: 1em 0;
    padding: 0.5em 1em;
    font-size: 1em;
}

.fade-out {
    opacity: 0.3;
    transition: opacity 0.4s;
}

.token-btn {
    width: 1.8em;
    min-width: 1.8em;
    max-width: 1.8em;
    height: 1.8em;
}