body {
    background-color: #222322;
    color: #CCCCCC;
    font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    inset-inline: auto;
    display: flex;
    justify-content: center;
}

@media screen and (max-width: 600px) {
    .talisman.active::before {
        content: attr(title);
    }
}

@media screen and (min-width: 601px) {
    .talisman::before {
        content: "Talisman of "attr(title);
    }
}

h1, h2 {
    z-index: 5;
}

h1 {
    font-variant: small-caps;
}

#main-content {
    position: relative;
    width: 300px;
    border: 2px dotted #333433;
    padding: 0% 5%;
    left: auto;
    top: auto;
}

#talisman-bg-image,
#bg-image-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 128px;
    height: 128px;
    z-index: -2;
}

#bg-image-gradient {
    z-index: -1;
    background: linear-gradient(135deg, rgba(34,35,34,1), rgba(34,35,34,0));
    background: -webkit-linear-gradient(135deg, rgba(34,35,34,1) 50%, rgba(34,35,34,0) 100%);
}

#item-selection {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    text-align: right;
}

#item-selection img {
    height: 40px;
    position: relative;
    top: 15px;
    margin-left: 10px;
}

#item-selection a {
    padding: 5px;
    opacity: 50%;
}

#item-selection a:visited,
#item-selection a {
    text-decoration: none;
    color: #cccccc;
}

#item-selection div:hover {
    opacity: 100%;
    transition: opacity 0.2s ease-in-out;
}

#item-selection a.active {
    opacity: 100%;
}

.container {
    inset-inline: 10%;
    position: relative;
}

@keyframes enchantbar {
    0% {width: 0%;}
    99% {width: 100%;}
    100% {width: 0%;}
}

@keyframes craft-success {
    from {color: greenyellow}
    to {color: #cccccc}
}

@keyframes craft-fail {
    from {color: red}
    to {color: #cccccc}
}

#enchant-bar,
.enchant-bar-active {
    position: absolute;
    width: 0%;
    height: 15px;
    background-color: #111111;
    inset-inline: 0%;
}

button, input {
    color: #EEEEEE;
    background-color: #555655;
    padding: 5px;
    inset-inline: 0px;
    border: 1px double black;
}

input {
    background-color: #171817;
}

button:hover {
    background-color: #777877;
    transition: background-color 0.2s ease-in-out;
}

.enchant-bar-active {
    animation-name: enchantbar;
    animation-duration: 1.5s;
    animation-timing-function: ease-in;
}

caption {
    font-size: 1.5em;
    color: #555655;
    margin-bottom: 2em;
}

caption div {
    position: absolute;
    width: 100%;
    background-color: #181818;
    left: 0%;
    padding-bottom: 0.2em;
    border-top: #242524 solid 3px;
}

caption #start-count {
    font-weight: bold;
    font-size: 2em;
    margin-left: 0.5em;
}

caption #expected, caption #actual {
    font-size: 0.7em;
    text-align: left;
}

caption #actual {
    margin-left: 18%;
    font-size: 1em;
    text-align: right;
}

table {
    margin-top: 10px;
}

.row {
    text-align: center;
}

tr:nth-child(even) {
    background-color: rgba(0,0,0,0.5);
}

th {
    margin-top: 50px;
}

td {
    width: 25%;
    padding: 0.2em 0;
}

td.success-percentage {
    width: 35%;
}

.luckier {
    color: rgb(187, 212, 149);
}

.unluckier {
    color: rgb(233, 173, 173);
}

.averageluck {
    color: #aaaaaa;
}

span.enchantChanceRow {
    font-size: 0.7em;
    color: #cccccc;
}

.success {
    animation-name: craft-success;
    animation-duration: 0.3s;
    animation-timing-function: ease-in;
}

.fail {
    animation-name: craft-fail;
    animation-duration: 0.3s;
    animation-timing-function: ease-in;
}

footer {
    position: fixed;
    bottom: 0px;
    right: 50px;
}

footer a, footer a:visited {
    text-decoration: none;
    color: #eeeeee;
    font-weight: bold;
    opacity: 50%;
}

footer a:hover {
    opacity: 100%;
    transition: opacity 0.2s ease-in-out;
}

