#navbar {
    bottom: 0px;
    border-top: 1px solid #ddd;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px 0px;
}

#topNav {
    height: 180px;
    top: -100px;
    margin-bottom: 50px;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#navbar, #topNav {
    position: fixed;
    width: 100%;
    background-color: rgb(129, 180, 127);
    z-index: 1000;
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
}

#searchBar {
    position: absolute;
    left: 5px;
    bottom: 25px;
    padding: 5px;
    box-sizing: border-box;
    border: 0px solid;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    width: 140px;
    background-color: rgb(239, 255, 248);
}

#colorSelectorPage {
    margin-top: 25px;
    justify-content: center;
}

.nav-item {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 10px;
}

.nav-item i, .nav-item img {
    margin-bottom: 0px;
    font-size: 30px;
}

.nav-item img {
    width: 35px;
}


html {
    font-family: 'Roboto', sans-serif;
    width: 100%;
    height: 80%;
    background-color: rgb(242, 242, 242);
}

body {
    padding-top: 90px;
    /* Adjust the value based on the height of your navbar */
    margin-left: 0px;
    height: 100%;

}

.center {
    margin: auto;
    width: 50%;
    text-align: center;
}

.nav-item.active {
    filter: hue-rotate(90deg);
}

#loginPage h1 {
    padding-top: 20px;
    padding-bottom: 10px;
}

/* Effects page: force a row-based wrapping flex layout (overrides page-level column) */
#buttonsPage {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 12px 120px 12px;
}

#buttonsPage button {
    margin: 6px;
    padding: 10px 2px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    height: 50px;
    flex: 0 0 160px;
    box-sizing: border-box;
}

/* Advent effect buttons use the same appearance */
.advent-effect-button {
    margin: 6px;
    padding: 10px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    height: 50px;
    flex: 0 0 170px;
    box-sizing: border-box;
}

#buttonsPage button.activeButton {
    background-color: #2eacfa;
}

#powerDiv {
    position: relative;
    display: inline-block;
    bottom: -50px;
}

#stopButton {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 55px;
    width: 55px;
    background-color: #abff7e;
    border-radius: 50%;
    border: none; /* Remove border */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Add a soft box shadow */
}

#stopButton.activeButton {
    background-color: #d8d8d8;
}

#powerButton {
    position: relative;
    font-size: 40px;
}

#powerButton.activeButton {
    color: white;
}


/*From Pokemon App*/
#pokedex {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 20px;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 10px;
    padding: 20px;
    text-align: center;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 50%;
    margin-bottom: 10px;
}

p {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.color {
    padding: 50px;
    width: 20%;
    border-color: #333;
    border-style: solid;
}

.card:hover {
    background-color: rgb(239, 255, 248);
}

.grid_item[style*="background-color"] .card {
    border-radius: 12px;
    border: 3px solid #3f7539;
}

#randomPokemon {
    cursor: pointer;
    font-size: 24px;
    user-select: none;
    padding: 5px;
    border-radius: 10px;
    height: 25px;
    width: 25px;
    position: absolute;
    bottom: 20px;
    right: 40px;
    background-color: rgb(239, 255, 248);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

#randomPokemon:hover {
    background-color: #cbf7d2;
}

#multiColorControls {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

#colorSlots {
    display: flex;
    gap: 10px;
}

.color-slot {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 2px dashed #999;
    background-color: transparent;
    cursor: pointer;
}

.color-slot.filled {
    border-style: solid;
}

.color-slot.active {
    border: 4px solid #333;
}

#clearColorsBtn {
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    background-color: #d9534f;
    color: white;
    cursor: pointer;
}


/* Advent calendar styles */
#adventCalendarContainer {
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.advent-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    max-width: 680px;
    width: 100%;
    margin: 0 auto 30px auto;
    justify-items: center;
    align-items: center;
    box-sizing: border-box;
}

.advent-cell {
    background: linear-gradient(180deg, #fff 0%, #f3f3f3 100%);
    border-radius: 10px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 22px;
    color: #333;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0,0,0,0.08);
    position: relative;
}

/* Ensure cells have a reasonable width and wrap on small screens */
.advent-cell {
    width: 100%;
    max-width: 120px;
}

.advent-cell.locked {
    background: linear-gradient(180deg, #d6e9d6 0%, #cfeacb 100%);
    filter: grayscale(0.2);
    opacity: 0.9;
}

.advent-cell.opened {
    background: linear-gradient(180deg, #fff7e6 0%, #fff0d1 100%);
    color: #1e3a2b;
}

.advent-badge {
    position: absolute;
    top: 8px;
    right: 10px;
    background: #2eacfa;
    color: #fff;
    border-radius: 8px;
    padding: 2px 6px;
    font-size: 12px;
}

/* Modal */
.advent-modal {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

/* Make page containers stack content vertically and center it when shown via JS */
[id$="Page"] {
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    padding-bottom: 90px; /* allow space for navbar */
    box-sizing: border-box;
}

@media (max-width: 700px) {
    .advent-grid { grid-template-columns: repeat(3, 1fr); }
    .advent-cell { max-width: 100px; height: 80px; font-size: 18px; }
}

@media (max-width: 420px) {
    .advent-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .advent-cell { max-width: 120px; height: 72px; font-size: 16px; }
}

.advent-modal-content {
    background: white;
    border-radius: 10px;
    padding: 20px;
    max-width: 360px;
    width: 90%;
    text-align: center;
}

.advent-modal-actions {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

#adventUnlockBtn, #adventCloseBtn {
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

#adventUnlockBtn { background: #4CAF50; color: white; }
#adventCloseBtn { background: #ddd; }