:root {
    --primary-color: #ffffff;
    --border-color: rgba(255, 255, 255, 0.8);
    --hover-bg: rgba(255, 255, 255, 0.075);
    --active-bg: rgba(255, 255, 255, 0.175);
    --table-border-color: rgba(255, 255, 255, 0.2);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    color: var(--primary-color);
    font-family: 'Roboto', sans-serif;
    line-height: 1.5;
    min-height: 100vh;
    background: linear-gradient(120deg, #000000, #341a40, #0f172a);
    background-size: cover;
    position: relative;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding-top: 50px;
}
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    filter: blur(8px);
    z-index: -1;
}
header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background: rgba(27, 31, 34, 0.95);
    transform: translateY(0);
    transition: transform 0.3s ease;
}
header.hidden {
    transform: translateY(-100%);
}
nav {
    display: flex;
    justify-content: center;
    padding: 0.5rem;
}
nav ul {
    display: flex;
    list-style: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}
nav ul li {
    border-left: 1px solid var(--border-color);
}
nav ul li:first-child {
    border-left: 0;
}
nav ul li a {
    display: block;
    padding: 0.5rem 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    font-size: 0.8rem;
    transition: background-color 0.3s ease;
    text-align: center;
}
nav ul li a:hover {
    background-color: var(--hover-bg);
}
nav ul li a:active {
    background-color: var(--active-bg);
}
.game-container {
    width: 100%;
    max-width: 1200px;
    margin: 1rem auto 2rem;
    padding: 0 1rem;
    opacity: 0;
    transform: scale(0.95);
    animation: scaleIn 0.5s ease-out 0.5s forwards;
}
.sticky-header {
    background: rgba(27, 31, 34, 0.95);
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 4rem;
    position: sticky;
    top: 0;
    z-index: 900;
    transition: top 0.3s ease;
}


.header-visible .sticky-header {
    top: 3rem;
}
h1 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    letter-spacing: 0.2rem;
    width: 100%;
}
.settings-container, .input-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 0.5rem 0;
    width: 100%;
}
button {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    transition: background-color 0.3s ease;
}
button:hover {
    background-color: var(--hover-bg);
}
button:active {
    background-color: var(--active-bg);
}
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.table-container {
    background: rgba(27, 31, 34, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
}
table {
    width: 100%;
    border-collapse: collapse;
}

th {
   background: rgba(27, 31, 34, 0.95);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    color: var(--primary-color);
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
td {
    background-color: rgba(27, 31, 34, 0.7);
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}


@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
   }
    to {
        opacity: 1;
        transform: scale(1);
   }
}
@media screen and (max-width: 768px) {
    nav ul {
        flex-direction: column;
   }
    nav ul li {
        border-left: 0;
        border-top: 1px solid var(--border-color);
   }
    nav ul li:first-child {
        border-top: 0;
   }
    .input-container {
        flex-direction: column;
        align-items: center;
   }
    .table-container {
        overflow-x: auto;
   }
}
#result {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: 1rem;
}
.table-container table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.table-container th, .table-container td {
    border-right: 1px solid var(--table-border-color);
}
.table-container th:last-child, .table-container td:last-child {
    border-right: none;
}
.scrollable-content {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}
body {
    overflow-y: auto;
}
@media screen and (max-width: 768px) {
    .sticky-header {
        position: sticky;
        top: 0;
        z-index: 1000;
   }
    header {
        z-index: 1001;
   }
}
@media screen and (max-width: 768px) {
    body {
        padding-top: 100px;
   }
    nav ul {
        flex-direction: row;
        width: 100%;
   }
    nav ul li {
        flex: 1;
        text-align: center;
        border-top: 1px solid var(--border-color);
        border-left: 0;
   }
    nav ul li:first-child {
        border-top: 0;
   }
    .input-container {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
   }
    input[type="text"] {
        max-width: 300px;
   }
    .settings-container {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
   }
    .sticky-header {
        position: relative;
        top: auto;
        z-index: 900;
   }
}
html {
    scroll-behavior: auto;
    scroll-padding-top: 50px;
}
body.header-visible {
    padding-top: 50px;
}
.about-container {
    width: 100%;
    max-width: 800px;
    margin: 4rem auto 2rem;
    padding: 0 1rem;
    background: rgba(27, 31, 34, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--primary-color);
    opacity: 0;
    transform: scale(0.95);
    animation: scaleIn 0.5s ease-out 0.5s forwards;
}
.about-container h1 {
    text-align: center;
    margin: 2rem 0;
    font-size: 1.5rem;
    letter-spacing: 0.2rem;
    color: var(--primary-color);
}
.about-container p {
    text-align: center;
    margin-bottom: 1rem;
    line-height: 1.6;
}
.about-container a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
.about-container a:hover {
    color: rgba(255, 255, 255, 0.7);
}
.about-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}
.about-links a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}
.about-links a:hover {
    transform: scale(1.1);
}
.about-links img {
    width: 64px;
    height: 64px;
    margin-bottom: 0.5rem;
}
.about-links img {
    width: 64px;
    height: 64px;
    margin-bottom: 0.5rem;
}
@media screen and (max-width: 768px) {
    .about-container {
        margin: 2rem 1rem;
        padding: 1rem;
   }
    .about-links {
        flex-direction: column;
        gap: 1rem;
   }
}
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    cursor: pointer;
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1002;
    padding: 0;
    background: transparent;
    border: none;
}
.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    margin: 2px 0;
    border-radius: 2px;
}
@media screen and (max-width: 768px) {
    .hamburger {
        display: flex;
   }
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: rgba(27, 31, 34, 0.98);
        width: 250px;
        height: 100vh;
        padding-top: 50px;
        transition: 0.3s;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        border: none;
        border-radius: 0;
        z-index: 1001;
   }
    .nav-menu.active {
        left: 0;
   }
    .nav-menu li {
        width: 100%;
        border-left: 0;
        border-top: 1px solid var(--border-color);
   }
    .nav-menu li:first-child {
        border-top: none;
   }
    .nav-menu li a {
        padding: 0.5rem 1.5rem;
        font-size: 0.9rem;
        display: block;
        width: 100%;
        line-height: 1.2;
        text-align: left;
        letter-spacing: 0.1rem;
   }
    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
   }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
   }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
   }
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: inherit;
        filter: blur(8px);
        z-index: -1;
        width: 100vw;
        height: 100vh;
   }
   body.menu-open {
        overflow: hidden;
    }

    /* Ensure the overlay covers the whole screen */
    .nav-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        display: none;
    }

    .nav-menu-overlay.active {
        display: block;
    }
}
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(27, 31, 34, 0.95);
}
.nav-container {
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    width: 100%;
}
.nav-container {
    justify-content: center;
    padding: 0.5rem;
    position: relative;
    width: 100%;
}
@media screen and (max-width: 768px) {
    body {
        padding-top: 60px;
   }
    .sticky-header {
        margin-bottom: 2rem;
   }
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: rgba(27, 31, 34, 0.98);
        width: 250px;
        height: 100vh;
        padding-top: 60px;
        transition: 0.3s;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        border: none;
        border-radius: 0;
        z-index: 1001;
        display: flex;
        align-items: flex-start;
   }
    .nav-menu ul {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 0;
        margin: 0;
   }
    .nav-menu li {
        width: 100%;
        border-left: 0;
        border-top: 1px solid var(--border-color);
   }
    .nav-menu li:first-child {
        border-top: none;
   }
    .nav-menu li a {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        display: block;
        width: 100%;
        text-align: left;
        letter-spacing: 0.1rem;
   }
    .hamburger {
        left: 0.5rem;
   }
}
header {
    height: 50px;
    display: flex;
    align-items: center;
}
nav {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-container {
    justify-content: center;
    padding: 0.5rem;
    position: relative;
    width: 100%;
}
header {
    height: 50px;
    display: flex;
    align-items: center;
}
nav {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
@media screen and (max-width: 768px) {
    body {
        padding-top: 60px;
   }
    .sticky-header {
        margin-bottom: 1rem;
   }
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: rgba(27, 31, 34, 0.98);
        width: 250px;
        height: 100vh;
        padding-top: 60px;
        transition: 0.3s;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        border: none;
        border-radius: 0;
        z-index: 1001;
        display: flex;
        align-items: flex-start;
   }
    .nav-menu ul {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 0;
        margin: 0;
   }
    .nav-menu li {
        width: 100%;
        border-left: 0;
        border-bottom: 1px solid var(--border-color);
   }
    .nav-menu li:last-child {
        border-bottom: none;
   }
    .nav-menu li a {
        padding: 0.5rem 1.5rem;
        font-size: 0.9rem;
        display: block;
        width: 100%;
        text-align: left;
        letter-spacing: 0.1rem;
   }
    .hamburger {
        left: 0.5rem;
   }
    .table-container {
        margin-top: 1rem;
   }
    .sticky-header {
        position: sticky;
        top: 50px;
        z-index: 900;
        background: rgba(27, 31, 34, 0.95);
   }
    .scrollable-content {
        padding-top: 1rem;
   }
}

@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        background-color: rgba(27, 31, 34, 0.98);
        width: 250px;
        height: 100vh;
        padding-top: 60px;
        transition: 0.3s;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        border: none;
        border-radius: 0;
        z-index: 1001;
   }
    .nav-menu.active {
        left: 0;
   }
    .nav-menu {
        display: block;
   }
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
   }
    .nav-menu li:last-child {
        border-bottom: none;
   }
    .nav-menu li a {
        padding: 1.5rem 0 1.5rem 1.5rem;
        font-size: 0.9rem;
        display: block;
        width: 100%;
        text-align: left;
        letter-spacing: 0.1rem;
   }
}
.modern-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
    margin: 10px 0;
    user-select: none;
}
.modern-checkbox input[type="checkbox"] {
    display: none;
}
.modern-checkbox .checkmark {
    width: 20px;
    height: 20px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: inline-block;
    position: relative;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    margin-right: 8px;
}
.modern-checkbox input[type="checkbox"]:checked + .checkmark {
    background-color: #c0c0c089;
    border-color: 1px solid var(--border-color);
}
.modern-checkbox .checkmark::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 14px;
    border: 1px solid var(--border-color);
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -50%) rotate(45deg);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.modern-checkbox input[type="checkbox"]:checked + .checkmark::after {
    opacity: 1;
}
.table-container {
    overflow-x: auto;
}
@media (max-width: 768px) {
    th {
        font-size: 10px;
   }
    tr {
        font-size: 11px;
   }
}
.table-container {
    overflow-y: auto;
    max-height: 400px;
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.table-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}
.table-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}
.table-container::-webkit-scrollbar {
    width: 5px;
    display: none;
}

#cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px;
    justify-content: center;
}

.card {
    background-color: rgba(27, 31, 34, 0.95);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    width: calc(100% - 40px);
    max-width: 400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}
.card-title {
    font-weight: 700;
    margin-bottom: 8px;
}
.icon-slots {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    justify-items: center;
    margin-bottom: 12px;
}

.icon-slots img {
    width: 60px;
    height: 60px;
    /* object-fit: contain; */
    border-radius: 12px;
}
.details {
    font-size: 14px;
    color: #555;
    text-align: center;
}
@media (min-width: 600px) {
    .card {
        width: calc(50% - 24px);
   }
}
@media (min-width: 900px) {
    .card {
        width: calc(33.333% - 32px);
   }
}
.card {
    width: 300px;
    padding: 20px;
    margin: 15px;
    border: 2px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-size: 18px;
}
.card-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}
.icon-slots {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    gap: 15px;
    margin-bottom: 15px;
}
.boss-card {
    width: 70px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.boss-image {
    border-radius: 12px;
    transition: transform 0.3s ease-in-out;
}
.boss-image:hover {
    transform: scale(1.1);
}
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 900;
    display: none;
}
.overlay.active {
    display: block;
}
.panels-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 20px;
    z-index: 1000;
    width: 90%;
    max-width: 1200px;
    height: 80vh;
}
.panels-container.hidden {
    display: none;
}
.bosses-panel {
    background-color: rgba(27, 31, 34, 0.95);
    border-radius: 12px;
    padding: 20px;
    width: 40%;
    height: 100%;
    overflow-y: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.bosses-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
    padding: 0 15px;
}

.list-boss-card:hover {
   transform: scale(1.05);
   background-color: rgba(255, 255, 255, 0.2);
}

.panel-boss-card:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.panel-boss-card {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}
.panel-boss-card img {
    width: 110%;
    height: 110%;
    object-fit: contain;
}
.details-panel {
    background-color: rgba(27, 31, 34, 0.95);
    border-radius: 12px;
    padding: 20px;
    width: 60%;
    height: 100%;
    overflow-y: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.boss-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}
.boss-card:hover {
    transform: scale(1.01);
    background-color: rgba(255, 255, 255, 0.2);
}
.boss-image {
    max-width: 115%;
    max-height: 115%;
    object-fit: contain;
}
.boss-name {
    margin-top: 8px;
    font-size: 14px;
    color: #fff;
}
.details-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
}
.boss-info {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}
.boss-image-large img {
    width: 115px;
    height: 115px;
    object-fit: contain;
    border-radius: 12px;
}
@media (max-width: 768px) {
    .panels-container {
        flex-direction: column;
        height: 90vh;
   }
    .bosses-panel, .details-panel {
        width: 100%;
        height: 50%;
   }
    .bosses-grid {
        grid-template-columns: repeat(3, 1fr);
   }
}
.panels-container {
    display: flex;
    gap: 15px;
    width: 90%;
    height: 80vh;
    max-width: 1200px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}
.bosses-panel {
    width: 20%;
    background-color: rgba(27, 31, 34, 0.95);
    border-radius: 12px;
    padding: 15px;
    overflow-y: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.details-panel {
    width: 40%;
    background-color: rgba(27, 31, 34, 0.95);
    border-radius: 12px;
    padding: 15px;
    overflow-y: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.teams-panel {
    width: 40%;
    background-color: rgba(27, 31, 34, 0.95);
    border-radius: 12px;
    padding: 15px;
    overflow-y: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
@media (max-width: 768px) {
    .panels-container {
        flex-direction: column;
   }
    .bosses-panel, .details-panel, .teams-panel {
        width: 100%;
        height: 33%;
   }
}
.boss-rules {
    margin-top: 20px;
}
.boss-rules ul {
    list-style-type: disc;
    padding-left: 20px;
}
.rooms {
    margin-top: 20px;
}
.room {
    margin-bottom: 20px;
}
.room-monsters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 5px;
}
.room-monster-image {
    flex: 1;
    max-width: calc(20% - 5px);
    height: auto;
    border-radius: 5px;
    object-fit: contain;
}
.team-icons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 5px;
}
.team-monster-image {
    flex: 1;
    max-width: calc(20% - 5px);
    height: auto;
    border-radius: 5px;
    object-fit: contain;
}
.team-details {
    margin-top: 10px;
}
hr {
    margin: 15px 0;
    border: none;
    border-top: 1px solid #ddd;
}
.f2p-checkbox {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #4a9eff;
    border-radius: 4px;
    background-color: transparent;
    cursor: pointer;
    position: relative;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.f2p-checkbox:checked {
    background-color: #4a9eff;
}
.f2p-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.f2p-checkbox:hover {
    border-color: #66aeff;
}
.f2p-checkbox:checked:hover {
    background-color: #66aeff;
}
.f2p-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.3);
}
.filter-section {
    margin: 15px 0;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.f2p-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    flex: 1;
}
.submit-team-btn {
   background-color: #2d89ff;
   color: white;
   padding: 8px 16px;
   border: none;
   border-radius: 4px;
   font-size: 14px;
   opacity: 1;
   transition: background-color 0.2s ease, opacity 0.2s ease;
   margin-left: auto;
   cursor: pointer;
}

.submit-team-btn:hover {
   background-color: #1b6cd8;
   opacity: 1;
}

.submit-team-btn:disabled {
   background-color: #8cb6e0;
   opacity: 0.6;
   cursor: not-allowed;
}

.grid-wrapper {
    display: grid;
    align-content: center;
    justify-content: center;
    grid-template-columns: repeat(4, auto);
    grid-gap: 1px;
    margin: auto;
    width: 100%;
    max-width: 800px;
    background-color: #33333300;
    padding: 15px;
    border-radius: 10px;
    min-height: 50vh;
}

.grid-wrapper-mega {
    display: grid;
    align-content: center;
    justify-content: center;
    grid-template-columns: repeat(5, auto);
    grid-gap: 1px;
    margin: auto;
    width: 100%;
    max-width: 800px;
    background-color: #33333300;
    padding: 15px;
    border-radius: 10px;
    min-height: 50vh;
}
.grid-wrapper-giga {
    display: grid;
    align-content: center;
    justify-content: center;
    grid-template-columns: repeat(6, auto);
    grid-gap: 1px;
    margin: auto;
    width: 100%;
    max-width: 800px;
    background-color: #33333300;
    padding: 15px;
    border-radius: 10px;
    min-height: 50vh;
}
.grid-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3vw;
    font-weight: bold;
    height: min(15vw, 15vh);
    width: min(15vw, 15vh);
    color: white;
}
.grid-cell.central {
    background-color: #495569;
    border: 1px solid #383131;
}
.grid-cell.edge {
    background-color: rgba(85, 85, 85, 0.103);
    border: 0px solid #383131;
    border-radius: 5px;
    text-align: center;
}
.grid-cell.top-left {
    border-top-left-radius: 10px;
}
.grid-cell.top-right {
    border-top-right-radius: 10px;
}
.grid-cell.bottom-left {
    border-bottom-left-radius: 10px;
}
.grid-cell.bottom-right {
    border-bottom-right-radius: 10px;
}
.grid-cell input {
    width: 100%;
    height: 100%;
    text-align: center;
    font-size: 16px;
    border: none;
    outline: none;
    background-color: transparent;
    color: white;
    font-weight: bold;
    text-overflow: ellipsis;
}
.grid-cell.transparent {
    background-color: transparent;
    border: 0px solid #383131;
    border-radius: 0px;
}
.hint-col, .hint-row, .hint {
    font-weight: bold;
    color: rgb(255, 255, 255);
    background-color: #e0e0e0;
    padding: 5px;
    font-size: 14px;
}
@media (max-width: 2400px), (max-height: 1600px) {
    .hint-col, .hint-row, .hint, .grid-cell input {
        font-size: 20px;
   }
    .score {
        font-size: 22px;
        font-weight: bold;
   }
}
@media (max-width: 1800px), (max-height: 1200px) {
    .hint-col, .hint-row, .hint, .grid-cell input {
        font-size: 18px;
   }
    .score {
        font-size: 20px;
        font-weight: bold;
   }
}
@media (max-width: 1200px), (max-height: 900px) {
    .hint-col, .hint-row, .hint, .grid-cell input {
        font-size: 14px;
   }
    .score {
        font-size: 16px;
        font-weight: bold;
   }
}
@media (max-width: 800px), (max-height: 600px) {
    .hint-col, .hint-row, .hint, .grid-cell input {
        font-size: 12px;
   }
    .score {
        font-size: 14px;
        font-weight: bold;
   }
}
@media (max-width: 500px), (max-height: 400px) {
    .hint-col, .hint-row, .hint, .grid-cell input {
        font-size: 8px;
   }
    .score {
        font-size: 10px;
        font-weight: bold;
   }
}
.grid-cell.correct {
    background-color: rgba(0, 128, 0, 0.534);
    color: white;
}
.grid-cell.incorrect {
    background-color: rgba(255, 0, 0, 0.445);
    color: white;
}
.grid-cell.reveal {
    background-color: rgba(88, 6, 83, 0.514);
    color: white;
}
.grid-cell.invalid {
    background-color: rgba(88, 6, 83, 0.842);
    color: white;
}
.grid-cell.inv {
    width: 0;
    height: 0;
}
.grid-cell {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
.grid-cell textarea {
    width: 100%;
    height: 100%;
    text-align: center;
    font-size: 16px;
    border: none;
    outline: none;
    background-color: transparent;
    color: white;
    font-weight: bold;
    resize: none;
    overflow: hidden;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.2;
}
.grid-cell form {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
}
#game-message {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin: 20px 0;
    min-height: 36px;
}
.win-message {
    color: #4CAF50;
}
.lose-message {
    color: #f44336;
}
.normal-message {
    color: var(--primary-color);
}
button:disabled {
    background-color: grey;
    cursor: not-allowed;
    opacity: 0.6;
}
.button-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}
.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.tooltip-container {
    position: relative;
}
.help-icon {
    font-size: 20px;
    cursor: help;
    color: #6B7280;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}
.help-icon:hover {
    color: #374151;
}
.tooltip {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    margin-top: 8px;
    width: 250px;
    padding: 8px;
    background: rgb(172, 172, 172);
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 10;
    word-wrap: break-word;
    overflow: auto;
}
.tooltip-container:hover .tooltip {
    display: block;
}
.tooltip-item {
    font-size: 12px;
    color: #4B5563;
}
.tooltip-title {
    font-size: 14px;
    color: #1f242c;
    margin-bottom: 4px;
}
.tooltip-list {
    font-size: 12px;
    color: #292e35;
    padding-left: 16px;
    list-style-type: disc;
}
.tooltip-list li {
    margin-bottom: 4px;
}
.tooltip-list li:last-child {
    margin-bottom: 0;
}
.tooltip-info-container {
    position: relative;
}
.info-icon {
    cursor: pointer;
    position: relative;
    display: inline-block;
}

.loading-container {
    display: flex;
    font-family: 'Roboto', sans-serif;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    width: 100%;
}
.error-message {
    text-align: center;
    color: #e74c3c;
    padding: 2rem;
    background-color: #fdf1f0;
    border-radius: 4px;
    margin: 1rem;
}
@keyframes spin {
    0% {
        transform: rotate(0deg);
   }
    100% {
        transform: rotate(360deg);
   }
}
.loader {
    transform: rotateZ(45deg);
    perspective: 1000px;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    color: #fff;
}
.loader:before, .loader:after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: inherit;
    height: inherit;
    border-radius: 50%;
    transform: rotateX(70deg);
    animation: 1s spin linear infinite;
}
.loader:after {
    color: #8c9cff;
    transform: rotateY(70deg);
    animation-delay: .4s;
}
@keyframes rotate {
    0% {
        transform: translate(-50%, -50%) rotateZ(0deg);
   }
    100% {
        transform: translate(-50%, -50%) rotateZ(360deg);
   }
}
@keyframes rotateccw {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
   }
    100% {
        transform: translate(-50%, -50%) rotate(-360deg);
   }
}
@keyframes spin {
    0%, 100% {
        box-shadow: .2em 0px 0 0px currentcolor;
   }
    12% {
        box-shadow: .2em .2em 0 0 currentcolor;
   }
    25% {
        box-shadow: 0 .2em 0 0px currentcolor;
   }
    37% {
        box-shadow: -.2em .2em 0 0 currentcolor;
   }
    50% {
        box-shadow: -.2em 0 0 0 currentcolor;
   }
    62% {
        box-shadow: -.2em -.2em 0 0 currentcolor;
   }
    75% {
        box-shadow: 0px -.2em 0 0 currentcolor;
   }
    87% {
        box-shadow: .2em -.2em 0 0 currentcolor;
   }
}
.text-input {
    position: relative;
    font-family: 'Roboto', sans-serif;
    cursor: text;
    font-size: 14px;
    line-height: 20px;
    padding: 0 16px;
    height: 48px;
    background-color: rgba(27, 31, 34, 0.54);
    border: 1px solid #d6d6e7;
    border-radius: 3px;
    color: #fff;
    box-shadow: inset 0 1px 4px 0 rgb(119 122 175 / 30%);
    overflow: hidden;
    transition: all 700ms ease-in-out;
    :focus {
        border-color: #8c9cff;
        box-shadow: 0 1px 0 0 rgb(35 38 59 / 5%);
   }
}
.text-input::placeholder {
    font-family: 'Roboto', sans-serif;
    color: #fff;
}
.rainbow-shake-icon {
    font-size: 1.5rem;
    animation: rainbow 220s linear infinite, shake 6s ease-in-out infinite;
}
@keyframes rainbow {
   0% {
       color: #7289da;
   }
   17% {
       color: #0000ff;
   }
   33% {
       color: #00ff00;
   }
   50% {
       color: #ffff00;
   }
   67% {
       color: #ff8000;
   }
   83% {
       color: #ff0000;
   }
   100% {
       color: #7289da;
   }
}
@keyframes shake {
    0%, 20%, 100% {
        transform: rotate(0deg);
   }
    2%, 6%, 10%, 14%, 18% {
        transform: rotate(-15deg);
   }
    4%, 8%, 12%, 16% {
        transform: rotate(15deg);
   }
}
.prevent-select {
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
}

.nav-menu li:last-child {
    margin-right: 0;
}

.nav-menu a {
   font-weight: bold;
}

.dropdown {
    position: relative;
}
.dropdown .dropdown-content {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background-color: rgba(27, 31, 34, 0.98);
    min-width: 100%;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}
.dropdown:hover .dropdown-content {
    display: block;
}
.dropdown-content a {
    color: #ffffff;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}
.dropdown-content a:hover {
    background-color: var(--hover-bg);
}

.about-logo-container {
   display: flex;
   justify-content: center;
   align-items: center;
   margin-bottom: 20px;
   margin-top: 30px;
}

.about-logo-container img {
   max-width: 30%;
   height: auto;
}


 .rainbow-shake-icon {
   color: #5865F2;
 }
 @media screen and (max-width: 768px) {
   .about-container {
       margin: 2rem 1rem;
       padding: 1rem;
       width: calc(100% - 2rem);
   }

   .about-container p {
       font-size: 0.95rem;
   }

   .about-links {
       flex-direction: column;
       gap: 1rem;
   }

   .about-links a {
       flex-direction: row;
       justify-content: center;
       align-items: center;
       gap: 1rem;
       width: 100%;
       padding: 0.5rem;
       border-radius: 4px;
       transition: background-color 0.3s ease;
   }

   .about-links a:hover {
       transform: none;
       background-color: var(--hover-bg);
   }

   .about-links img {
       width: 48px;
       height: 48px;
       margin-bottom: 0;
   }

   .about-links span {
       font-size: 1rem;
   }

   .copyright {
       font-size: 0.75rem;
       margin-top: 2rem;
       padding: 0 0.5rem;
   }
}

.swzin-icon-container,
.discord-icon-container {
 vertical-align: middle;
 font-size: 1.5rem;
 text-decoration: none;
}

.tooltip-left {
   display: none;
   position: absolute;
   right: 100%;
   top: 50%;
   transform: translateY(-50%);
   margin-right: 8px;
   max-width: 300px;
   width: 200px;
   padding: 8px;
   background: white;
   border: 1px solid #E5E7EB;
   border-radius: 8px;
   box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
   z-index: 10;
   max-height: 42px;
   word-wrap: break-word;
   align-content: center;
   justify-content: center;
   text-align: center;
}

.discord-icon-container:hover .tooltip-left {
   display: flex;
   align-items: center;
   justify-content: center;
   text-align: center;
}

.tooltip-item {
   font-family: 'Roboto', sans-serif;
   font-size: 14px;
   font-weight: bold;
   color: #4B5563;
}

.header-icons-container {
   display: flex;
   align-items: center;
   position: absolute;
   padding-right: 0rem;
   right: 20px;
   top: 50%;
   gap: 2rem;
   transform: translateY(-50%);
   z-index: 20;
}
 
 .discord-link {
   text-decoration: none;
   color: #5865F2;
 }
 
 .swzin-icon img {
   height: 1.875rem;
   width: auto;
   vertical-align: middle;
}


.copyright-container {
   font-family: Arial, sans-serif;
   margin-top: 1.5rem;
 }

 .copyright {
   font-size: 16px;
 }

 .copyright .baxx-text {
   color: rgb(249, 241, 255);
   font-weight: bolder;
   position: relative;
   display: inline-block;
}

.copyright .baxx-text::before {
   content: "Baxx";
   transition: opacity 0.7s, transform 0.7s;
}

.copyright .baxx-text::after {
   content: "Bruno Andrade";
   position: absolute;
   left: 0;
   top: 0;
   opacity: 0;
   transform: scale(0.4);
   transition: opacity 0.7s, transform 0.7s;
   color: rgb(238, 213, 255);
   white-space: nowrap;
   transform-origin: left;
}

.copyright .baxx-text:hover::before {
   opacity: 0;
   transform: scale(0.4);
   transform-origin: left;
}

.copyright .baxx-text:hover::after {
   opacity: 1;
   transform: scale(1);
   left: 0;
}

.copyright .smaller-text {
   color: rgb(182, 182, 182);
   font-size: 12px;
   display: block;
}

 .text-link {
   color: rgb(216, 216, 255) !important;
   font-weight: bolder;
   text-decoration: none;
 }

 .text-link:hover {
   font-weight: bolder;
   color: rgb(171, 171, 255) !important;
 }


 .about-label {
   color: rgb(227, 204, 243);
   font-weight: bold;
 }

 .swzin-icon-container {
   position: relative;
   display: inline-block;
}

.swzin-icon img {
   width: 40px;
   height: auto;
   transition: transform 0.2s ease-in-out;
}

.swzin-icon img:hover {
   transform: scale(1.1);
}


@keyframes sparkle {
   0% {
       opacity: 0.1;
       transform: scale(0.8) rotate(0deg);
       filter: blur(1px);
   }
   25% {
       opacity: 0.15;
       transform: scale(1.1) rotate(30deg);
       filter: blur(0);
   }
   50% {
       opacity: 0.2;
       transform: scale(0.9) rotate(60deg);
       filter: blur(0.5px);
   }
   75% {
       opacity: 0.1;
       transform: scale(1.2) rotate(90deg);
       filter: blur(0);
   }
   100% {
       opacity: 0.05;
       transform: scale(1) rotate(120deg);
       filter: blur(1px);
   }
}

.swzin-icon-container {
   position: relative;
}


.swzin-icon-container::after {
   content: "";
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   pointer-events: none;
   z-index: 1;
}

@keyframes shine {
   0% {
       left: -150%;
   }
   50% {
       left: 50%;
   }
   100% {
       left: 150%;
   }
}

.swzin-icon-container {
   position: relative;
   display: inline-block;
   width: fit-content;
   height: fit-content;
}
@keyframes shine-expand {
   0% {
       opacity: 0.8;
       transform: scale(0);
   }
   50% {
       opacity: 0.5;
       transform: scale(1.5);
   }
   100% {
       opacity: 0;
       transform: scale(2.5);
   }
}

.swzin-icon-container {
   position: relative;
   display: inline-block;
   width: fit-content;
   height: fit-content;
   overflow: hidden;
}

.swzin-icon-image {
    display: block;
    width: 100%;
    height: auto;
    -webkit-mask-image: url('/swzin/img/swzin_mini.png');
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-image: url('/swzin/img/swzin_mini.png');
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
 }

.swzin-icon-container::before {
   content: "";
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: radial-gradient(circle, rgba(255, 208, 249, 0.466) 0%, rgba(255, 255, 255, 0.411) 70%);
   opacity: 0.4;
   transform: scale(1);
   transform-origin: center center;
   animation: shine-expand 5s infinite ease-out;
   pointer-events: none;
   z-index: -1;
   -webkit-mask-image: url('/swzin/img/swzin_mini.png');
   -webkit-mask-repeat: no-repeat;
   -webkit-mask-position: center;
   -webkit-mask-size: contain;
   mask-image: url('/swzin/img/swzin_mini.png');
   mask-repeat: no-repeat;
   mask-position: center;
   mask-size: contain;
}

@keyframes shine-expand {
   0% {
       opacity: 0.4;
       transform: scale(1);
   }
   10% {
       opacity: 0.5;
       transform: scale(1.2);
   }
   40% {
       opacity: 0.3;
       transform: scale(1.4);
   }
   60% {
       opacity: 0.1;
       transform: scale(1.6);
   }
   100% {
       opacity: 0;
       transform: scale(1.8);
   }
}


.submit-panel-container {
   position: fixed;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background-color: rgba(0, 0, 0, 0.5);
   display: flex;
   justify-content: center;
   align-items: center;
   z-index: 1000;
}

.submit-panel {
   background-color: rgba(19, 23, 26, 0.952);
   padding: 24px;
   border-radius: 8px;
   width: 90%;
   max-width: 600px;
   max-height: 90vh;
   overflow-y: auto;
}

.submit-panel-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-bottom: 24px;
}

.submit-panel-header h2 {
   margin: 0;
   font-size: 1.5rem;
}

.close-submit-panel {
   background: none;
   border: none;
   font-size: 24px;
   cursor: pointer;
   padding: 4px;
}

.monster-inputs, .summoner-input, .comment-input, .checkbox-input {
   margin-bottom: 20px;
}

.monster-slots {
   display: grid;
   grid-template-columns: repeat(5, 1fr);
   gap: 12px;
   margin-top: 8px;
}

.monster-input-container {
   display: flex;
   flex-direction: column;
   gap: 4px;
}

.monster-preview {
   height: 48px;
   display: flex;
   justify-content: center;
   align-items: center;
}

.submit-monster-preview-img {
   max-width: 100%;
   max-height: 100%;
   object-fit: contain;
   border-radius: 12px;
   opacity: 0;
   transform: scale(0.8);
   animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
   from {
       opacity: 0;
       transform: scale(0.8);
   }
   to {
       opacity: 1;
       transform: scale(1);
   }
}


.submit-panel-container label {
   display: block;
   margin-bottom: 8px;
   font-weight: 500;
}

.submit-panel-container input[type="text"],
.submit-panel-container textarea {
   width: 100%;
   padding: 8px;
   border: 1px solid #ccc;
   border-radius: 4px;
   font-size: 14px;
}

.submit-panel-buttons {
   display: flex;
   justify-content: flex-end;
   gap: 12px;
   margin-top: 24px;
}

.submit-panel-buttons button {
   padding: 8px 16px;
   border-radius: 4px;
   cursor: pointer;
   font-weight: 500;
}

.cancel-submit {
   background: #4a91e2dc;
   border: 1px solid #ccc;
}

.submit-team {
   background: #4a90e2;
   color: white;
   border: none;
}

@media (max-width: 640px) {
   .monster-slots {
       grid-template-columns: repeat(3, 1fr);
   }
   
   .submit-panel {
       padding: 16px;
   }
}

@keyframes rogueScaleIn {
   from {
       opacity: 0;
       transform: scale(0.95);
   }
   to {
       opacity: 1;
       transform: scale(1);
   }
}

#choices-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px; /* Smaller gap */
    margin-top: 5px;
    justify-content: center; /* Center items */
    align-content: flex-start;
}

.choice-btn img {
   display: block;
   margin: 0 auto 5px;
}

.choice-btn {
    position: relative;
    overflow: visible;
    margin: 2px;
    padding: 4px;
    background-color: rgb(53, 53, 53);
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: background-color 0.2s;
    display: inline-block;
    vertical-align: top;
    width: calc(33.333% - 6px);
    max-width: 100px; /* Slightly wider to fit larger images */
    flex: 0 0 auto;
    box-sizing: border-box;
    height: auto;
    min-height: 85px; /* Taller to fit larger images */
}


/* Special style for text-only buttons */
.text-only-choice {
    height: auto !important;
    min-height: 40px !important;
}

.text-only-choice .monster-name {
    padding: 3px !important;
    min-height: 0 !important;
    font-size: 11px !important;
}

.choice-btn:hover {
    background-color: rgb(87, 87, 87);
}

.monster-btn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Align to top */
    width: 100%;
    height: 100%;
}

.monster-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    display: block;
    flex-shrink: 0; /* Prevent image from shrinking */
}

.monster-name {
    font-size: 9px;
    text-align: center;
    width: 100%;
    margin-top: 1px;
    white-space: normal !important; /* Force text wrapping */
    overflow: visible !important; /* Force showing all text */
    text-overflow: clip !important; /* Force no ellipsis */
    max-width: none !important; /* Remove max width restriction */
    line-height: 1.2;
    word-wrap: break-word;
    min-height: 22px;
}


#rogue-container {
    background: rgba(27, 31, 34, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin: 1rem auto 2rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: scale(0.95);
    animation: rogueScaleIn 0.5s ease-out 0.5s forwards;
    box-sizing: border-box;
}

#output {
    background-color: rgba(27, 31, 34, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
    font-family: monospace;
    white-space: pre-wrap;
    overflow-y: auto;
    margin: 15px 0;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#output::-webkit-scrollbar {
    width: 6px;
}

#output::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

#output::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

#input-container {
    display: flex;
    margin-top: 10px;
}

#user-input {
    flex: 1;
    padding: 8px;
    margin-right: 5px;
}


.battle-mode-toggle {
    padding: 10px !important;
    margin: 5px auto 20px auto !important; /* Increased margins */
    max-width: 250px !important;
    width: auto !important;
    position: relative !important; 
    z-index: 100 !important; /* Higher z-index to ensure visibility */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: rgba(0, 0, 0, 0.5) !important; /* Darker background */
    border-radius: 8px !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important; /* More visible border */
}

/* Make toggle components more prominent */
.toggle-switch {
    width: 60px !important;
    height: 22px !important;
    margin-right: 10px !important;
    opacity: 1 !important;
    position: relative !important;
    display: inline-block !important;
}

.toggle-slider {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: #777 !important;
    border-radius: 25px !important;
    transition: .4s !important;
    cursor: pointer !important;
}

.toggle-slider:before {
    position: absolute !important;
    content: "" !important;
    height: 16px !important;
    width: 16px !important;
    left: 3px !important;
    bottom: 3px !important;
    background-color: white !important;
    border-radius: 50% !important;
    transition: .4s !important;
}

input:checked + .toggle-slider {
    background-color: #2196F3 !important;
}

input:checked + .toggle-slider:before {
    transform: translateX(23px) !important;
}

.mode-label {
    font-size: 14px !important;
    color: white !important;
    font-weight: bold !important;
    margin: 0 5px !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5) !important;
}

.level-display {
    padding: 5px 8px !important;
    font-size: 13px !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    border-radius: 5px !important;
    color: white !important;
    margin-left: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* Fix z-index issues in the layout */
.rogue-title-section {
    position: relative !important;
    z-index: 10 !important;
    margin-bottom: 10px !important; /* Extra space below the title */
}

.rogue-columns-container {
    position: relative !important;
    z-index: 5 !important;
}


@media screen and (max-width: 768px) {
    html, body {        
        overflow-x: hidden; /* Keep horizontal scrolling disabled */
        overflow-y: auto;   /* Allow vertical scrolling */
    }

    #rogue-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 5rem 1rem 1rem;
        padding: 10px;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
    }

    .rogue-title-section {
        flex: 0 0 auto;
        margin-bottom: 10px;
    }

    #battle-status {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center; /* Centers items vertically */
        overflow-x: auto;
        gap: 5px;
        padding: 5px;
        margin-bottom: 10px;
        background-color: rgba(0,0,0,0.2);
        border-radius: 5px;
    }

    .monster-status-card, .enemy-status-card {
        width: 55px;
        flex: 0 0 auto;
    }
    #choices-container {
        align-items: flex-start;
        align-content: flex-start;
        max-height: 35vh;
        overflow-y: auto;
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: 5px;
        padding: 5px;
        background-color: rgba(0,0,0,0.2);
    }

    #output {
        flex: 1;
        min-height: 100px;
        max-height: 40vh;
        margin: 0 0 10px 0;
        width: auto;
        box-sizing: border-box;
    }

    #input-container {
        flex: 0 0 auto;
        margin-bottom: 5px;
        width: 100%;
        gap: 5px;
    }

    #user-input {
        flex: 1;
        height: 36px;
    }
    
    #submit-btn {
        height: 36px;
    }

    #choices-container {
        padding: 5px;
        gap: 3px; /* Even smaller gap on mobile */
        max-height: 30vh; /* Limit height on mobile */
        justify-content: space-evenly; /* Space items evenly */
    }
    
    .choice-btn {
        min-height: 75px; /* Slightly shorter on mobile */
    }
    
    .monster-img {
        width: 32px; /* Even smaller on mobile */
        height: 32px;
        width: 60px !important; 
        height: 60px !important;
        object-fit: contain !important;
    }
    
    .monster-name {
        font-size: 8px;
    }
}

@media screen and (min-width: 769px) {
    #rogue-container {
        width: 90%;
        max-width: 1200px;
        height: 800px; /* Fixed height instead of 65vh */
        display: flex;
        flex-direction: column;
        overflow: hidden;
        margin: 1rem auto;
    }
    
    .rogue-title-section {
        flex: 0 0 auto;
        position: relative;
        z-index: 10;
        margin-bottom: 0;
        padding-bottom: 5px;
        text-align: center;
    }
    
    .rogue-title-section h1 {
        margin: 0 0 5px 0;
        font-size: 1.5rem;
    }

    .rogue-columns-container {
        display: flex !important;
        gap: 10px !important;
        height: calc(100% - 140px) !important;
        min-height: 300px !important;
        flex: 1 !important;
        order: 3 !important;
        justify-content: space-between !important; /* Space columns evenly */
    }

    .battle-mode-toggle {
        position: relative !important;
        padding: 5px !important;
        margin: 5px auto 15px auto !important; /* Consistent margin */
        max-width: 250px !important;
        width: auto !important;
        z-index: 10 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background-color: rgba(0, 0, 0, 0.3) !important;
        border-radius: 5px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        order: 2 !important;
    }

    .merged-column {
        flex: 1 !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        overflow: hidden !important;
        margin-right: 10px !important; /* Add margin between merged column and output column */
    }

    .toggle-switch {
        width: 40px;
        height: 20px;
        margin-right: 8px;
    }
    
    .toggle-slider:before {
        height: 14px;
        width: 14px;
        left: 3px;
        bottom: 3px;
    }
    
    .mode-label {
        font-size: 12px;
        color: white;
        font-weight: bold;
    }
    
    .level-display {
        padding: 3px 6px;
        font-size: 12px;
        background-color: rgba(0, 0, 0, 0.3);
        border-radius: 3px;
        color: white;
        margin-left: 5px;
    }
    
    .teams-column {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 8px !important;
        max-height: 150px !important; /* Increased from 120px */
        min-height: 150px !important; /* Added minimum height to ensure consistent space */
        box-sizing: border-box !important;
        overflow-y: hidden !important; /* Hide vertical scrollbar */
        overflow-x: auto !important;
    }
    
    .teams-column .rogue-column-header {
        margin-bottom: 8px;
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
        padding: 6px 3px;
        font-size: 14px;
        text-align: center;
    }

    #battle-status {
        display: flex !important;
        flex-wrap: nowrap !important;
        flex-direction: row !important;
        justify-content: center!important;
        align-items: center !important;
        width: 100% !important;
        padding-left: 10px !important; /* Increased padding */
        padding-top: 5px !important; /* Added top padding */
        padding-bottom: 8px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important; /* Hide vertical scrollbar */
        margin: 0 !important;
        height: calc(100% - 40px) !important; /* Take full height minus header */
    }
    
    #battle-status::-webkit-scrollbar {
        height: 5px;
        width: 5px;
    }
    
    #battle-status::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 3px;
    }
    
    #battle-status::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 3px;
    }
    
    .team-container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 5px !important;
        flex: 0 0 auto !important; /* Prevent growing/shrinking */
    }
    
    #battle-status .vs-indicator {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 10px !important;
        font-weight: bold !important;
        font-size: 16px !important;
        margin: 0 10px !important; /* Add horizontal margin */
        position: relative !important; /* Enable positioning */
    }

    .monster-status-card,
    .enemy-status-card {
        width: 80px !important; /* Increased from 65px */
        height: auto !important;
        margin: 4px !important; /* Increased from 2px */
        padding: 4px !important; /* Increased from 3px */
        flex: 0 0 auto !important;
        border-radius: 5px !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.3) !important; /* Added shadow for better appearance */
    }
    
    /* Card images */
    .monster-status-card .card-img,
    .enemy-status-card .card-img {
        width: 72px !important; /* Increased from 58px */
        height: 72px !important; /* Increased from 58px */
        object-fit: contain !important;
    }
    
    /* Choices Column - Second Column */
    .choices-column {
        flex: 1;
        display: flex;
        flex-direction: column;
        background-color: rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 6px;
        padding: 8px;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .choices-column .rogue-column-header {
        flex: 0 0 auto;
        margin-bottom: 8px;
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
        padding: 6px 3px;
        font-size: 14px;
        text-align: center;
    }
    
    #choices-container {
        display: flex;
        flex-wrap: wrap;
        gap: 2px !important;
        align-content: flex-start !important;
        justify-content: flex-start !important;
        padding: 5px;
        overflow-y: auto !important;
        overflow-x: hidden;
        flex: 1;
        height: calc(100% - 40px) !important;
        scrollbar-width: thin;
        scrollbar-color: #666 #333;
    }
    
    #choices-container::-webkit-scrollbar {
        width: 5px;
    }
    
    #choices-container::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 3px;
    }
    
    #choices-container::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 3px;
    }
    
    .choice-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        max-width: 85px;
        max-height: 85px;
        min-height: 40px;
        min-width: 40px;
        padding: 3px;
        margin: 1px !important;
        background-color: rgb(53, 53, 53);
        border: 1px solid #ddd;
        border-radius: 4px;
        overflow: visible;
        width: calc(33.333% - 3px); /* Width for 3 columns with gap */
        flex: 0 0 auto; /* Don't allow flex to grow or shrink items */
    }

    @media screen and (min-width: 1200px) {
        .choice-btn {
            width: calc(25% - 6px);
        }
    }
    
    .choice-btn:not(:has(img)) {
        min-width: 400px;
        min-height: 30px;
        white-space: normal;
        margin-bottom: 2px;
    }
    
    .monster-img {
        width: 60px;
        height: 60px;
        object-fit: contain;
    }
    
    .monster-name {
        font-size: 9px;
        margin-top: 1px;
        line-height: 1.1;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        max-width: none;
    }
    
    /* Output Column - Third Column */
    .output-column {
        width: 300px !important;
        min-width: 300px !important;
        max-width: 300px !important;
        flex: 0 0 300px !important;
        height: 100% !important;
        position: relative !important;
        overflow: hidden !important;
        margin-left: auto !important; /* Push to the right edge */
    }
    
    .output-column .rogue-column-header {
        height: 30px;
        padding: 6px 3px;
        font-size: 14px;
        margin-bottom: 5px;
        text-align: center;
        flex: 0 0 auto;
    }
    
    /* Output text area */
    #output {
        position: absolute;
        top: 35px;
        left: 8px;
        right: 8px;
        bottom: 46px;
        width: calc(100% - 16px);
        height: auto;
        margin: 0;
        padding: 10px;
        font-size: 14px;
        line-height: 1.4;
        overflow-y: auto;
        overflow-x: hidden;
        background-color: rgba(27, 31, 34, 0.7);
        border: 1px solid var(--border-color);
        border-radius: 4px;
        box-sizing: border-box;
        scrollbar-width: thin;
        scrollbar-color: #666 #333;
    }
    
    #output::-webkit-scrollbar {
        width: 5px;
    }
    
    #output::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 3px;
    }
    
    #output::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 3px;
    }
    
    /* Input container */
    #input-container {
        position: absolute;
        bottom: 8px;
        left: 8px;
        right: 8px;
        height: 38px;
        display: flex;
        gap: 5px;
        margin: 0;
        width: calc(100% - 16px);
        z-index: 2;
    }
    
    #user-input {
        flex: 1;
        height: 30px;
    }
    
    #submit-btn {
        height: 30px;
        padding: 0 8px;
    }

    @media screen and (max-height: 900px) {
        #rogue-container {
            height: 700px; /* Slightly shorter for smaller screens */
        }
    }
    
    @media screen and (max-height: 800px) {
        #rogue-container {
            height: 600px; /* Even shorter for very small screens */
        }
    }

    @media screen and (min-width: 1200px) {
        .choice-btn {
            width: calc(25% - 4px); /* Adjusted for smaller gaps */
        }
    }
}

#current-level-display {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
}

@media (max-width: 768px) {
    #current-level-display {
        flex-direction: column; 
        align-items: center; 
        text-align: center;
    }
}

.attack-animation {
    animation: simple-attack 0.12s ease;
}

@keyframes simple-attack {
    0%   { transform: translate(0, 0); }
    20%  { transform: translate(5vw, 0); }
    40%  { transform: translate(15vw, 0); }
    50%  { transform: translate(30vw, 0); }
    60%  { transform: translate(40vw, 0) scale(1.2) rotate(5deg); }
    70%  { transform: translate(30vw, 0) scale(1.1); }
    80%  { transform: translate(20vw, 0); }
    90%  { transform: translate(10vw, 0); }
    100% { transform: translate(0, 0); }
}

        
.changelog-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    overflow-y: auto;
}


.changelog-title {
    color: #FFD700;
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
}

.changelog-date {
    color: #4CAF50;
    font-size: 20px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #555;
}

.changelog-list {
    list-style-type: none;
    padding-left: 0;
}

.changelog-item {
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
    color: #f1f1f1;
}

.changelog-item:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #4CAF50;
}

.code {
    background-color: rgba(100, 100, 100, 0.3);
    padding: 2px 5px;
    border-radius: 4px;
    font-family: monospace;
    color: #d3d3d3;
}

@media screen and (max-width: 768px) {
    .changelog-container {
        margin: 10px;
        padding: 15px;
    }
    
    .changelog-title {
        font-size: 24px;
    }
    
    .changelog-date {
        font-size: 18px;
    }
}

@media screen and (max-width: 768px) {
    body.header-visible {
        padding-top: 50px; /* Adjust based on your header height */
    }
    
    .changelog-container {
        margin: 10px;
        padding: 15px;
        max-height: calc(100vh - 100px); /* Adjust based on your header height */
    }
}

/* Make sure content doesn't get cut off at the bottom on mobile */
@media screen and (max-width: 768px) {
    html, body {
        height: 100%;
        width: 100%;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        overflow-y: auto; /* Ensure vertical scrolling is allowed here too */
        -webkit-overflow-scrolling: touch; /* Enables momentum scrolling on iOS */
    }
    body::after {
        content: "";
        display: block;
        height: 50px; /* Add some space at bottom of page */
    }
}

/* Auth icon styles */
.login-icon-container {
    cursor: pointer;
    position: relative;
}

.auth-icon {
    font-size: 1.2rem;
    transition: color 0.3s;
}

.auth-icon:hover {
    color: #3498db;
}

/* Profile dropdown styles */
.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    z-index: 1000;
    min-width: 120px;
    margin-top: 10px;
}

.profile-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-dropdown li {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.profile-dropdown li:hover {
    background-color: #f1f1f1;
}

/* Auth modal styles */
.auth-modal {
    display: flex;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
}

.auth-modal-content {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}

.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.auth-tab {
    padding: 10px 20px;
    cursor: pointer;
    background: none;
    border: none;
    outline: none;
    font-size: 16px;
    opacity: 0.6;
}

.auth-tab.active {
    border-bottom: 2px solid #3498db;
    opacity: 1;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-form input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.auth-form button {
    padding: 10px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.auth-form button:hover {
    background-color: #2980b9;
}

.error-message {
    color: #e74c3c;
    margin: 0;
    font-size: 14px;
}

@media screen and (max-width: 768px) {
    .hamburger {
        display: flex;
        z-index: 1002;
    }
    
    .nav-menu {
        z-index: 1001;
    }
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: transform 0.3s ease;
}

header.hidden {
    transform: translateY(-100%);
}

body.header-visible {
    padding-top: 60px; /* Adjust this value based on your header height */
}

body.menu-open header {
    transform: translateY(0) !important;
}


.highscores-icon-container i {
    color: #ffd700;
    transition: all 0.3s ease;
    font-size: 1.5rem;
    animation: trophyShine 2s infinite ease-in-out;
}

@keyframes trophyShine {
    0% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.4);
    }
    100% {
        filter: brightness(1);
    }
}

.highscores-icon-container:hover i {
    color: #ffaa00;
    transform: scale(1.1);
}

