h1 {
    margin-left: 40px;
    margin-right: 40px;
}
.panel {
    display: flex;
    justify-content: space-between;
}
.left-panel {
    width: 95%;
}
.input-container {
    margin-bottom: 15px;
    margin-left: 40px;
    margin-right: 40px;
}
label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}
input[type="text"], input[type="number"], select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 13px;
    background-color: #f9f9f9;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
input[type="text"]:focus, input[type="number"]:focus, select:focus{
    border-color: #b27fd6;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.9);
}
.stats-input {
    display: flex;
    justify-content: space-between;
}
.stats-input input[type="number"] {
    width: 16%;
}
.types-input {
    display: flex;
    justify-content: space-between;
}
.types-input input[type="text"] {
    width: 42%;
}
.ability-input {
    display: flex;
    justify-content: space-between;
}
.ability-input input[type="text"]:first-child {
    width: 20%;
}
.ability-input input[type="text"]:nth-child(2) {
    width: 78%;
}
.move-input-1 {
    display: flex;
    justify-content: space-between;
}
.move-input-1 input[type="text"]:first-child {
    width: 13%;
}
.move-input-1 input[type="text"]:nth-child(2) {
    width: 13%;
}
.move-input-1 input[type="text"]:nth-child(3) {
    width: 13%;
}
.move-input-1 input[type="text"]:nth-child(4) {
    width: 13%;
}
.move-input-1 input[type="text"]:nth-child(5) {
    width: 13%;
}
.move-input-1 input[type="number"]:nth-child(6) {
    width: 13%;
}
.move-input-1 input[type="text"]:nth-child(7) {
    width: 20%;
}
select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' width='292.362' height='292.362' viewBox='0 0 292.362 292.362'><path fill='%23999' d='M287.736 69.454l-14.274-14.273c-3.568-3.57-9.355-3.57-12.922 0L146.18 169.54 32.072 55.181c-3.57-3.57-9.355-3.57-12.923 0L4.875 69.454c-3.568 3.568-3.568 9.355 0 12.922l132.16 132.16c3.568 3.568 9.355 3.568 12.922 0l132.16-132.16c3.57-3.567 3.57-9.353 0-12.922z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

.right-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 95%;
}
.avatar-display {
    width: 100%;
    max-width: 390px;
    aspect-ratio: 1;
    overflow: hidden;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #ac2929;
    box-sizing: border-box;
}
#avatar-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; 
}

.start-battle {
    font-family: "Futura", Arial, sans-serif;
    display: block;
    width: 50%;
    max-width: 300px;
    padding: 15px;
    background: linear-gradient(45deg, #76b1c3, #0f6c91);
    color: white;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    margin: 0 auto;
    margin-top: 20px;
}
.start-battle:hover {
    background: linear-gradient(45deg, #45a049, #66BB6A);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-3px);
}
.start-battle:active {
    transform: translateY(1px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

pre[class*="language-"] {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
}
code[class*="language-"] {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
}
.code-display {
    position: fixed;
    top: 0;
    height: 100%;
    width: 21%;
    background-color: rgba(80, 80, 80, 0.7);
    padding: 20px;
    overflow-y: auto;
    color: #d8dee9;
    z-index: 5;
    font-size: 11px;
    font-family: "Courier New", Courier, monospace;
    line-height: 1.6;
    box-shadow: -3px 0 5px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    right: -23%;
}
.code-display pre {
    margin: 0;
    padding: 0;
}
.code-display.open {
    transform: translateX(-100%);
    right: 0;
    transform: none;
}
.toggle-code-display {
    font-family: "Futura", Arial, sans-serif;
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background-color: #88c0d0;
    color: white;
    border: none;
    padding: 8px 10px;
    cursor: pointer;
    z-index: 10;
    border-radius: 5px 0 0 5px;
    font-size: 13px;
}

.pokemon-container {
    position: absolute;
    width: 20%;
    text-align: center;
}
.pokemon-1 {
    bottom: 6%;
    left: 12%;
}
.pokemon-2 {
    top: 6%;
    right: 20%;
}
.pokemon img {
    width: 100%;
}
.info-container {
    position: absolute;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
}
.hp-bar {
    background-color: #ddd;
    border-radius: 5px;
    overflow: hidden;
    width: 100%;
}
.hp {
    height: 20px;
    background-color: green;
    width: 100%;
    transition: width 0.5s linear;
}
.hp-value {
    position: absolute;
    right: 3px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
}
.status {
    height: 30px;
    width: 30px;
    position: relative;
}
.status img {
    height: 23px;
    width: auto;
    left: -3px;
    position: relative;
}
.name {
    font-size: 20px;
    margin-bottom: 1px;
    text-align: left;
    width: 100%;
}
.pokemon-1 .info-container {
    top: 110%;
    right: 90%;
}
.pokemon-2 .info-container {
    bottom: 110%;
    left: 82%;
}
.move-select {
    position: absolute;
    right: 5%;
    bottom: 5%;
    width: 300px;
    max-height: 300px;
    overflow-y: auto;
    padding-top: 15px;
}
.move {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 1px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: rgba(80, 80, 80, 0.7);
    cursor: pointer;
    width: 100%;
    text-align: left;
    outline: none;
    font-family: inherit;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.move:hover {
    background-color: rgba(101, 23, 3, 0.7);
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.move:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}
.move img {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}
.move-name {
    font-size: 21px;
    color: #fff;
}
.move-info {
    font-size: 15px;
    color: #fff;
    margin-top: 5px;
}
.tooltip {
    position: absolute;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: rgba(80, 80, 80, 0.7);
    padding: 8px 12px;
    display: none;
    font-size: 13px;
    color: #fff;
    max-width: 200px;
    text-align: left;
    z-index: 3;
}
.log-container {
    font-family: "Verdana", Arial, sans-serif;
    position: absolute;
    top: -5%;
    left: -5%;
    width: 300px;
    height: 200px;
    background-color: rgba(65, 65, 65, 0.02);
    color: rgb(0, 0, 0);
    padding: 10px;
    border-radius: 3px;
    overflow-y: auto;
    font-size: 15px;
    z-index: 3;
}
.log-entry {
    margin-bottom: 5px;
}

.restart {
    font-family: "Futura", Arial, sans-serif;
    position: fixed;
    bottom: 15px;
    right: 15px;
    padding: 10px 20px;
    background-color: rgba(245, 108, 108, 0.5);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
}
.restart:hover {
    background-color: #d9534f;
}

.result-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
}
.result-container {
    background: white;
    padding: 50px;
    border-radius: 12px;
    text-align: center;
}
.next-battle {
    font-family: "Futura", Arial, sans-serif;
    padding: 10px 20px;
    background-color: rgba(245, 108, 108, 0.5);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
}
.next-battle:hover {
    background-color: #d9534f;
}
