body {
    font-family: "Press Start 2P", monospace; /* Gameboy-style pixel font */
    background-color: #f0f8ff; /* Light Sky Blue - reminiscent of game skies */
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    font-size: 10px; /* Base size for pixel font, adjust as needed */
    line-height: 1.5; /* Improve readability for pixel fonts */
}

.container {
    background-color: #ffffff;
    padding: 25px; /* Slightly reduced padding */
    border-radius: 15px; /* More rounded */
    box-shadow: 0 6px 12px rgba(0,0,0,0.12), 0 0 0 1px #2A379A; /* Crisper shadow and darker border outline */
    width: 100%;
    max-width: 700px; /* Slightly wider for pixel font readability */
    text-align: center;
    border: 4px solid #3B4CCA; /* Pokemon Blue border - slightly thicker */
}

.header-controls {
    display: flex;
    justify-content: space-between; /* Will adjust if h1 takes full width */
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px dashed #FFDE00; /* Pokemon Yellow */
}

h1 {
    color: #CC0000; /* Pokemon Red */
    font-family: "Press Start 2P", monospace; /* Ensure pixel font */
    font-size: 2.2rem; /* Adjusted for pixel font */
    text-shadow: 
        -2px -2px 0 #A30000,  
         2px -2px 0 #A30000,
        -2px  2px 0 #A30000,
         2px  2px 0 #A30000, /* Simplified outline for pixel font */
         2px 2px 0 #FFDE00; /* Yellow offset */
    margin-bottom: 0;
    line-height: 1.2;
}

#togglePokedexButton {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 15px 10px 48px; /* Top, Right, Bottom, Left (space for icon) */
    background-image: url('/rotom_icon.png');
    background-size: 30px 30px; /* Explicit size for icon */
    background-repeat: no-repeat;
    background-position: 10px center; /* Position icon to the left */
    background-color: #FF9800; /* Rotom Orange */
    border: 3px solid #F44336; /* Rotom Red/Dark Orange accent */
    border-radius: 8px; /* More blocky for pixel style */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1005; 
    cursor: pointer;
    transition: right 0.3s ease-in-out, transform 0.2s ease, box-shadow 0.2s ease;
    color: #2c2c2c; /* Dark text for contrast on orange */
    font-family: "Press Start 2P", monospace; /* Pixel font */
    font-size: 0.9rem; /* Adjusted for pixel font */
    font-weight: normal; /* Pixel fonts often don't need bold */
    text-shadow: 1px 1px 0px #f1c40f; /* Slight yellow highlight for text */
    display: flex; 
    align-items: center; 
    line-height: 1; 
}

#togglePokedexButton:hover {
    transform: scale(1.05); /* Slightly larger on hover */
    box-shadow: 0 3px 7px rgba(0,0,0,0.3);
}

#togglePokedexButton.panel-open {
    right: 660px; /* Adjusted: new_panel_physical_width (640) + offset (20) */
}

.input-area label {
    display: block;
    margin-top: 15px; 
    margin-bottom: 5px;
    font-weight: normal; /* Pixel fonts often don't need bold */
    text-align: left;
    color: #3B4CCA; /* Pokemon Blue */
    font-size: 0.9rem; /* Adjusted for pixel font */
}

.input-area input[type="text"],
.input-area textarea,
.input-area select { 
    width: calc(100% - 24px);
    padding: 8px; /* Adjusted for pixel font */
    margin-bottom: 10px;
    border: 2px solid #B0B0B0; /* Gameboy gray border */
    border-radius: 4px; /* More blocky */
    box-sizing: border-box;
    font-size: 0.9rem; /* Adjusted for pixel font */
    background-color: #fdfdfd;
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.12); 
    font-family: "Press Start 2P", monospace; /* Ensure pixel font for inputs */
}

.input-area input[type="text"]:focus,
.input-area textarea:focus,
.input-area select:focus { 
    border-color: #FFDE00; /* Pokemon Yellow on focus */
    box-shadow: 0 0 0 2px rgba(255, 222, 0, 0.4), inset 1px 1px 3px rgba(0,0,0,0.05); 
    outline: none;
}

.input-area textarea {
    min-height: 70px; /* Adjusted */
    line-height: 1.4;
}

#specialAspects { 
    min-height: 40px; /* Adjusted */
    line-height: 1.4;
}

button { /* General Button Style - for Generate Button */
    background: linear-gradient(145deg, #FFDE00, #FFC700); 
    color: #3B4CCA; 
    border: 3px solid #2A379A; 
    padding: 10px 20px; /* Adjusted */
    font-size: 1rem; /* Adjusted for pixel font */
    font-weight: normal; /* Pixel fonts often don't need bold */
    border-radius: 8px; /* More blocky */
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    margin-top: 20px; 
    box-shadow: 0 3px 0px #A67C00, 0 2px 4px rgba(0,0,0,0.2); /* Adjusted 3D shadow */
    text-transform: uppercase; 
    font-family: "Press Start 2P", monospace; /* Ensure pixel font */
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0px #A67C00, 0 4px 8px rgba(0,0,0,0.3); 
    filter: brightness(1.1);
}

button:active {
    transform: translateY(1px); 
    box-shadow: 0 1px 0px #A67C00, 0 1px 2px rgba(0,0,0,0.2); 
    filter: brightness(0.9);
}

button:disabled {
    background: #cccccc; 
    color: #666666;
    border-color: #999999;
    cursor: not-allowed;
    transform: translateY(0px);
    box-shadow: 0 2px 0px #888888, 0 1px 2px rgba(0,0,0,0.1); 
    filter: grayscale(1);
}

.actions-row {
    display: flex;
    justify-content: space-around; /* Distributes space for potentially 3 buttons */
    align-items: center;
    margin-top: 20px; 
    flex-wrap: wrap; /* Allow buttons to wrap if not enough space */
    gap: 10px; /* Add gap between buttons if they wrap */
}

.actions-row button { 
    flex-grow: 1; 
    flex-basis: 150px; /* Minimum width before wrapping, adjust as needed */
    margin-left: 5px; /* Reduced margin */
    margin-right: 5px; /* Reduced margin */
    font-size: 0.80rem; /* Slightly smaller for more buttons */
    padding: 8px 10px; /* Adjusted */
    margin-top: 0; 
}

#saveToPokedexButton {
    background: linear-gradient(145deg, #4CAF50, #45a049); 
    color: white;
    border: 3px solid #2E7D32; 
    box-shadow: 0 3px 0px #1B5E20, 0 2px 4px rgba(0,0,0,0.2); 
}
#saveToPokedexButton:hover {
    background: linear-gradient(145deg, #45a049, #3f9142);
    transform: translateY(-2px);
    box-shadow: 0 5px 0px #1B5E20, 0 4px 8px rgba(0,0,0,0.3);
}
#saveToPokedexButton:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0px #1B5E20, 0 1px 2px rgba(0,0,0,0.2);
}

#megaEvolveButton {
    background: linear-gradient(145deg, #FF6347, #FF4500); 
    color: white;
    border: 3px solid #C62828; 
    box-shadow: 0 3px 0px #B71C1C, 0 2px 4px rgba(0,0,0,0.2); 
}
#megaEvolveButton:hover {
    background: linear-gradient(145deg, #FF4500, #E53935);
    transform: translateY(-2px);
    box-shadow: 0 5px 0px #B71C1C, 0 4px 8px rgba(0,0,0,0.3);
}
#megaEvolveButton:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0px #B71C1C, 0 1px 2px rgba(0,0,0,0.2);
}

#evolveCurrentButton {
    background: linear-gradient(145deg, #2196F3, #1E88E5); /* Blue gradient */
    color: white;
    border: 3px solid #1565C0; /* Darker blue border */
    box-shadow: 0 3px 0px #0D47A1, 0 2px 4px rgba(0,0,0,0.2); /* Dark blue shadow */
}
#evolveCurrentButton:hover {
    background: linear-gradient(145deg, #1E88E5, #1976D2);
    transform: translateY(-2px);
    box-shadow: 0 5px 0px #0D47A1, 0 4px 8px rgba(0,0,0,0.3);
}
#evolveCurrentButton:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0px #0D47A1, 0 1px 2px rgba(0,0,0,0.2);
}

.fakemon-card {
    margin-top: 20px;
    padding: 15px; /* Adjusted */
    border: 3px solid #3B4CCA; 
    border-radius: 10px; /* Slightly less rounded */
    background: linear-gradient(180deg, #F0F7FF 0%, #DAE8F5 100%); 
    box-shadow: inset 0 0 8px rgba(59, 76, 202, 0.15), 0 4px 10px rgba(0,0,0,0.1); 
}

.fakemon-card h2 { /* DisplayName */
    color: #D32F2F; 
    margin-top: 0;
    margin-bottom: 10px; 
    font-size: 1.8rem; /* Adjusted for pixel font */
    font-family: "Press Start 2P", monospace; /* Ensure pixel font */
    text-shadow: 1px 1px #FFF, 2px 2px #FFC1C1; 
    line-height: 1.2;
}

#displayStageAndCategory {
    font-size: 0.9rem; /* Adjusted for pixel font */
    color: #444; 
    margin-bottom: 8px;
    font-weight: normal; /* Pixel fonts don't need bold */
    text-shadow: 0px 1px 1px rgba(255,255,255,0.7);
}

#displayEvolutionInfo {
    font-style: normal; /* Pixel fonts often don't look good italic */
    font-size: 0.8rem; /* Adjusted for pixel font */
    color: #3B4CCA; 
    background-color: rgba(255,255,255,0.6); 
    padding: 3px 8px; /* Adjusted */
    border-radius: 5px; /* More blocky */
    display: inline-block; 
    margin-top: 8px;
    margin-bottom: 8px;
    border: 1px solid rgba(59, 76, 202, 0.3);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    font-weight: normal;
}

#displayTypes {
    font-size: 0.9rem; /* Base size for container, adjusted */
    color: #333;
    margin-bottom: 15px;
    font-weight: normal; /* Pixel fonts don't need bold */
    display: flex; 
    justify-content: center; 
    gap: 6px; /* Adjusted */
    flex-wrap: wrap; 
}

/* Type Badge Styles */
.type-badge {
    padding: 4px 10px; /* Adjusted */
    border-radius: 5px; /* More blocky */
    color: white;
    font-size: 0.8rem; /* Adjusted for pixel font */
    font-weight: normal; /* Pixel fonts don't need bold */
    text-transform: uppercase;
    border: 1px solid rgba(0,0,0,0.2);
    box-shadow: 0 1px 2px rgba(0,0,0,0.25), inset 0px 1px 1px rgba(255,255,255,0.2); 
    text-shadow: 1px 1px 0px rgba(0,0,0,0.3); /* Simpler shadow */
    min-width: 60px; /* Adjusted */
    text-align: center;
    line-height: 1.3;
}

.type-normal { background-color: #A8A878; }
.type-fire { background-color: #F08030; }
.type-water { background-color: #6890F0; }
.type-grass { background-color: #78C850; }
.type-electric { background-color: #F8D030; color: #222; text-shadow: 1px 1px 0px rgba(0,0,0,0.2); } 
.type-ice { background-color: #98D8D8; }
.type-fighting { background-color: #C03028; }
.type-poison { background-color: #A040A0; }
.type-ground { background-color: #E0C068; }
.type-flying { background-color: #A890F0; }
.type-psychic { background-color: #F85888; }
.type-bug { background-color: #A8B820; }
.type-rock { background-color: #B8A038; }
.type-ghost { background-color: #705898; }
.type-dragon { background-color: #7038F8; }
.type-steel { background-color: #B8B8D0; }
.type-dark { background-color: #705848; }
.type-fairy { background-color: #EE99AC; }
.type-none { display: none; } 


#fakemonImage, #initialImage {
    max-width: 100%;
    height: auto;
    min-height: 150px; /* Adjusted */
    max-height: 280px; /* Adjusted */
    margin-top: 15px;
    margin-bottom: 20px;
    border-radius: 8px; /* More blocky */
    background-color: rgba(255,255,255,0.6); 
    border: 3px solid #FFDE00; 
    padding: 5px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15), inset 0 0 5px rgba(255,222,0,0.3); 
    object-fit: contain;
    image-rendering: pixelated; /* Keep pixels sharp for generated images if possible */
}

#initialImage {
    opacity: 0.9;
    max-width: 200px; /* Adjusted */
    border: 3px dashed #3B4CCA;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); 
}

#initialMessage {
    border: 3px dashed #3B4CCA; 
    background-color: #E0ECF8; 
    padding: 15px; /* Adjusted */
    border-radius: 10px; 
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}
#initialMessage p {
    font-size: 0.9rem;  /* Adjusted for pixel font */
    color: #1A237E; 
    margin-bottom: 10px; 
    font-weight: normal; /* Pixel fonts don't need bold */
    text-shadow: 0px 1px 1px rgba(255,255,255,0.5);
    line-height: 1.4;
}

#loadingIndicator {
    font-size: 1rem; /* Adjusted for pixel font */
    color: #CC0000; 
    margin-top: 15px;
    margin-bottom: 15px;
    font-style: normal; /* Pixel fonts often don't look good italic */
    font-weight: normal; /* Pixel fonts don't need bold */
    text-shadow: 1px 1px #FFC1C1;
}

.fakemon-details {
    text-align: left;
    margin-top: 20px;
    padding: 12px; /* Adjusted */
    background-color: rgba(255, 255, 255, 0.75); 
    border-radius: 6px; /* More blocky */
    border: 2px solid #FFDE00; 
    box-shadow: inset 0 0 5px rgba(255,222,0,0.2); 
}

.fakemon-details h4 {
    color: #3B4CCA; 
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1rem; /* Adjusted for pixel font */
    font-weight: normal; /* Pixel fonts don't need bold */
    border-bottom: 2px solid #FFDE00; 
    padding-bottom: 5px;
    text-shadow: 1px 1px #D6E4FF; 
}

.pokedex-entry-text {
    font-size: 0.8rem; /* Adjusted for pixel font */
    color: #2c2c2c; 
    line-height: 1.5; /* Increased for pixel font readability */
    margin-bottom: 15px; 
    min-height: 30px; 
}

.abilities-list {
    list-style-type: none;
    padding-left: 0;
    margin: 0 0 15px 0; /* Margin bottom before next section */
    display: flex; /* Make abilities display inline nicely */
    flex-wrap: wrap;
    gap: 8px;
}

.abilities-list li {
    background-color: #e9e9e9; /* Light grey background */
    border: 1px solid #b0b0b0; /* Grey border */
    padding: 5px 10px; 
    border-radius: 4px;
    font-size: 0.75rem;
    color: #3B4CCA; /* Pokemon Blue text */
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
    font-weight: normal;
    line-height: 1.3;
}

.moveset-list {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); /* Adjusted for pixel font */
    gap: 8px; /* Adjusted */
    margin-bottom: 15px; /* Added margin if stats are below */
}

.moveset-list li {
    background-color: #fff;
    border: 1px solid #A0A0A0; 
    padding: 6px 10px; /* Adjusted */
    border-radius: 4px; /* More blocky */
    font-size: 0.75rem; /* Adjusted for pixel font */
    color: #333;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1), inset 0px 1px 1px rgba(255,255,255,0.5); 
    font-weight: normal; /* Pixel fonts don't need bold */
    line-height: 1.3;
}

#displayStats {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 2px dotted #FFDE00; /* Separator */
}

#displayStats h4 {
    color: #3B4CCA; 
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1rem; 
    font-weight: normal;
    text-shadow: 1px 1px #D6E4FF; 
    border-bottom: none; /* Remove bottom border if fakemon-details h4 has it */
    padding-bottom: 0;  /* Remove bottom padding if fakemon-details h4 has it */
}

.stats-list {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
    display: grid;
    /* For 3x2 layout + BST on its own row */
    grid-template-columns: repeat(3, 1fr); 
    gap: 6px 10px; /* row-gap column-gap */
    font-size: 0.75rem; 
}

.stats-list li {
    background-color: #f8f8f8;
    border: 1px solid #c0c0c0; 
    padding: 5px 8px; 
    border-radius: 4px; 
    color: #333;
    font-weight: normal;
    line-height: 1.3;
    text-align: left; 
    box-shadow: inset 0px 1px 1px rgba(255,255,255,0.5);
}

.stats-list li.bst {
    font-weight: bold; 
    background-color: #e8e8e8;
    color: #222;
    grid-column: 1 / -1; /* Make BST span all columns */
    text-align: center;
    margin-top: 5px; /* Add some space above BST */
    border-top: 2px solid #b0b0b0;
}

/* Pokedex Styles */
#pokedexContainer {
    position: fixed;
    top: 0;
    right: -640px; 
    width: 600px;   
    height: 100vh;
    background-color: #FF9800; 
    border-left: 5px solid #F44336; 
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    z-index: 1000; 
    transition: right 0.3s ease-in-out;
    padding: 20px; 
    box-sizing: border-box;
    overflow-y: auto;
    display: flex; 
    flex-direction: column;
    border-top-left-radius: 15px; /* More blocky */
    border-bottom-left-radius: 15px; /* More blocky */
}

#pokedexContainer.visible {
    right: 0;
}

.pokedex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2c2c2c; 
    color: #f1c40f; 
    margin: -20px -20px 15px -20px; 
    padding: 10px 20px; /* Adjusted */
    border-bottom: 4px solid #f1c40f; 
    border-top-left-radius: 12px; /* Match parent container's curve */
}

.pokedex-header h2 {
    color: #f1c40f; 
    font-family: "Press Start 2P", monospace; /* Ensure pixel font */
    text-shadow: 1px 1px 0px #000, 0 0 2px #f1c40f; /* Simpler shadow */
    margin: 0; 
    font-size: 1.3rem; /* Adjusted for pixel font */
}

#closePokedexPanelButton {
    background: transparent;
    border: none;
    font-size: 1.6rem; /* Adjusted */
    color: #f1c40f; 
    cursor: pointer;
    padding: 0 5px; 
    line-height: 1;
    text-shadow: 0 0 3px #f1c40f;
    font-family: "Press Start 2P", monospace; /* Ensure pixel font */
}
#closePokedexPanelButton:hover {
    color: #fff200; 
    text-shadow: 0 0 5px #fff200;
}

#pokedexGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); /* Adjusted for pixel font */
    gap: 12px; /* Adjusted */
    flex-grow: 1; 
}

.pokedex-entry-card {
    background-color: #fff;
    border: 2px solid #4A90E2; 
    border-radius: 8px; /* More blocky */
    padding: 12px; /* Adjusted */
    box-shadow: 0 3px 8px rgba(0,0,0,0.1), inset 0 0 5px rgba(74,144,226,0.1); 
    text-align: left; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pokedex-entry-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.15), inset 0 0 8px rgba(74,144,226,0.2);
}

.pokedex-entry-card img {
    max-width: 100%;
    height: auto;
    max-height: 70px;  /* Adjusted */
    min-height: 40px;  /* Adjusted */
    border-radius: 4px; /* More blocky */
    margin-bottom: 10px;
    background-color: #f0f0f0; 
    border: 2px solid #f1c40f; 
    object-fit: contain;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-shadow: inset 0 0 3px rgba(241,196,15,0.3); 
    image-rendering: pixelated;
}

.pokedex-entry-card h3 { 
    font-size: 1.1rem;  /* Adjusted for pixel font */
    color: #D32F2F; 
    margin: 5px 0 8px 0;
    text-align: center;
    font-weight: normal; /* Pixel fonts don't need bold */
    text-shadow: 1px 1px #FFC1C1; 
    line-height: 1.2;
}

.pokedex-entry-card .pokedex-types { 
    display: flex;
    justify-content: center;
    gap: 4px; /* Adjusted */
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.pokedex-entry-card .pokedex-types .type-badge { 
    padding: 2px 6px; /* Adjusted */
    font-size: 0.65rem; /* Adjusted for pixel font */
    min-width: 50px; /* Adjusted */
    box-shadow: 0 1px 1px rgba(0,0,0,0.2), inset 0px 1px 0px rgba(255,255,255,0.15); 
    text-shadow: 1px 1px 0px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.pokedex-entry-card .pokedex-evolution-info {
    font-size: 0.65rem; /* Small text for these details */
    color: #555;
    margin-bottom: 8px;
    text-align: center;
    line-height: 1.2;
}
.pokedex-entry-card .pokedex-evolution-info p {
    margin: 2px 0;
}

.pokedex-entry-card .pokedex-details-section {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1c40f; 
}

.pokedex-entry-card .pokedex-details-section h4 {
    font-size: 0.8rem;  /* Adjusted for pixel font */
    color: #2979FF; 
    margin-bottom: 5px;
    font-weight: normal; /* Pixel fonts don't need bold */
    text-shadow: 1px 1px #A9D2FF; 
}
.pokedex-entry-card .pokedex-details-section .pokedex-entry-text {
    font-size: 0.7rem;  /* Adjusted for pixel font */
    line-height: 1.4;
    margin-bottom: 8px; 
    min-height: 20px;
}

.pokedex-entry-card .pokedex-abilities-list {
    list-style-type: none;
    padding-left: 0;
    margin: 0 0 8px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.pokedex-entry-card .pokedex-abilities-list li {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 0.6rem; /* Even smaller for Pokedex card */
    color: #3B4CCA;
    line-height: 1.2;
}

.pokedex-entry-card .pokedex-details-section .moveset-list {
    grid-template-columns: 1fr; 
    gap: 4px; /* Adjusted */
}
.pokedex-entry-card .pokedex-details-section .moveset-list li {
    font-size: 0.65rem; /* Adjusted for pixel font */
    padding: 4px 6px; /* Adjusted */
    box-shadow: 0 1px 1px rgba(0,0,0,0.08), inset 0px 1px 0px rgba(255,255,255,0.3); 
    line-height: 1.2;
    margin-bottom: 0; /* Reset margin if any from general .moveset-list li */
}

.pokedex-entry-card .pokedex-stats-list {
    grid-template-columns: 1fr; /* Stack stats vertically in Pokedex */
    gap: 3px; 
    font-size: 0.65rem; 
    margin-top: 5px; /* Space between moves and stats */
}

.pokedex-entry-card .pokedex-stats-list li {
    padding: 3px 5px; 
    background-color: #fdfdfd;
    border-color: #d0d0d0;
}

.pokedex-entry-card .pokedex-stats-list li.bst {
    font-size: 0.7rem; 
    text-align: center;
    background-color: #f0f0f0;
    grid-column: auto; /* Override main card's span */
    margin-top: 2px;
    border-top: 1px solid #ccc;
}

.pokedex-entry-actions {
    display: flex;
    flex-direction: column; 
    gap: 5px; /* Adjusted */
    margin-top: 10px; /* Adjusted */
}

.pokedex-entry-actions button {
    padding: 6px 8px;  /* Adjusted */
    font-size: 0.7rem;  /* Adjusted for pixel font */
    width: 100%; 
    box-sizing: border-box;
    font-weight: normal; /* Pixel fonts don't need bold */
    text-transform: uppercase;
    border-radius: 4px; /* More blocky */
    transition: filter 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
    font-family: "Press Start 2P", monospace; /* Ensure pixel font */
}
.pokedex-entry-actions button:hover {
    filter: brightness(1.15); 
    transform: translateY(-1px);
}
.pokedex-entry-actions button:active {
    filter: brightness(0.9);
    transform: translateY(0px);
}

.pokedex-entry-card .evolve-button {
    background: linear-gradient(145deg, #4CAF50, #45a049); 
    color: white;
    border: 2px solid #2E7D32; 
    box-shadow: 0 2px 0px #1B5E20; 
}
.pokedex-entry-card .evolve-button:hover { box-shadow: 0 3px 0px #1B5E20; }
.pokedex-entry-card .evolve-button:active { box-shadow: 0 1px 0px #1B5E20; }

.pokedex-entry-card .preevolve-button {
    background: linear-gradient(145deg, #2196F3, #1E88E5); 
    color: white;
    border: 2px solid #1565C0; 
    box-shadow: 0 2px 0px #0D47A1; 
}
.pokedex-entry-card .preevolve-button:hover { box-shadow: 0 3px 0px #0D47A1; }
.pokedex-entry-card .preevolve-button:active { box-shadow: 0 1px 0px #0D47A1; }

.pokedex-entry-card .remove-button {
    background: linear-gradient(145deg, #e74c3c, #c0392b); 
    color: white;
    border: 2px solid #9E2215; 
    box-shadow: 0 2px 0px #7F1C12; 
    margin-top: 0; 
}
.pokedex-entry-card .remove-button:hover { box-shadow: 0 3px 0px #7F1C12; }
.pokedex-entry-card .remove-button:active { box-shadow: 0 1px 0px #7F1C12; }

#emptyPokedexMessage {
    font-size: 1rem;  /* Adjusted for pixel font */
    color: #2c2c2c; 
    padding: 25px;
    text-align: center;
    font-weight: normal; /* Pixel fonts don't need bold */
    text-shadow: 1px 1px #FFCC80; 
    line-height: 1.4;
}