/* =========================================
   GAME SELECTION
   ========================================= */

.pv-game-section {
    background: #171b38;
    border: 1px solid #30375e;
    border-radius: 20px;
    padding: 35px;
}

.pv-game-section h2 {
    margin: 0;
    text-align: center;
    font-size: 28px;
}

.pv-section-description {
    text-align: center;
    opacity: 0.65;
    margin-top: 10px;
    margin-bottom: 30px;
}

.pv-game-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

#pokemon-valley-pokecreator-app .pv-game-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    min-height: 140px !important;
    padding: 20px !important;
    box-sizing: border-box !important;

    background: #202646 !important;
    color: #ffffff !important;

    border: 1px solid #353d66 !important;
    border-radius: 15px !important;

    cursor: pointer !important;

    font-family: inherit !important;
    font-size: inherit !important;
    line-height: normal !important;
    text-align: center !important;

    appearance: none !important;
    -webkit-appearance: none !important;

    transition: transform 0.15s ease,
                background 0.15s ease,
                border-color 0.15s ease !important;
}

#pokemon-valley-pokecreator-app .pv-game-card:hover {
    transform: translateY(-3px) !important;
    background: #292f56 !important;
    border-color: #9147ff !important;
}

.pv-game-icon {
    display: block !important;
    font-size: 32px !important;
    line-height: 1 !important;
    margin-bottom: 12px !important;
}

.pv-game-name {
    display: block !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}


/* =========================================
   SELECTED GAME
   ========================================= */

.pv-selected-game {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 20px;
    padding: 18px 22px;

    border-radius: 15px;

    background: #171b38;
    border: 1px solid #30375e;
}

.pv-selected-game-label {
    display: block;
    margin-bottom: 5px;

    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;

    opacity: 0.55;
}

.pv-selected-game strong {
    font-size: 17px;
}

.pv-change-game {
    flex-shrink: 0;

    padding: 10px 16px;

    border: 1px solid #454e7c;
    border-radius: 10px;

    background: #202646;
    color: white;

    cursor: pointer;
}

.pv-change-game:hover {
    border-color: #9147ff;
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 700px) {

    .pv-game-section {
        padding: 20px;
    }

    .pv-game-grid {
        grid-template-columns: 1fr;
    }

    .pv-selected-game {
        align-items: flex-start;
        flex-direction: column;
    }

    .pv-change-game {
        width: 100%;
    }

}
/* =========================================================
   POKEMON EDITOR - VISUAL DESIGN
   ========================================================= */

.pv-editor {
    margin-top: 24px;
    width: 100%;
}

/* Pokémon header */

.pv-editor-header {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    align-items: center;
    padding: 30px;
    margin-bottom: 24px;
    background: #191f42;
    border: 1px solid #394475;
    border-radius: 16px;
}

.pv-editor-artwork {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    background: #20284d;
    border-radius: 14px;
    border: 1px solid #414c7e;
}

.pv-editor-artwork img {
    display: block;
    width: 220px;
    height: 220px;
    object-fit: contain;
}

.pv-editor-title {
    padding: 10px;
}

.pv-pokedex-number {
    margin-bottom: 8px;
    color: #929bc5;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
}

.pv-editor-title h2 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: 36px;
    line-height: 1.1;
}

.pv-types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pv-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #303a68;
    border: 1px solid #56639a;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Editor sections */

.pv-editor-section {
    margin-bottom: 24px;
    padding: 26px;
    background: #191f42;
    border: 1px solid #394475;
    border-radius: 16px;
}

.pv-editor-section h3 {
    margin: 0 0 20px;
    color: #ffffff;
    font-size: 24px;
    line-height: 1.2;
}

.pv-section-description {
    margin: -10px 0 20px;
    color: #929bc5;
    font-size: 14px;
}

/* Information fields */

.pv-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.pv-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pv-field label {
    color: #c4cae4;
    font-size: 13px;
    font-weight: 600;
}

.pv-field input,
.pv-field select,
.pv-move-input {
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    padding: 10px 13px;
    border: 1px solid #414c7e;
    border-radius: 8px;
    background: #11152f;
    color: #ffffff;
    font-size: 14px;
    outline: none;
}

.pv-field input:focus,
.pv-field select:focus,
.pv-move-input:focus {
    border-color: #9147ff;
    box-shadow: 0 0 0 2px rgba(145, 71, 255, 0.15);
}

.pv-field select option {
    background: #11152f;
    color: #ffffff;
}

/* Shiny checkbox */

.pv-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.pv-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: #9147ff;
    cursor: pointer;
}

/* Base stats */

.pv-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pv-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 16px;
    background: #20284d;
    border: 1px solid #394475;
    border-radius: 10px;
}

.pv-stat-row span {
    color: #c4cae4;
    font-size: 14px;
}

.pv-stat-row strong {
    color: #ffffff;
    font-size: 16px;
}

/* Pokédex information */

.pv-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.pv-info-grid > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    background: #20284d;
    border: 1px solid #394475;
    border-radius: 10px;
}

.pv-info-grid span {
    color: #929bc5;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pv-info-grid strong {
    color: #ffffff;
    font-size: 17px;
}

/* Moves */

.pv-moves {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

/* Editor buttons */

.pv-editor-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 24px;
    margin-bottom: 30px;
}

.pv-create-button {
    min-height: 48px;
    padding: 12px 24px;
    border: 1px solid #9147ff;
    border-radius: 8px;
    background: #9147ff;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        background 0.15s ease;
}

.pv-create-button:hover {
    transform: translateY(-2px);
    background: #a35cff;
}

/* Created Pokémon preview */

.pv-created-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    padding: 30px;
    background: #191f42;
    border: 1px solid #394475;
    border-radius: 16px;
}

.pv-created-artwork {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: #20284d;
    border-radius: 14px;
}

.pv-created-artwork img {
    width: 280px;
    height: 280px;
    object-fit: contain;
}

.pv-created-content h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 34px;
}

.pv-created-content > p {
    color: #c4cae4;
}

.pv-created-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.pv-created-details > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 13px;
    background: #20284d;
    border: 1px solid #394475;
    border-radius: 9px;
}

.pv-created-details span {
    color: #929bc5;
    font-size: 12px;
}

.pv-created-details strong {
    color: #ffffff;
    font-size: 14px;
}

.pv-created-moves {
    margin-top: 24px;
}

.pv-created-moves h3 {
    margin-bottom: 12px;
    color: #ffffff;
}

.pv-created-moves > div {
    margin-bottom: 8px;
    padding: 10px 12px;
    background: #20284d;
    border-radius: 8px;
    color: #ffffff;
}

/* Loading / error */

.pv-loading,
.pv-error {
    padding: 40px;
    text-align: center;
    border-radius: 14px;
    background: #191f42;
    border: 1px solid #394475;
    color: #ffffff;
}

.pv-error {
    border-color: #8f4050;
}

/* Mobile */

@media (max-width: 700px) {

    .pv-editor-header,
    .pv-created-card {
        grid-template-columns: 1fr;
    }

    .pv-editor-grid,
    .pv-stats,
    .pv-info-grid,
    .pv-moves,
    .pv-created-details {
        grid-template-columns: 1fr;
    }

    .pv-editor-artwork {
        min-height: 200px;
    }

    .pv-editor-artwork img {
        width: 190px;
        height: 190px;
    }

    .pv-created-artwork img {
        width: 220px;
        height: 220px;
    }

    .pv-editor-title h2,
    .pv-created-content h2 {
        font-size: 28px;
    }

    .pv-editor-actions {
        flex-direction: column;
    }

    .pv-editor-actions button {
        width: 100%;
    }
}